well, i am doing a plugin, but i have a problem...i want to do that when a player is ducking, the viewmodel will be one, but, that when the player is not ducking, the viewmodel will be another...
this is my code.
Code:
// Get currently pressed buttons
static buttons
buttons = pev(id, pev_button)
if(buttons & IN_DUCK)
{
set_pev(id, pev_viewmodel, 0)
}
else
{
set_pev(id, pev_viewmodel, zclass_clawmodel)
}
it is working, but not at all, because if at the time that this function is called, you are ducking, you wont have any viewmodel, but if you stop ducking, you will still without any viewmodel lol!
so...whats the problem?