05.07.2016, 11:46
Here, next time use "search"
Код:
CMD:goto(playerid, params[]) { new id, Float:x, Float:y, Float:z, name[MAX_PLAYER_NAME],msg[128]; if(sscanf(params, "u", id)) return SendClientMessage(playerid, COLOR_YELLOW, "[COMMAND]{FFFFFF} Usage:{FFFF00} /goto [playerid]"); else if(pInfo[playerid][Adminlevel] <= 2) return SendClientMessage(playerid, COLOR_RED,"[ERROR]{FFFFFF} You have entered an unknown command, please view {FFFF00}/cmds{FFFFFF} or{FFFF00} /commands{FFFFFF} and try again."); else if(pInfo[playerid][Adminlevel] == 0) return SendClientMessage(playerid, COLOR_RED,"[ERROR]{FFFFFF} You have entered an unknown command, please view {FFFF00}/cmds{FFFFFF} or{FFFF00} /commands{FFFFFF} and try again."); else if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, "[SERVER]{FFFFFF} That player is not connected."); else if(id == playerid) return SendClientMessage(playerid, COLOR_RED, "[ERROR]{FFFFFF} You cannot teleport to yourself!"); else { GetPlayerPos(id,x,y,z); SetPlayerPos(playerid, x+1, y+1,z); GetPlayerName(id,name,sizeof(name)); format(msg,sizeof(msg),"You have teleported to {FFFF00}%s(%d){FFFFFF}.",name,id); SendClientMessage(playerid, COLOR_LIGHTGREEN,msg); } return 1; }