07.06.2010, 03:58
I have a rejail code that was made by Baked - Banana (Awesome scripter )
I am trying to edit it so that if a player jail evades (logs out when they get jailed) they will be rejailed onplayerspawn. That works fine and everything BUT
I am now trying to make it so that they will be rejailed onplayerspawn but 5 seconds after they spawn instead of right away.
They get sent to jail in 5 seconds like they should, and it works, but they keep getting jailed over and over after 5 seconds instead of once. How can i stop this timer when they have been jailed already?
heres my code:
I am trying to edit it so that if a player jail evades (logs out when they get jailed) they will be rejailed onplayerspawn. That works fine and everything BUT
I am now trying to make it so that they will be rejailed onplayerspawn but 5 seconds after they spawn instead of right away.
They get sent to jail in 5 seconds like they should, and it works, but they keep getting jailed over and over after 5 seconds instead of once. How can i stop this timer when they have been jailed already?
heres my code:
pawn Код:
forward ReJailTime(playerid);
public ReJailTime(playerid)
{
if(IsSpawned[playerid] == 1) {
if(JailTime[playerid]){
SetPlayerInterior(playerid,10);
SetPlayerPos(playerid, 219.5331,111.1658,999.0156);
SetPlayerVirtualWorld(playerid,0);
SendClientMessage(playerid,0xFF7F50AA,"This is what happens when you leave the server while in jail.");
Jailed[playerid] =1;
StoleCopCarRecent[playerid] =0;
triedtoescaperecent[playerid] =1;
ResetPlayerWeapons(playerid);
JailTimeServed[playerid] =0;
}
}
}
pawn Код:
SetTimer("ReJailTime",5000,1);