31.08.2010, 14:03
Use timers
EDIT: Example:
EDIT: Example:
pawn Код:
//on top
new gFlyTimer;
pawn Код:
//timer function
forward FlyTimer(playerid);
public FlyTimer(playerid)
{
SetPlayerPos( playerid, 0.0, 0.0, 0.0 ); //This is where you will teleport AFTER 10 seconds
//SetPlayerInterior( ... );
}
pawn Код:
//command
if( !strcmp( cmdtext, "/fly", true ))
{
SetPlayerPos( playerid, 0.0, 0.0, 0.0 ); //This is where you go when typing the command
//SetPlayerInterior( ... );
gFlyTimer = SetTimerEx( "FlyTimer", 1000, false, "i", playerid );
return true;
}