05.05.2014, 17:38
pawn Код:
CMD:coordteleport(playerid, params[])
{
new x, y, z;
if(sscanf(params, "iii", x, y, z)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /coordteleport(XPos) (Ypos) (ZPos)");
SetPlayerPos(playerid, x, y, z);
if(IsPlayerInAnyVehicle(playerid))
{
SetVehiclePos(GetPlayerVehicleID(playerid), x, y, z);
}
new string[128];
format(string, sizeof string, "You have been teleported to coordinates %d, %d, %d.", x, y, z);
SendClientMessage(playerid, COLOR_WHITE, string);
return 1;
}