21.07.2012, 13:09
Here you go:
ZCMD version, tested and works.
and offc that other old sort, the strcmp command:
ZCMD command "installation", copy paste the first code inside the script, outside of any callback, i prefer at the bottom of the script, but OUTSIDE any callback.
i am sure you know how to put the other version in your script.
Tell me if they work
ZCMD version, tested and works.
pawn Код:
CMD:fall(playerid,params[])
{
new height;
if(sscanf(params,"i",height)) return SendClientMessage(playerid,COLOR_RED,"Usage: /fall [height]");
new Float:P,Float:O,Float:S;
GetPlayerPos(playerid,P,O,S);
SetPlayerPos(playerid,P,O,height);
return 1;
}
pawn Код:
if (strcmp(cmd, "/fall", true) == 0)
{
new tmp[20],id;
tmp = strtok(cmdtext, index);
if (strlen(tmp)) return SendClientMessage(playerid,COLOR_RED,"Usage: /fall [height]");
id = strval(tmp);
new Float:P,Float:O,Float:S;
GetPlayerPos(playerid,P,O,S);
SetPlayerPos(playerid,P,O,id);
return 1;
}
i am sure you know how to put the other version in your script.
Tell me if they work
