SA-MP Forums Archive
YSI - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: YSI (/showthread.php?tid=633209)



YSI - Bussyman - 27.04.2017

Код:
#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?


Re: YSI - Toroi - 27.04.2017

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>; 



Re: YSI - raydx - 27.04.2017

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


Re: YSI - Bussyman - 27.04.2017

How much bit i need, when i store name like

new names[ MAX_PLAYERS ][ MAX_PLAYER_NAME ];