06.11.2012, 01:03
When ever the admin does /goto it says they've teleported too that player but they acctually havn't.
Heres the code:
Heres the code:
Код:
CMD:goto(playerid, params[]) { new ID; new pn[MAX_PLAYER_NAME]; new an[MAX_PLAYER_NAME]; new str[128]; if(sscanf(params, "u", ID)) return SendClientMessage(playerid, 0xFF0000AA, "{F23A0D}USAGE: {AAAAAA}/goto (playerid)]"); if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, 0xFF0000AA, "{F23A0D}ERROR: {AAAAAA}This player is not connected"); GetPlayerName(playerid, an, MAX_PLAYER_NAME); GetPlayerName(ID, pn, MAX_PLAYER_NAME); new Float:x; new Float:y; new Float:z; if(IsPlayerInAnyVehicle(playerid)) { GetPlayerPos(ID, x, y, z); SetVehiclePos(playerid, x+1, y+1, z); format(str, sizeof(str), "{AAAAAA}You have teleported to %s", pn); SendClientMessage(playerid, 0x00FF00AA, str); } else { GetPlayerPos(ID, x, y, z); SetPlayerPos(playerid, x+1, y+1, z); format(str, sizeof(str), "{AAAAAA}You have teleported to %s", pn); SendClientMessage(playerid, 0x00FF00AA, str); } return 1; }