SA-MP Forums Archive
Scripting player items - 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: Scripting player items (/showthread.php?tid=438161)



Scripting player items - Mr.Valdez - 18.05.2013

I am a noob at scripting but i want to give a player an item to use in a job or something like gems for mining or seeds for farming so when they go to hand them in for money etc they get paid.
But i just want to know how to make gems or seeds work in a script, it confuses me. Please help.


Respuesta: Scripting player items - JustBored - 18.05.2013

You have to declare a variable.
For example
pawn Код:
new seeds[MAX_PLAYERS]; // you declare the variable seeds for a player
//You can use it as this:
seeds[playerid] = (seeds to put in a integrer.)



Re: Scripting player items - Mr.Valdez - 19.05.2013

ok so lets say someone typed /seeds at a pickup and i wanted them to get like 5 seeds how would i work it like that, like what would the line be like.