/ar jail buggs! Need help fast :(!!!!! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: /ar jail buggs! Need help fast :(!!!!! (
/showthread.php?tid=497566)
/ar jail buggs! Need help fast :(!!!!! -
MuhoX - 27.02.2014
When my friend arrest me, I go to jail but no time shows up.
So I wait for minutes and minutes long, nothing happens.
I do /q or /kill to get out. So it Auto jails me back in to jail.
And then it works It shows JAILTIME: 70, 69 etc.
So I need help with that here some printscreens:
When Im in jail:
When I avade jail (/q or /kill):
Re: /ar jail buggs! Need help fast :(!!!!! -
LocMax - 27.02.2014
Show the code
Re: /ar jail buggs! Need help fast :(!!!!! -
MuhoX - 27.02.2014
Okay heres code:
Quote:
{
format(string, sizeof(string), "Police Officer %s has arrested wanted suspect %s",PlayerInfo(playerid), PlayerInfo(ID));
SendClientMessageToAll(COLOR_BLUE, string);
CNR_PrintString(string);
format(string, sizeof(string), "[POLICE RADIO] Suspect %s has been sent to jail", PlayerInfo(ID));
SendCopMessage(string);
GivePlayerMoney(playerid, 3000);
IncreaseScore(playerid, 1);
SetPVarInt(ID, "JailTime", 45);
SetPlayerInterior(ID, 10);
new rnd = random(sizeof(PrisonSpawn));
SetPlayerPos(ID, PrisonSpawn[rnd][0], PrisonSpawn[rnd][1], PrisonSpawn[rnd][2]);
SendClientMessage(playerid, COLOR_GREY, "**LOS SANTOS PRISON**");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "[PRISON] You have been sent to prison. You will be released soon.");
TogglePlayerControllable(ID, 1);
SetPlayerWantedLevel(ID, 0);
return 1;
}
|
Re: /ar jail buggs! Need help fast :(!!!!! -
LocMax - 27.02.2014
Show the code when it sets you back to jail when you /kill or /Q
Re: /ar jail buggs! Need help fast :(!!!!! -
MuhoX - 27.02.2014
Here:
Quote:
}
if(GetPVarInt(playerid, "JailTime") > 0)
{
new rnd = random(sizeof(PrisonSpawn)); SetPlayerPos(playerid, PrisonSpawn[rnd][0], PrisonSpawn[rnd][1], PrisonSpawn[rnd][2]);
SetPlayerInterior(playerid, 10);
format(string, sizeof(string), "[AUTO JAIL] %s (LEFT SERVER WHILE IN JAIL)",PlayerInfo(playerid));
print(string);
SendClientMessageToAll(COLOR_RED, string);
SetPVarInt(playerid, "Jailed", 1);
}
SetTimer("SetPlayerTeamFromNoTeam", 1000*15, 0);
return 1;
}
|
Re: /ar jail buggs! Need help fast :(!!!!! -
MuhoX - 27.02.2014
/bump
Re: /ar jail buggs! Need help fast :(!!!!! -
LocMax - 27.02.2014
Where do you use GameText code? On second picture 'Jail Time: 94', you need to add that to the jail command too.
Re: /ar jail buggs! Need help fast :(!!!!! -
MuhoX - 27.02.2014
I don't know where that is at! I can't find it. Can you say what to search for?
Im not sure but I think it's this one??
Quote:
if(GetPVarInt(i, "Jailed") == 1)
{
new string[200];
SetPVarInt(i, "JailTime", GetPVarInt(i, "JailTime") -1);
format(string, 200, "~b~Jail Time ~n~ ~r~%d", GetPVarInt(i, "JailTime"));
GameTextForPlayer(i, string, 1000, 3);
ResetPlayerWeapons(i);
}
|
Respuesta: /ar jail buggs! Need help fast :(!!!!! -
CuervO - 27.02.2014
Quote:
SetPVarInt(playerid, "Jailed", 1);
|
That PVar is being set when the evade code is in effect but not when the jail code is.
Re: /ar jail buggs! Need help fast :(!!!!! -
MuhoX - 27.02.2014
How can I fix that?