SA-MP Forums Archive
CMD Help - 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)
+--- Thread: CMD Help (/showthread.php?tid=474759)



CMD Help - FaZeRs - 09.11.2013

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.


Re: CMD Help - PrivatioBoni - 09.11.2013

Please show your code..


Re: CMD Help - Tagathron - 09.11.2013

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


Re: CMD Help - Stinged - 09.11.2013

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.


Re: CMD Help - erminpr0 - 09.11.2013

try updating sscanf plugin and include


Re: CMD Help - FaZeRs - 09.11.2013

Thanks Tagathron, Stinged and erminpr0. Fixed