AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   variable numbers (https://forums.alliedmods.net/showthread.php?t=174148)

Compro 12-16-2011 05:44

variable numbers
 
Hello, i dont uderstand one thing

PHP Code:

new HasHe33 ];
new 
HasBothGren33 ];
new 
HasSilent33 ];
new 
HasHealth33 ];
new 
HasArmor33 ];
new 
HasSpeed33 ];
new 
HasGravity33 ];
new 
HasInvis33 ];
new 
HasNoclip33 ];
new 
HasJet33 ];
new 
HasDeagle33 ];
new 
HasLongJump33 ];
new 
HasGlow33 ];
new 
HasNVG33 ];
new 
gName32 char ];
new 
gSteamID32 ];
new 
vKey64 ];
new 
vData64 ]; 

What does those numbers ? 33, 32, 64 ? I get one thing, for example
PHP Code:

HasJet33 

, then it will be 33 jets ? for 32 slot server or what ? and why is 64 number there (vdata) ? Please explain to this , i just cant get it.

Devil259 12-16-2011 06:04

Re: variable numbers
 
This is the number of cell which have the array.

HasJet[ 0 ] = ...
HasJet[ 1 ] = ...
HasJet[ 1 ] = ...
...
HasJet[ 32 ] = ...


gName[ 32 ] because the max lenght of name is 32. So, if your name is "Compro", gName will be :

gName[ 0 ] = 'C'
gName[ 1 ] = 'o'
gName[ 2 ] = 'm'
gName[ 3 ] = 'p'
gName[ 4 ] = 'r'
gName[ 5 ] = 'o'

and the others are empty (excepted the 6, I think it is '^0')


All times are GMT -4. The time now is 12:04.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.