06.05.2014, 01:02
pawn Код:
CMD:coordteleport(playerid, params[])
{
new Float:Pos[3];
if(sscanf(params, "a<f>[3]", Pos)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /coordteleport (XPos) (Ypos) (ZPos)");
new vID = GetPlayerVehicleID(playerid);
if(vID) SetVehiclePos(vID, Pos[0], Pos[1], Pos[2]);
else SetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
new string[128];
format(string, sizeof string, "You have been teleported to coordinates %.4f, %.4f, %.4f.", Pos[0], Pos[1], Pos[2]);
return SendClientMessage(playerid, COLOR_WHITE, string);
}