-/c teleport (/c goto) / 5 seconds
Add this TimeGoto and Playertogoto at enum phrase
[pawn]TimeGoto,
PlayerToGoto[256],[/pawn]
And this one at OnPlayerText
[pawn] else if (strcmp(cmd, "!goto", true) == 0) {
tmp = strtok(cmdtext, idx);
if (IsPlayerInfo(playerid,cmd)) return 0;
else if (GetPlayerSpawn(playerid) == 0) MessagePM(playerid, GREEN,"[Error] - First spawn and then use it.");
else if (GetPlayerHP(playerid) <= 99) MessagePMFormat(playerid, GREEN,"You have %d HP, only with 100 can teleported.",GetPlayerHP(playerid));
else if (!strlen(tmp)) MessagePMFormat(playerid, GREEN,"[Syntax] - The correct use: %s <playerid/name>.",cmdtext);
else if (pInfo[playerid][TimeGoto] == 1) MessagePM(playerid, GREEN,"[Error] - You already have in process a goto.");
else {
plr = FindPlayerIDFromString(tmp);
if (plr == INACTIVE_PLAYER_ID) MessagePM(playerid, GREEN,"[Error] - Unknonw player, try another.");
else if (GetPlayerSpawn(plr) == 0) MessagePMFormat(playerid, GREEN,"[Error] - %s has isn't spawned.",gPlayers[plr]);
else if (GetPlayerNogoto(plr) == 1) MessagePMFormat(playerid, GREEN,"[Error] - %s have Nogoto ON.",gPlayers[plr]);
else {
format(MSN,256,"%s",gPlayers[plr]);
pInfo[playerid][PlayerToGoto] = MSN;
pInfo[playerid][TimeGoto] = 1;
SetTimer("SetGotoTime",8000,0);
MessagePM(playerid, GREEN,"Wait 8 seconds to prevent death evade...");
}
}
return 1;
}[/pawn]