#1

It Works fine but when i jail player .In jail command i use SetTimer so it works fine but after unjailing player it again sets the unjail position of player after 5 minutes .Can any one help me please.
Код:
SetTimer("Jailed",300000,1);
Код:
public Jailed()
{
  	for(new playerid;playerid<MAX_PLAYERS;playerid++)
  	{

  	if(logged[playerid] == 1) return 0;
  	else
  	if(logged[playerid] == -2)
  	TogglePlayerControllable(playerid, 1);
	 	logged[playerid] = 1;
		SetPlayerInterior(playerid, 0);
		SetPlayerPos(playerid, 2295.9700,2468.1985,10.8203);
		ResetPlayerWeapons(playerid);
		ResetPlayerMoney(playerid);
		SendClientMessage(playerid, COLOR_BRIGHTRED, "You have been unjailed.");

		return 1;
}
Reply
#2

I assume yours look like this;
pawn Код:
SetTimer("timername",time,1);
(The 1 (can also be called true) means It will repeat).
Set it to false (0) to prevent It to repeat.

That will repeat the timer.
Read https://sampwiki.blast.hk/wiki/SetTimer

Reply
#3

thanks it worked
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)