Is it possible? - 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: Is it possible? (
/showthread.php?tid=559849)
Is it possible? -
weedxd - 25.01.2015
So i have these:
PlayerInfo[playerid][pcocaine] += 5;
PlayerInfo[playerid][pWeed] += 10;
Am i able to make them as a fucntion like this?
GivePlayerWeapon(playerid,0,0);
Re: Is it possible? -
Luis- - 25.01.2015
Sure is;
pawn Код:
stock GivePlayerWeed(playerid, amount) {
PlayerInfo[playerid][pWeed] += amount;
return 1;
}
stock GivePlayerCocaine(playerid, amount) {
PlayerInfo[playerid][pcocaine] += amount;
return 1;
}
Re: Is it possible? -
Smileys - 25.01.2015
sure
Код:
stock GiveWeed( playerid, amount )
{
return PlayerInfo[ playerid ][ pWeed ] += amount;
}
same goes for the other one.
Re: Is it possible? -
weedxd - 25.01.2015
Oh huge thanks guys gona give you bouth rep.
Didnt know how to get this done as i before didn't face this kind of a thing...