Just use a timmer .. I will give you an example..
[pawn]
if (strcmp(cmd, "!goto", true) == 0) {
tmp = strtok(cmdtext, idx);
if(PlayerInfo[playerid][Logged] != 1) SendClientMessage(playerid, COLOR_RED, "You need to login first!");
else if(!strlen(tmp)) SendClientMessage(playerid, COLOR_GREY, "Usage: !goto [Nick/ID]");
else {
new plr = FindPlayerIDFromString(tmp);
if (plr == INACTIVE_PLAYER_ID) SendClientMessage(playerid,COLOR_GREEN,"Error: Unknown player");
else if (PlayerInfo[plr][NoGoto] == 1) SendClientMessagef(playerid,COLOR_GREEN, "%s has goto Disabled.",strval(gPlayers[plr]));
else if (!IsPlayerSpawned(plr)) SendClientMessagef(playerid,COLOR_GREEN, "Error: %s does not spawned!",gPlayers[plr]);
else {
GetPlayerPos(plr,x,y,z);
SetPlayerPos(playerid,x,y + 1.0,z,0,0);
format(szMsg,sizeof(szMsg),"Teleporting:[ %s ] to:[ %s ]",gPlayers[playerid],gPlayers[plr]);
SendClientMessageToAll(COLOR_GREEN, szMsg);
SetTimer("EVADE",5000,1);
TogglePlayerControllable(playerid,0);
GameTextForPlayer(playerid,"~w~teleporting..");
SendClientMessage(playerid,COLOR_JOIN,"Please wait 5 seconds to teleport for no evading.");
}
}
return 1;[/pawn]
Them on PlayerFunction ...
[pawn]
public EVADE()
{
SendClientMessageToAll(COLOR_GREEN,"You has been teleported!");
TogglePlayerControllable(playerid,1);
}[/pawn]