Why isn't this working? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Why isn't this working? (
/showthread.php?tid=200958)
Why isn't this working? -
ThePlague1988 - 19.12.2010
Please help
Код:
if (strcmp(cmdtext, "/gotoxyz", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new Float:X, Float:Y, Float:Z;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Usage: /gotoxyz [x] [y] [z]");
return 1;
}
X = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Usage: /gotoxyz [x] [y] [z]");
return 1;
}
Y = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Usage: /gotoxyz [x] [y] [z]");
return 1;
}
Z = strval(tmp);
if (PlayerInfo[playerid][pAdmin] >= 2)
{
SendClientMessage(playerid, COLOR_GREEN, " ** You've teleported to desired X, Y, Z !");
SetPlayerPos(playerid, X, Y, Z);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!");
}
}
return 1;
}
it's not working dunno why?
Re: Why isn't this working? -
Rafa - 19.12.2010
pawn Код:
if(sscanf(params, "fff", player, pos[0], pos[1], pos[2])) return SendClientMessage(playerid, color, "USAGE: /gotoxyz [x] [y] [z]");
i make something but idk not tested try to make something with this line :/