Actually, a variable won't be useful here, so it's better to use one of the fuser private entity data.
Go to CreateBlock function:
Find this:
PHP Code:
entity_set_vector(ent, EV_VEC_angles, angles);
entity_set_size(ent, size_min, size_max);
entity_set_int(ent, EV_INT_body, block_type);
Add after:
PHP Code:
entity_set_float(ent,EV_FL_fuser1,-360.0);
Go to ActionXPBlock function.
Make it like this:
PHP Code:
ActionXPBlock(id, ent)
{
if ( cs_get_user_team(id) == CS_TEAM_T )
{
if((get_gametime() - entity_get_float(ent,EV_FL_fuser1)) > 360.0)
{
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));
entity_set_float(ent,EV_FL_fuser1,get_gametime());
}
} 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!");
}
}
I haven't tested it, but it should work.
__________________