Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- static user_team[33][33],PLUGIN[][]={
- "Spec OFF",
- "1.0",
- "Seroff"
- };
- public plugin_init(){
- register_plugin(PLUGIN[0], PLUGIN[1], PLUGIN[2]);
- register_event("TeamInfo", "EVENT_Team", "a");
- }
- public EVENT_Team()
- {
- new Client = read_data(1);
- if(not_check(Client)) return 0;
- read_data(2, user_team[Client], 32);
- if(user_team[Client][0]=='S' || user_team[Client][0] == 'U')
- {
- set_task(5.0,"spect_off",Client);
- }
- return 0;
- }
- public spect_off(id){
- if(user_team[id][0]=='S' || user_team[id][0] == 'U'){
- server_cmd("kick #%d ^"Not accept Spectator^"",get_user_userid(id));
- }
- }
- public client_disconnect(id){
- if(task_exists(id)){
- remove_task(id);
- }
- }
- stock bool:not_check(id){
- new Players[32],Count, i, player;
- get_players(Players, Count, "ch");
- for (i=0; i<Count; i++) {
- player = Players[i];
- if(player!=id) { return true; }
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment