DEATH-Arrest not working
#1

https://pastebin.com/JUKtWN66

Player is not in Jail
Reply
#2

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.
Reply
#3

No its just a command that shows you the current time
Reply
#4

Then what is the problem? Players are not getting jailed, because you never put them there.
Reply
#5

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);
                }
            
            }
        }
    }

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)