28.07.2016, 08:07
Thank you andy, however the player is not being sent to jail when he Reconnects, also the textdraw is not updating.
Fixed the textdraw, however when i reconnect i do get the Textdraw saying im jailed, but it does not send back to jail.
Is it because im randomly spawning the player after i spawned him in the jail?
?
Fixed the textdraw, however when i reconnect i do get the Textdraw saying im jailed, but it does not send back to jail.
Is it because im randomly spawning the player after i spawned him in the jail?
Code:
public OnPlayerSpawn(playerid) { if(pData[playerid][JailTime] > 0) { // Player was in jail before logging off Player_SendToJail(playerid); } new Random = random(sizeof(RandomSpawns)); SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]); SetPlayerFacingAngle(playerid, RandomSpawns[Random][3]); return 1; }