Is it possible?
#1

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);
Reply
#2

Sure is;
pawn Код:
stock GivePlayerWeed(playerid, amount) {
PlayerInfo[playerid][pWeed] += amount;
return 1;
}

stock GivePlayerCocaine(playerid, amount) {
PlayerInfo[playerid][pcocaine] += amount;
return 1;
}
Reply
#3

sure

Код:
stock GiveWeed( playerid, amount )
{
    return PlayerInfo[ playerid ][ pWeed ] += amount;
}
same goes for the other one.
Reply
#4

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...
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)