SA-MP Forums Archive
OnPlayerCommandText - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: OnPlayerCommandText (/showthread.php?tid=253857)



OnPlayerCommandText - xir - 08.05.2011

What to use when you want to call a cmd with zcmd?

pawn Код:
OnPlayerCommandText(playerid, "/cmd");
that one to zcmd?


Re: OnPlayerCommandText - Seven_of_Nine - 08.05.2011

ZCMD is like:
pawn Код:
COMMAND:cmd(playerid,params[]) {
     return 1;
}
EDIT:
pawn Код:
cmd_cmd(playerid,"troll");



Re: OnPlayerCommandText - Gamer_Z - 08.05.2011

if you want to call a command you use CallLocalFunction("command_name", ....) , just analyze zcmd and you'll see.


Re: OnPlayerCommandText - MadeMan - 08.05.2011

If your command name is mycmd, then

pawn Код:
cmd_mycmd(playerid, params);