Just Started this Scripting thing about a month ago
And as I was Working on Jbextreme Plugin I found a bug in it
that if we change models of Simon Guard or Prisoner which are not complied in one File
Players Can Change the player Models
For e.g.
if i am prisoner I writes in console "model SIMON" it will change into Simon Model
*************
I was planning to fix it by set_task COMMAND but cant figure out how will it work
the code i wrote it given below
******
PHP Code:
public plugin_init()
{
set_task(5.0, "Model_check", 0, _, _, "b")
}
public Model_check(id)
{
if(cs_get_user_team(id) == CS_TEAM_CT)
{
if(user_Simon [id])
{
cs_set_user_model(id, "Simon")
}
else if(Zombie_Day)
{
cs_set_user_model(id, "zombie")
}
else
{
cs_set_user_model(id, "guard")
}
}
if(cs_get_user_team(id) == CS_TEAM_T)
{
cs_set_user_model(id, "prisoners")
}
}