13.01.2013, 07:34
Use sscanf instead? :S
strtok doesn't handle Floats, only strings or values other than float values.
add:
to the top of your script after downloading the latest sscanf from ******.
Wrong.
strtok doesn't handle Floats, only strings or values other than float values.
add:
pawn Код:
#include <sscanf2>
Quote:
Here thats with SSCANF2
CMD:gotopos(playerid,params[]) { new Float:X,Float:Y,Float:Z; if(sscanf(params,"fff",X,Y,Z)) return SendClientMessage(playerid,YOURCOLOR,"YOUR ERROR MESSAGE!!!"); { SetPlayerPos(playerid,X,Y,Z); } return 1; } |
pawn Код:
CMD:gotopos(playerid, params[])
{
new Float:x, Float:y, Float:z;
if(sscanf(params, "fff", x, y, z)) return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /gotopos x y z");
SetPlayerPos(playerid, x, y, z);
return 1;
}