need help with little thing
#1

Okayy so thats so simple but my command is not working anymore because I changed the strcmp -> zcmd and now I have this
pawn Код:
new ID = strval(params)
so how I can add this on zcmd? should I put it in sscanf or what xdxd
Reply
#2

Simple:
pawn Код:
CMD:test(playerid, params[])
{
    if(isnull(params)) return 0;

    new
        ID = strval(params);

    if(!IsPlayerConnected(ID)) return 0;

    GivePlayerWeapon(ID, 24, 500);
    return 1;
}
Usage: /Test < Player ID >
Reply
#3

Well if you use ZCMD you should use SSCANF also.

But it's better to do it with "isnull" as [L3th4l] said.

pawn Код:
if (sscanf(params, "u", ID)) return SendClientMessage(playerid, COLOR, "Usage: /something [playerid]");
Reply
#4

yeaah that works wohoooo thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)