SA-MP Forums Archive
commands - 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: commands (/showthread.php?tid=518335)



commands - rumen98 - 09.06.2014

hey can anyone tell me how can i create command:
example i have command /fuckthatsonofabitch
how can i create command /fsb but to make function of ,,/fuckthatsonofabitch'' without to need to duplicate command ?


Re: commands - iFiras - 09.06.2014

Do you mean, make the command shorter to use?
If yes, then use this:
pawn Код:
//The original command - long one
CMD:fuckthatsonofbitch(playerid,params[])
{
     //Your things
     return 1;
}
---
pawn Код:
CMD:fsb(playerid,params[]) //The short command - same as /fuckthatsonofbitch
{
     return cmd_fuckthatsonofbitch(playerid,params)
}
Edit: You can use this to make a similar command for it, whether to make it shorter to use or use it as another name.


Re: commands - rumen98 - 09.06.2014

Yes thats it Thanks you