05.11.2015, 14:38
The code doesn't get exceuted IG. When I type the code, it says use /teleto...
PHP код:
COMMAND:teleto(playerid, params[])
{
new Float:x, Float:y, Float:z, playername[MAX_PLAYER_NAME];
if(sscanf(params, "fff", Float:x, Float:y, Float:z)) return SendClientMessage(playerid, -1, "USAGE: /teleto [Location : x, y, z]");
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "ERROR: You are not RCON Admin");
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "ERROR: You need to be on foot to teleport to a location");
GetPlayerName(playerid, playername, SOS);
format(string, SOS, "You have been teleported to %f, %f, %f !", x, y, z);
SendClientMessage(playerid, 0x33CCFFAA, string);
SetPlayerPos(playerid, x, y, z);
return 1;
}