Hey, I just started coding and I need help with small cs 1.6 plugin that I'm trying to make.
I know there is already one plugin that does this for you but I wanted to make my own with some difference.
It's about camera plugin. I'm trying to make when a player types /cam, he goes into 3rd camera mode, and if he is already in 3rd camera mode, he goes into first mode.
But with this code, I can only go in 3rd person, and I cannot come back in 1st person. Why? I think this code should be fine.
Code:
public setview(id)
{
if(set_view(id, CAMERA_NONE)) {
set_view(id, CAMERA_3RDPERSON)
} else if(set_view(id, CAMERA_3RDPERSON)) {
set_view(id, CAMERA_NONE)
return PLUGIN_HANDLED
} else {
return PLUGIN_HANDLED
}
return PLUGIN_HANDLED
}