[Problem]Progressbar & Textdraw work for player id 0only
#2

It's quite obvious. These are global variables:
pawn Код:
new PlayerBar:BarHungry;
new PlayerBar:BarSleep;
new PlayerBar:BarDefecate;
Make them arrays like these textdraws:
pawn Код:
new Text:SleepBar[MAX_PLAYERS];
new Text:HungryBar[MAX_PLAYERS];
new PlayerText:DefecateBar[MAX_PLAYERS];
That will make them per-player. I'm pretty sure you're supposed to create player bars (haven't used the include in a while) in the script init. Basically your problem is that you're replacing the index stored in the global variables every time a player connects.
Reply


Messages In This Thread
[Problem]Progressbar & Textdraw work for player id 0only - by edwardluciano - 04.11.2015, 03:07
Re: [Problem]Progressbar & Textdraw work for player id 0only - by Crayder - 04.11.2015, 03:39
Re: [Problem]Progressbar & Textdraw work for player id 0only - by edwardluciano - 04.11.2015, 04:13

Forum Jump:


Users browsing this thread: 1 Guest(s)