CMD Help
#1

Why when i write some CMD they are not working.

Like.

I write /su 1 Jerk - nothing happens just shows USAGE: /(su)spect [playerid] [crime discription]

And all the time nothing happens, same as /report /requesthelp /jail /prison and other CMD they appear just again and dont work.
Reply
#2

Please show your code..
Reply
#3

Download latest sccanf plugin,replace the old one,then recompile the script.
Reply
#4

pawn Код:
CMD:suspect(playerid, params[])
{
    new id,discription;
    if(sscanf(params,"us"id,discription)) SendClientMessage(playerid, -1, "USAGE: /su(spect) [id/name] [discription]");
    else if(id == INVALID_PLAYER_ID) SendClientMessage(playerid, -1, "ERROR: Player is not connected.");
    else
    {
        // Do what you want here.
    }
    return 1;
}

CMD:su(playerid, params[])
{
    return command_suspect(playerid, params[]); // Now /su will be the same as /suspect
}
That's pretty much it.
You need sscanf for this.
Reply
#5

try updating sscanf plugin and include
Reply
#6

Thanks Tagathron, Stinged and erminpr0. Fixed
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)