How could I give people dice if they buy them from store [HELP] - 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: How could I give people dice if they buy them from store [HELP] (
/showthread.php?tid=367841)
How could I give people dice if they buy them from store [HELP] -
ShawtyyMacJunior - 11.08.2012
Im used to scripting now and its getting easier, but i dont know how to give people things. Like how would i give someone dice if they purchase them from the store? I want to use this for other things as well like cigars and gas cans
Re: How could I give people dice if they buy them from store [HELP] -
Jstylezzz - 11.08.2012
they are not standard things that you "give" to them..
they are scripted things, like, a dice, is scripted as a command , /dice.
when the player does that command, the script checks if HasDice == 1.
if 1, then it makes a random number random(6);
This was just an example of the dice, but, what you basically have to do, is make a dialog, and add for example the dice in it.
When the player clicks on that/selects that, and has enough money, then set HasDice to 1
What i used was just a random variable, because i don't know what your saving system is.
Also I assume you already have some dialog knowledge.
If you need any help, just post, and i will try to help more