multi param commands with dcmd? - 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: multi param commands with dcmd? (
/showthread.php?tid=249465)
multi param commands with dcmd? -
sciman001 - 19.04.2011
Hi al. I am trying to make a /pay command... with dcmd.. but i cant figure out how to make it with 2 params... the player id (int) and the case (int). Can someone please give me an example of this? THANKZ!
Re: multi param commands with dcmd? -
admantis - 19.04.2011
You can use..
pawn Код:
params[0] // Parameters 0 (playerid)
params[1] // Parameters 1 (ammount)
Or even better, sscanf
pawn Код:
new destination, ammount;
if (sscanf(params, "ui", destination, ammount)) return SendClientMessage(playerid, -1, "Usage: /sendmoney <destination> <ammount>");
GivePlayerMoney(destination, ammount);
GivePlayerMoney(playerid, -ammount);
Re: multi param commands with dcmd? -
sciman001 - 19.04.2011
thanks... sscanf.


its kinda coplex but makes a ton of sense!


THX!