Hi...
I was working on something , like example :
So first we have a number g_Number[33] which is = 500 ...
Then it shows an hud Message : Energy : g_Number[33] which is 500
Then each 5 seconds ... the g_Number[33] is supposed to increase by 10 , which means its supposed to be 511 ... The hud should show 511 ... but it still shows me 500 .. No errors or warnings, everything runs properly..
Guess : My guess is because i have already done this new g_Number[33] = 500 , it only shows 500 , but not sure , Help

..
Script :
PHP Code:
#include <amxmodx>
new g_Number[33] = 500
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "Sam"
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
// Tasks
set_task(0.1, "ShowNumber",_,_,_, "b")
set_task(5.0, "IncreaseNumber",_,_,_, "b")
}
public ShowNumber(id)
{
set_hudmessage(0, 213, 0, 0.60, 0.94, 0, 1.0, 1.0)
show_hudmessage(id, "Number: %i", g_Number[id])
}
public IncreaseNumber(id)
{
if(is_user_connected(id) )
{
g_Number[id] = g_Number[id] + 10
}
}
__________________