26.08.2014, 11:32
This will not work correctly.
1) Positions are floats.
2):
It shouldn't be like this.
It should be like this:
Here's a working version:
1) Positions are floats.
2):
It shouldn't be like this.
pawn Код:
YCMD:tp(playerid, params[], help)
{
{
new x,y,z;
if(sscanf(params, "iii", x, y, z))return SendClientMessage(playerid, 0xFF0000FF, "/tp (X/Y/Z)");
SetPlayerPos(playerid, x, y, z);
return 1;
{
return 1;
}
pawn Код:
YCMD:tp(playerid, params[], help)
{
new x,y,z;
if(sscanf(params, "iii", x, y, z))return SendClientMessage(playerid, 0xFF0000FF, "/tp (X/Y/Z)");
SetPlayerPos(playerid, x, y, z);
return 1;
}
Here's a working version:
pawn Код:
YCMD:tp(playerid, params[], help)
{
new Float:x, Float:y, Float:z;
if(sscanf(params, "fff", x, y, z)) return SendClientMessage(playerid, 0xFF0000FF, "/tp (X/Y/Z)");
SetPlayerPos(playerid, x, y, z);
return 1;
}