16.06.2019, 13:02
DEATH-Arrest not working
16.06.2019, 14:06
I guess this is supposed to put the player in jail?
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.
Code:
OnPlayerCommandText (playerid, "/ time");
- 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.
17.06.2019, 17:46
No its just a command that shows you the current time
17.06.2019, 19:35
Then what is the problem? Players are not getting jailed, because you never put them there.
18.06.2019, 00:40
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]> = 1 && 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 (string, sizeof (string), "You're in jail for% d seconds and have to pay $% d.", PlayerInfo [playerid] [pJailTime], price);
SCM (playerid, COLOR_LIGHTRED, string);
WantedPoints [playerid] = 0;
WantedLevel [playerid] = 0;
SCM (playerid, COLOR_LIGHTBLUE, "All lawyers were informed!");
OnPlayerCommandText (playerid, "/ time");
format (string, sizeof (string), "~ w ~ criminals killed ~ g ~ $% d", price / 2);
GameTextForPlayer (killerid, string, 5000, 1);
GivePlayerMoneySave (killerid, price / 2);
// fractional fund [1] + = price / 2;
PlayerPlaySound (killerid, 1058, 0.0, 0.0, 0.0);
Reset Player Weapons (playerid);
format (string, sizeof (string), "<<% s% s killed the suspect% s >>", GetFrakRang (PlayerInfo [playerid] [pRank], PlayerInfo [playerid] [pMember]), GetName (killerid), GetName (playerid));
OOCNews (COLOR_LIGHTRED, string);
}
}
}
}
}
« Next Oldest | Next Newest »
Users browsing this thread: 1 Guest(s)