View Single Post
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 05-04-2024 , 11:18   Re: Skill points become negative
Reply With Quote #8

Quote:
Originally Posted by stupid0303 View Post
PHP Code:
if(g_skills[id] >= //Click the skill point amount
{
g_skills[id] -= get_cvar_num("each_health")

}
else
if(
g_skills[id] < //If it is lower than this value, it will show that there are insufficient skill points and the menu will not disappear. 
Thank u
According to your method, no errors occurred when converting files.
Then I modified it myself and it was successful.
Chief, another option you have is using clamp()

val = clamp( the value , minimum , maximum )

val will always result in a value between min and max.
__________________
Bugsy is offline