Raised This Month: $ Target: $400
 0% 

kikc all users


Post New Thread Reply   
 
Thread Tools Display Modes
raa
Senior Member
Join Date: Oct 2005
Old 09-02-2007 , 14:26   Re: kikc all users
Reply With Quote #11

Code:
public plugin_init(){     register_plugin("kick_all", "1.0", "kick_all")     register_concmd("kick_all", "kick_all_players", ADMIN_KICK, "<name>") } public kick_all_players(id, level, cid)     {     if(!cmd_access(id, level, cid, 1))         return PLUGIN_HANDLED         new myname[32]     get_user_name(id,myname,31)         client_cmd(id, "amx_leave ^"%s^"", myname)     return PLUGIN_HANDLED }
__________________

Last edited by raa; 09-02-2007 at 14:44.
raa is offline
Qlim4X
Member
Join Date: Jun 2007
Old 09-02-2007 , 22:38   Re: kikc all users
Reply With Quote #12

thx i allready did it with another way but i have a problem with the menu taht i have done

the menu appiars ok but when i press 1 doest call the amx_kickall

any help on this?


Code:
/* AMXMOD X script.
*
* (c) Copyright 2007 Qlim4X
* This file is provided as is (no warranties).
*
* For #Pro.Gather in GrNet. Internal use only.
*
*/

#include <amxmodx>
#include <amxmisc>

public pro_gg(id,level,cid)
{
    if (!cmd_access(id,level,cid,0))
    {
        return PLUGIN_CONTINUE
    }
    set_task(0.5, "sh0")
        set_task(1.0, "gg")
    set_task(1.5, "sh2")
    set_task(2.0, "setpassword")
    client_cmd(id,"pro_kickall")
       return PLUGIN_HANDLED
}



public gg() 
{
    server_cmd("amx_say The Game Is Over GG !!!") 
        server_cmd("amx_say The Game Is Over GG !!!") 
        server_cmd("amx_say The Game Is Over GG !!!") 
        server_cmd("amx_say The Game Is Over GG !!!") 
        server_cmd("amx_say The Game Is Over GG !!!") 
       server_cmd("amx_csay green <<The Game Is Over GG ALL OUT>>")
       server_cmd("amx_csay blue <<The Game Is Over GG ALL OUT>>")
       server_cmd("amx_csay green <<The Game Is Over GG ALL OUT>>")
      server_cmd("amx_csay blue <<The Game Is Over GG ALL OUT>>")
      server_cmd("amx_csay green <<The Game Is Over GG ALL OUT>>")
    
}
public setpassword()
{
    server_cmd("pro_pass progather")
}

public sh2()
{
    server_cmd("amx_show_activity 2")
}

public sh0()
{
    server_cmd("amx_show_activity 0")
}


public kick_all_players(id, level, cid)
{
    if(!cmd_access(id, level, cid, 1))
        return PLUGIN_HANDLED
    new reason[96] 
    read_argv(1, reason, 95)

    new players[32], num, playerid, names[32]
    get_players(players, num)
    
    for(new i = 0; i < num; i++)
    {
        playerid = players[i]
        get_user_name ( playerid, names, 31 )

        if(!is_user_admin(playerid))    
        server_cmd("kick ^"%s^" ^"%s^"",names, reason)
        //client_cmd(playerid, "disconnect")
    }

    return PLUGIN_HANDLED
}

public actionMenu(id,key)
{
 switch(key){
 case 0:{
    client_cmd(id,"amx_kickall ^"GG THX FOR PLAYING @ #PRO.GATHER^"")
      client_cmd(id,"amx_say Kicked All Players")
 }
 case 1:{
 }
 }

 return PLUGIN_HANDLED
}

public showMenu(id,level,cid)
{
 if (!cmd_access(id,level,cid,1)) return PLUGIN_HANDLED
 new menuBody[1024]
 new keys
 keys = (1<<0|1<<1|1<<2|1<<3|1<<4|1<<5|1<<6|1<<7|1<<8|1<<9)
 new len = format(menuBody,1511,"\yProGather Kick All Menu\R^n^n\" )
 len += format( menuBody[len], 1024-len, "^n\w1. YES" )
 len += format( menuBody[len], 1024-len, "^n\w2. NO" )

 show_menu( id, keys, menuBody, -1, "ProGather All Kick Menu By Qlim4X" )

 return PLUGIN_HANDLED
}


public plugin_init()
{
        register_plugin("pro.gather GG","0.1","Qlim4X")
     register_menucmd(register_menuid("Kick All Users By Qlim4X"),1023,"actionMenu")
    register_clcmd("pro_kickall","showMenu",ADMIN_KICK,"kick all menu")
        register_concmd("pro_gg","pro_gg",ADMIN_KICK,"pro_gg - The game is over!")
    register_concmd("amx_kickall","kick_all_players",ADMIN_KICK,"<reason> Kick all players with reason from server except admins");

        return PLUGIN_CONTINUE
}
Qlim4X is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:08.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode