31.01.2014, 14:58
Hello everyone I would freeze the player for 5 seconds by the time the map changes to begin?
Sorry for my english
Sorry for my english
MapLoading(playerid);
forward MapLoading(playerid); public MapLoading(playerid) { TogglePlayerControllable(playerid,false); SetTimerEx("MapLoaded", 5000, 0,"d",playerid); return 1; } forward MapLoaded(playerid); public MapLoaded(playerid) { TogglePlayerControllable(playerid, true); return 1; }
This forum requires that you wait 240 seconds between posts. Please try again in 181 seconds.
public OnPlayerSpawn(playerid)
{
TogglePlayerControllable(playerid, 0); // Freezing the player
SendClientMessage(playerid, -1, "Loading the maps.");
SetTimerEx("LoadingMap", 5000, false, "i", playerid); // Setting the timer to five 5 seconds (5000 milliseconds)
return 1;
}
forward LoadingMap(playerid); // Forwarding
public LoadingMap(playerid)
{
TogglePlayerControllable(playerid, 1); // Unfreezing the player
return 1;
}