31.03.2012, 18:58
pawn Код:
if(strcmp(cmd, "/teleport", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GREY, "USAGE: /teleport [playerid]");
return 1;
}
giveplayerid = strval(tmp);
new Float:x,Float:y,Float:z;
GetPlayerPos(giveplayerid, x, y ,z);
SetPlayerPos(playerid, x, y, z);
new string[128], pName[MAX_PLAYER_NAME];
GetPlayerName(giveplayerid,pName,sizeof(pName));
format(string,sizeof(string),"INFO: Teleported to %s.",pName);
SendClientMessage(playerid, COLOR_GREY, string);
return 1;
}