Question
#1

What #define MAX_SLOTS does?
Reply
#2

Probably define the maximum number of players.
Reply
#3

it will define the Max Slots of the server, you can change it if you get more slots..
for example u have a server with 35 slots u will change it to #define MAX_SLOTS 35
and same to other numbers..
Reply
#4

Yes exactly. It confirms the max players for the server.
Reply
#5

but i think MAX_PLAYERS works the same. and we dont need to define it.
Reply
#6

Depends upon your game mode mate. MAX_SLOTS can be a maximum slots for anything! Post the line where you find it!
Reply
#7

Quote:

#define MAX_SLOTS 48
new NotMoving[MAX_PLAYERS];
new WeaponID[MAX_PLAYERS];
new CheckCrouch[MAX_PLAYERS];
new Ammo[MAX_PLAYERS][MAX_SLOTS];

Is any possible way that this thing may cause this problem ?:

https://sampforum.blast.hk/showthread.php?tid=392961
Reply
#8

defining is like creating a place holder, for example I could do
pawn Код:
#define COST_PISTOL 500
Now when I use the cost of the pistol anywhere in my script I can use COST_PISTOL instead of typing a number.
When I compile the script it will replace all the COST_PISTOL's in my script to 500, so if I want to change the price of the pistol in the future I can just change the define line and recompile.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)