David (Sabljak) wrote on July 30, 2012, 2:34 am:
Eto zcmd
CMD:goto(playerid, params[])
{
new x, y, z;
if(sscanf(params, "iii", x, y, z)) return SendClientMessage(playerid, 0xFF0000FF, "Koristi: /goto ");
SetPlayerPos(playerid, x, y, z);
return 1;
}
,Nasao na SAMP Forumu
CMD:goto(playerid, params[])
{
new x, y, z;
if(sscanf(params, "iii", x, y, z)) return SendClientMessage(playerid, 0xFF0000FF, "Koristi: /goto ");
SetPlayerPos(playerid, x, y, z);
return 1;
}
,Nasao na SAMP Forumu
Koordinate skoro nikada nisu celi vec decimalni brojevi.Zato koristis float.
Pravilno:
CMD:goto(playerid, params[])
{
new Float:x, Float:y, Float:z;
if(sscanf(params, "fff", x, y, z)) return SendClientMessage(playerid, 0xFF0000FF, "Koristi: /goto ");
SetPlayerPos(playerid, x, y, z);
return 1;
}