Limiting spectator modes
I want to limite spectator mode on my server to:
- Firsts person + Team View only - Locked Chase cam + Team only and restrict rest of views.. i tried to make my own plugin for this.. using this: Code: #include <amxmod> public plugin_init() { //register_clcmd("spec_mode 1", "cmdBlock") //Locked Chase cam //Free Chase cam register_clcmd("spec_mode 2", "cmdBlock") //Free Look register_clcmd("spec_mode 3", "cmdBlock") //register_clcmd("spec_mode 4", "cmdBlock") //First Person //Free overview register_clcmd("spec_mode 5", "cmdBlock") //Chase overview register_clcmd("spec_mode 6", "cmdBlock") } public cmdBlock(id) { return PLUGIN_HANDLED; } but this doesnt work... if i set commands like say etc.. they are very well blocked using this code, but using spec_mode is not blocked. i can still give this command on console to change mode or even use spectator menu or spacebar to change views. any help plz? |
Re: Limiting spectator modes
PHP Code:
|
Re: Limiting spectator modes
But I DONT want to block SPEC_MODE 1 and 4, that is why I have commented those lines...
later on I will enable those options by CVARs... but right now i want to hardcode block all spec_modes EXCEPT 1 and 4 |
Re: Limiting spectator modes
There, that should do what you want for now
|
Re: Limiting spectator modes
Quote:
Code:
Code:
|
Re: Limiting spectator modes
although it compiles but none of this works...
the spec_mode command isnt able to be blocked!!!! i can still give it on console and get whtever view i want |
Re: Limiting spectator modes
Quote:
PHP Code:
PHP Code:
PHP Code:
|
Re: Limiting spectator modes
Quote:
Code:
|
Re: Limiting spectator modes
still no luck ... can u plz check it on your end and then tell me the code that works?
|
Re: Limiting spectator modes
ok guys I finally got it... thx for continuous replies.. which kept me sticking to the project, or else i would have dumped the idea!
and one thing i want to mention that i picked this idea from statsx plugin.. cuz it had a check thingy for currect spectator mode of player.. and i just picked it and modified it for my use. The following code is working fine.. so i am posting it incase anyone needs it or better enhancement or use in some similar project: PHP Code:
|
| All times are GMT -4. The time now is 11:06. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.