Thread: Heart Health
View Single Post
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 12-19-2016 , 06:15   Re: Heart Health
Reply With Quote #27

Quote:
Originally Posted by Craxor View Post
Bugsy, about number 4:

I'm using them just once, they are 3 different cvars:
My mistake, I didn't notice they were different in hh_hook() . They are the same in respawn_hook(), though.

Quote:
Originally Posted by Craxor View Post
And also about number 9, what do you mean? what i am doing with gArray after? Why gLives and gAuthid should be same if i'm taking number of Lives with gLives and gAuthId is the key in nvault, i don't understand at all here.
Edit: Something like this do you mean:
gLives[33]
gAuthId[35][33]

What I mean is both arrays are for storing a value for each player. You size gLives at 33 (for 32 players), while g_AuthId is sized at 35 (for 34 players). You should be consistent between your variables if they serve the same relative purpose. And yes what I suggested is using Max_Players + 1 to size all player arrays.

Quote:
Originally Posted by Craxor View Post
# Also , bugsy about arrayset() , can i juse use this stock:

I checked arrayset, and i almost the same, is making a loop through the array and set the value for each-one in part so is not big difference: https://github.com/alliedmodders/amx...modx.cpp#L4397
It really doesn't matter how you reset the array, but it makes no sense to use get_players(). Use a for-loop (without get_players() ) or arrayset().
__________________

Last edited by Bugsy; 12-19-2016 at 06:16.
Bugsy is offline