SA-MP Forums Archive
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(playeridparams[])
    return 
cmd_admins && cmd_helpers(playeridparams); 
don't know what it's not working


Re: ZCMD with two options +rep - AbyssMorgan - 28.10.2015

Example:
PHP код:
CMD:staff(playeridparams[]){
    
cmd_admins(playeridparams);
    
cmd_helpers(playeridparams);
    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(playeridparams[]){
    
cmd_admins(playeridparams);
    
cmd_helpers(playeridparams);
    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(playeridparams), cmd_helpers(playeridparams);