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



One question .. - PlayHard - 29.12.2011

Hey,

In order to make my own money ( like West-Side ) money those rcash I think, Do I have to make that using enums?

Like

enum BLAH
{
PlayHardCASH
}

?


Re: One question .. - Lуs - 29.12.2011

No. Use variables and some stocks to give and take money.


Re: One question .. - THE_KNOWN - 29.12.2011

Quote:
Originally Posted by Los
Посмотреть сообщение
No. Use variables and some stocks to give and take money.
u can use enum as vars too o.0 most of them do it these days


Re: One question .. - PlayHard - 29.12.2011

O.O, Any example?


Re: One question .. - THE_KNOWN - 29.12.2011

pawn Код:
enum BLAH
{
    PLAYHARDCASH
}

new PlayerInfo[MAX_PLAYERS][BLAH];


stock GiveMoney(playerid ,amount)
{
    PlayerInfo[playerid][PLAYHARDCASH]+=amount;
}

stock GetMoney(playerid)
{
    return PlayerInfo[playerid][PLAYHARDCASH]+=amount;
}



Re: One question .. - Lуs - 29.12.2011

Quote:
Originally Posted by THE_KNOWN
Посмотреть сообщение
u can use enum as vars too o.0 most of them do it these days
Use enum to one variable, is better use a simple new.


Re: One question .. - Stigg - 29.12.2011

pawn Код:
new PlayHardCASH[MAX_PLAYERS];



Re: One question .. - PlayHard - 29.12.2011

Hm, Thanks a lot guys! I will test that out!