SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 16/06/2019, 01:02 PM   #1
playstores
Huge Clucker
 
Join Date: Feb 2018
Location: Germany
Posts: 203
Reputation: 19
Default DEATH-Arrest not working

https://pastebin.com/JUKtWN66

Player is not in Jail
playstores is offline   Reply With Quote
Old 16/06/2019, 02:06 PM   #2
Plastikmensch
Huge Clucker
 
Join Date: Aug 2016
Posts: 272
Reputation: 27
Default Re: DEATH-Arrest not working

I guess this is supposed to put the player in jail?
Code:
OnPlayerCommandText (playerid, "/ time");
Please show the code in that callback.
- Is the command "/ time"?
- if(!strcmp(cmdtext,"/ time"))?
- It it supposed to be "/time"?

It's better to call a function to put the player in jail than to call a callback or command.
Plastikmensch is offline   Reply With Quote
Old 17/06/2019, 05:46 PM   #3
playstores
Huge Clucker
 
Join Date: Feb 2018
Location: Germany
Posts: 203
Reputation: 19
Default Re: DEATH-Arrest not working

No its just a command that shows you the current time
playstores is offline   Reply With Quote
Old 17/06/2019, 07:35 PM   #4
Plastikmensch
Huge Clucker
 
Join Date: Aug 2016
Posts: 272
Reputation: 27
Default Re: DEATH-Arrest not working

Then what is the problem? Players are not getting jailed, because you never put them there.
Plastikmensch is offline   Reply With Quote
Old 18/06/2019, 12:40 AM   #5
Jodus
Little Clucker
 
Join Date: Apr 2016
Posts: 5
Reputation: 0
Default Re: DEATH-Arrest not working

You didn't set the jailed player's pos with SetPlayerPos.

PHP Code:
// at OnPlayerDeath
new string [256];
if (
killerid! = INVALID_PLAYER_ID// 
{
    if (
WantedLevel [playerid]> = && PlayerPaintballing [playerid]! = 1)
    {
        new 
price WantedLevel [playerid] * 1200;
        if (
IsPlayerConnected (killerid))
        {
            if (
IsACop (killerid))
            {
                if (
WantedLevel [playerid]> = 1)
                {
                    
GivePlayerMoneySave (playerid, -price);
                    
PlayerInfo [playerid] [pWantedDeaths] + = 1;
                    
PlayerInfo [playerid] [pJailed] = 1;
                    
PlayerInfo [playerid] [pJailTime] = (WantedLevel [playerid] * 60);
                   
// SetPlayerPos(playerid, x, y, z);
                    
format (stringsizeof (string), "You're in jail for% d seconds and have to pay $% d."PlayerInfo [playerid] [pJailTime], price);
                    
SCM (playeridCOLOR_LIGHTREDstring);
                    
WantedPoints [playerid] = 0;
                    
WantedLevel [playerid] = 0;
                    
SCM (playeridCOLOR_LIGHTBLUE"All lawyers were informed!");
                    
OnPlayerCommandText (playerid"/ time");
                    
format (stringsizeof (string), "~ w ~ criminals killed ~ g ~ $% d"price 2);
                    
GameTextForPlayer (killeridstring50001);
                    
GivePlayerMoneySave (killeridprice 2);
                    
// fractional fund [1] + = price / 2;
                    
PlayerPlaySound (killerid10580.00.00.0);
                    
Reset Player Weapons (playerid);
                    
format (stringsizeof (string), "<<% s% s killed the suspect% s >>"GetFrakRang (PlayerInfo [playerid] [pRank], PlayerInfo [playerid] [pMember]), GetName (killerid), GetName (playerid));
                    
OOCNews (COLOR_LIGHTREDstring);
                }
            
            }
        }
    }

Jodus is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Arrest Command not Working! Charalambos26 Scripting Help 4 21/06/2015 05:47 PM
Arrest command is not working for me. Dan. Scripting Help 2 09/04/2012 04:29 PM
arrest command not working Krozz Help Archive 0 02/04/2010 01:38 AM
/arrest stoped working bristan Help Archive 0 27/08/2009 11:13 PM
/arrest still not working StrickenKid Help Archive 4 26/02/2009 02:00 AM


All times are GMT. The time now is 11:13 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.