Help with Spec Kick plugin for CS 1.6
Heyall,
I've been lurking these forums for the past 3 days trying to iron out my spec kick plugin but it just doesn't work so I've decided to post the code here and see what you guys think. I coded it for my CS 1.6 server so there are no STEAM checks or anything. It's purpose is to kick users that are in SPECTATOR mode, connected but don't have the immunity bit set at the start of a round when there are 10 or more players. Code:
#include <amxmodx>- The code is stretched out (cascading ifs) so that I could code in a simpler manner but it'll be optimized once it starts working. - I've tried coding it with cs_user_team_get but it didn't work (right after the immunity bit check, I did have an include for cstrike) Code:
if (cs_user_team_get(i) == 3) {If you've got an idea, please help! Edit: - I've left out the is_player_alive() check because I don't know if spectators are considered dead or alive. |
instead of i use Players[i]
|
Quote:
|
yes also u can get their flag isntead of checking team. flag is FL_SPECTATOR or something like that.
|
Okay, I'll give it a try...
I've changed the team checking "if" to: Code:
if ((team != 0 && team != 1) || get_user_flags(Players[i])&FL_SPECTATOR) { |
cant do this
get_user_flags(Players[i])&FL_SPECTATOR need to include engine module and do this Code:
|
Quote:
BTW, is there any documentation or primers for programing AMX/AMXX plugins? I probably didn't do enough research before asking about my problem but I've found very little help (except on the AMX and AMXX forums) about how I should do stuff. |
hmm include files is proly all u need to look at. not much documentation on scripting.
|
| All times are GMT -4. The time now is 17:13. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.