Few dcmds doing same thing - 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: Few dcmds doing same thing (
/showthread.php?tid=81549)
Few dcmds doing same thing -
kacperoo - 11.06.2009
Hi, I want to create commands in 2 languages.
I don't want to copy code.
Example: I want to have /pay and /givecash doing SAME thing.
Using normal CMDs thats no problem, just use
pawn Код:
if(strcmp(cmd, "/pay", true) == 0 || strcmp(cmd, "/givecash", true) == 0)
but how to do it in dcmd without copying code?
Re: Few dcmds doing same thing -
miokie - 11.06.2009
- Anywhere In your Script:
pawn Код:
Dcmd_Pay(playerid,params[]) return Dcmd_GiveCash(playerid,params);
That's how i'd do it.