10.11.2010, 08:47
Hello.. I was making unfreeze timer when people enter building and after timer ends.. server unfreeze him.
If one player enter and 2nd enter after him.. server unfreezes player who entered 2nd and 1st is frozen perm.
Whats wrong?
pawn Код:
forward UnfreezeTimer( playerid );
public UnfreezeTimer( playerid )
{
TogglePlayerControllable(playerid, true);
return 1;
}
// this goes under OnPlayerKeyStateChange
if(IsPlayerInRangeOfPoint( playerid, 2, 1772.0117, -1548.0527, 9.9070) )
{
SetPlayerPos( playerid, 2534.3948, -1366.6055, 1041.4506);
SetPlayerInterior( playerid, 2);
TogglePlayerControllable(playerid, false);
SetTimer("UnfreezeTimer", 3000, false);
}
Whats wrong?