#1

Код:
#include <YSI\y_bit>
#include <foreach>

new
	BitArray:gPlayerWeapons[46]<MAX_PLAYERS>,
	BitArray:gSpawned<MAX_PLAYERS>;
I notice somebody is doing like that, it's something like memory saving. So everyvariable i have to create like this?
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=489897

Not every variable but boolean ones as I can read up there in that guide.

Also, you can save tons of key press on your enter key by not jumping lines for every variable you want to create, like this:

PHP код:
new BitArray:gPlayerWeapons[46]<MAX_PLAYERS>, BitArray:gSpawned<MAX_PLAYERS>; 
Reply
#3

No, bit arrays are created for booleans (true/false), because it can store only 1 bit value.
Reply
#4

How much bit i need, when i store name like

new names[ MAX_PLAYERS ][ MAX_PLAYER_NAME ];
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)