Hello all,
I have this code which is supposed to modify the bcm plugin so its xpblock gives xp every 6 mins, but the problem is the script I have now gives xp multiple times per second, which is a problem!
This is the script:
PHP Code:
ActionXPBlock(id, ent)
{
if ( cs_get_user_team(id) == CS_TEAM_T )
{
if ( !g_xpblock_used[id] )
{
new property[5];
GetProperty(ent, 1, property);
hnsxp_add_user_xp(id, str_to_num(property));
g_xpblock_used[id] = true;
set_hudmessage(0, 255, 0, 0.01, 0.18, 0, 0.0, 1.0, 0.25, 0.25, 2);
show_hudmessage(id, "You got %i more XP!", str_to_num(property));
}
}
else
{
set_hudmessage(0, 255, 0, 0.01, 0.18, 0, 0.0, 1.0, 0.25, 0.25, 2);
show_hudmessage(id, "Only Terrorists can take XP Block!");
}
}
If someone could add a time limit of 360 secs, or even guide me so I do it myself(even though I do not know a lot of scripting..), I would really appreciate it.. : )
Keep up the good work,
CarbonDioxide