05.10.2011, 23:44
Hey this is my code:
I want that when the player gets in the car, then wait 1 second, so when 1 second passes, toggleplayercontrollable = 0 (Freeze) Just for 10 seconds, then after 10 seconds gametextforall "Fuera" and unfreeze the player.
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(Eventomotos[playerid] == 1)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
SetTimer("Paro3",1000,true);
TogglePlayerControllable(playerid,0);
SetTimer("Paro",10000,true);
new string[124];
format( string, sizeof(string), "~g~ fuera! ");
GameTextForAll( string, 5000, 3 );
TogglePlayerControllable(playerid,0);
}
}
return 1;
}