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



/givecash - amrour - 15.02.2009

well i wanna make /givecash command for my script but i don't know how, can anyone help me?


Re: /givecash - [RP]Rav - 15.02.2009

I will give you some functions you can look at instead (evil, I know )

GetPlayerMoney(playerid)
GivePlayerMoney(playerid, amount)



Re: /givecash - arnoldziux - 15.02.2009

Quote:
Originally Posted by Lenny.
well i wanna make /givecash command for my script but i don't know how, can anyone help me?
Just simply get it out of lvdm


Re: /givecash - amrour - 15.02.2009

Quote:
Originally Posted by Jump3r
Quote:
Originally Posted by Lenny.
well i wanna make /givecash command for my script but i don't know how, can anyone help me?
Just simply get it out of lvdm
how? when i copy the command it gives me like million errors.


Re: /givecash - Marcel - 15.02.2009

dcmd and sscanf.


Re: /givecash - rensfromrpas - 15.02.2009

you'll need strtok:
(note i didn't test it)
Код:
if(!strcmp(cmd, "/givecash", true)
{
   tmp = strtok(cmdtext, idx);
   if(!strlen(tmp)) return SendClientMessage(playerid, 0xC0C0C0/*samp color :)*/, "USAGE: /givecash [ammount]");
   GivePlayerMoney(playerid, strval(tmp));  
   return 1;
}