PHP Code:
public clcmd_noclip(id)
{
if(!is_user_alive(id) || g_iBestClimber != id || g_fStartTime[id])
{
return 1;
}
if(!get_user_noclip(id))
{
set_user_noclip(id,1)
set_hudmessage(0, 255, 0, 0.6, 0.01, 2, 7.0, 8.0, 0.1, 1.0, -1);
show_hudmessage(id, "Noclip Activated.");
}
else
{
set_user_noclip(id,0)
set_hudmessage(0, 255, 0, 0.6, 0.01, 2, 7.0, 8.0, 0.1, 1.0, -1);
show_hudmessage(id, "Noclip Disabled.");
}
return PLUGIN_HANDLED
}
i need a little help with this line
if(!is_user_alive(id) || g_iBestClimber != id || g_fStartTime[id])
first, it`s verified if the user is alive, than if he is the 1337 climber (bestclimber) than if that player have the timer running. if he pass all conditions, he will recieve noclip reward. i want to use noclip if i am only admin, not necessarly bestclimber. i know that something should be added to that line, something like "&& is_user_admin(id)", i`ve tried, but nothing happened, except all players were allowed to use that reward.