PDA

View Full Version : #define MAX_PLAYERS, undef.


Belengher
18/04/2017, 02:05 PM
Hello.
I have a problem that I see that persists, so I found that if out defines the maximum number of players from GM, no longer appear on some server TextDraw sites ... What to do if this ??? I think about that sometimes fail server.


//------------------------------------------------------------------------------
#include <a_samp>

#undef MAX_PLAYERS
#define MAX_PLAYERS 200

#include <a_zones>
#include <crashdetect>
#include <a_mysql>
#include <streamer>
#include <Pawn.CMD>
#include <sscanf2>
#include <foreach>
#include <fly>
#include <firewerkz>

... rest of scripts

Sew_Sumi
18/04/2017, 02:13 PM
Why are you trying to redefine this if you've got foreach?

You can also use the other functions to GetPlayerPoolSize (http://wiki.sa-mp.com/wiki/GetPlayerPoolSize)...

Belengher
18/04/2017, 02:32 PM
@Sew_Sumi

I tried, where TextDraw create sites to put foreach, but when I get on the server, not create but occur in different forms but appear.

Sew_Sumi
18/04/2017, 02:37 PM
I'm sure you are facing a script issue, and you don't need to redefine the MAX_PLAYERS.

Belengher
18/04/2017, 02:47 PM
And how to detect this error if it really exists?

Belengher
18/04/2017, 03:52 PM
@Sew_Sumi


With GetPlayerPoolSize not working, look right TextDraw sites only id 0, and the other players can not create.

raydx
18/04/2017, 03:54 PM
So use Player TextDraws. You don't have to use MAX_PLAYERS.

Belengher
18/04/2017, 04:02 PM
@RIDE2DAY


How do I do? How to debug try gamemode?

Belengher
18/04/2017, 04:06 PM
@raydx


That I understand, but why this problem occurred?

raydx
19/04/2017, 07:38 AM
@raydx


That I understand, but why this problem occurred?

Probably too much global textdraws. Global textdraws limit is 2000. If you are making it with [MAX_PLAYERS], one textdraw is created 200 times.