27.04.2018, 00:27
wait, I remember that post, someone asked for the exactly same code... it was u?
anyway.
Remove this code.
change with it.
create new forward func, from the deleted code.
anyway.
Remove this code.
PHP код:
new Random = random(sizeof(RandomJailSpawns));
SetPlayerPos(targetid, RandomJailSpawns[Random][0], RandomJailSpawns[Random][1], RandomJailSpawns[Random][2]);
SetPlayerFacingAngle(targetid, RandomJailSpawns[Random][2]);
SetPlayerInterior(targetid, 3);
pJailTimerID[targetid] = SetTimerEx("pJailTimer", 1000, true, "i", targetid);
pJailCount[targetid] = 80 + random(100);
ResetPlayerWeapons(targetid);
SetPlayerColor(targetid, COLOR_WHITE);
SetPlayerWantedLevel(targetid,0);
SetPVarInt(playerid,"ArTime",GetTickCount()+5000);
PHP код:
SetTimerEx("JailPlayer",5000,0,"i",playerid);// making 5 sec timer for jail
PHP код:
forward JailPlayer(targetid);
public JailPlayer(targetid)
{
new Random = random(sizeof(RandomJailSpawns));
SetPlayerPos(targetid, RandomJailSpawns[Random][0], RandomJailSpawns[Random][1],
RandomJailSpawns[Random][2]);
SetPlayerFacingAngle(targetid, RandomJailSpawns[Random][2]);
SetPlayerInterior(targetid, 3);
pJailTimerID[targetid] = SetTimerEx("pJailTimer", 1000, true, "i", targetid);
pJailCount[targetid] = 80 + random(100);
ResetPlayerWeapons(targetid);
SetPlayerColor(targetid, COLOR_WHITE);
SetPlayerWantedLevel(targetid,0);
SetPVarInt(playerid,"ArTime",GetTickCount()+5000);
return 1;
}