Definir MAX_PLAYERS
#1

Eai pessoal Blz ?

Estou tentando definir o MAX_PLAYERS dessa forma:

Code:
#if defined MAX_PLAYERS
#undef MAX_PLAYERS
#define MAX_PLAYERS (20)
#endif
Mais parece nгo estar dando certo, pois toda vez que uso um loop ele faz a contagem de 0 hб 499.

Teria alguma outra forma de definir ?

Obrigado!
Reply
#2

Cria variбvel:
Quote:

new nomedavariavel[MAX_PLAYERS];

Reply
#3

pawn Code:
#if defined MAX_PLAYERS
#undef MAX_PLAYERS
#define MAX_PLAYERS (20)
#endif
Nossa sу basta criar uma variбvel.
Reply
#4

Isto deve resolver o seu problema:

pawn Code:
//Coloque isto no topo do seu GM, logo depois das includes
#undef MAX_PLAYERS
#define MAX_PLAYERS (20)

Ou pode criar outra define:

pawn Code:
#define MAX_PLAYERS_FRENETICO (20)
Daн й sу sair trocando todos os MAX_PLAYERS por MAX_PLAYERS_FRENETICO


Espero ter ajudado
Reply
#5

Ken vocк sу fez redefinir o mбximo de jogadores entгo invйs dele criar uma variбvel em [MAX_PLAYERS] ele deverб por [MAX_PLAYERS_FRENETICO].
Reply
#6

Obrigado pelas sugestхes pessoal , vou usar outro #define que й a melhor opзгo.
Reply
#7

Freneticu,

pawn Code:
#undef MAX_PLAYERS
#define MAX_PLAYERS 20
Ou

pawn Code:
#define SLOTS 20
pawn Code:
new Array[20]; < seu Slots
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)