try this:
Code:
public level4(id)
{
new frags = get_user_frags(id)
new death = get_user_deaths(id)
if (frags > 59 && death <= 30)
{
new thing[64]
get_cvar_string("offon",thing,63)
new CsTeams:userTeam = cs_get_user_team(id)
if (userTeam == CS_TEAM_T)
{
client_print(id,print_chat,"[MR]: Congrats!! You have reached Level 4!")
cs_set_user_model(id, "leet_t")
set_task(1.0, thing) // also tried like this but dint work
}
else if(userTeam == CS_TEAM_CT)
{
client_print(id,print_chat,"[MR]: Congrats!! You have reached Level 4!")
cs_set_user_model(id, "leet_ct")
set_task(1.0, thing) // I ALSO TRIED LIKE THIS BUT DINT WORK
}
}
}
a function will be called
name of function must be equal to what you stored in the CVAR "offon"
__________________