ZCMD with two options +rep - 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: ZCMD with two options +rep (
/showthread.php?tid=592674)
ZCMD with two options +rep -
DemME - 28.10.2015
Hey, so I wanna do a shortcut to a command, but I wanna grab to commands at once.
something like this
PHP код:
CMD:staff(playerid, params[])
return cmd_admins && cmd_helpers(playerid, params);
don't know what it's not working
Re: ZCMD with two options +rep -
AbyssMorgan - 28.10.2015
Example:
PHP код:
CMD:staff(playerid, params[]){
cmd_admins(playerid, params);
cmd_helpers(playerid, params);
return 1;
}
Re: ZCMD with two options +rep -
036 - 28.10.2015
At the top of your script:
Код:
#define ALCMD:%1->%2;
CMD:%1(playerid, params[])
return cmd_%2(playerid, params);
Ontop of your command(EXAMPLE):
Код:
ALCMD:crouch->crack;
CMD:crack(playerid, params[])
{
Re: ZCMD with two options +rep -
DemME - 28.10.2015
Quote:
Originally Posted by AbyssMorgan
Example:
PHP код:
CMD:staff(playerid, params[]){
cmd_admins(playerid, params);
cmd_helpers(playerid, params);
return 1;
}
|
Thanks dude, rep'ed.
Re: ZCMD with two options +rep -
Ahmad45123 - 28.10.2015
I am not 100% sure about this but AFAK you can use a comma if you don't want curly brackets.
PHP код:
cmd_admins(playerid, params), cmd_helpers(playerid, params);