Raised This Month: $ Target: $400
 0% 

Change the map and kick all clients


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Rolnaaba
Veteran Member
Join Date: May 2006
Old 07-03-2006 , 22:18   Re: Change the map and kick all clients
Reply With Quote #4

you cant change it in game if u want to make it changeable in game u need to make it like this:
Code:
// Kick all clients by eRik */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Kick All Clients"
#define VERSION "0.1"
#define AUTHOR "eRik"
#define REASON "Mapchanging..."


public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR)
    register_concmd("amx_kickall","kick_all",ADMIN_KICK,"Kick all clients")
register_cvar("mapname", "de_dust2")
    
}


stock kick_all (reason[])
{
    static iPlayers[32],iPlayersnum
    get_players(iPlayers,iPlayersnum)
    
    for(new iCount;iCount < iPlayersnum;iCount++)
        server_cmd("kick #%d %s",get_user_userid(iPlayers[iCount]),REASON)
        set_task(0.2,"changemap")

    return PLUGIN_HANDLED
    
}

public changemap()
{
    server_cmd("changelevel "get_cvar_string("mapname")"")
}

then just change the cvar to w/e u want
(think get_cvar_string should work not sure tho)
__________________
DO NOT PM me about avp mod.

Last edited by Rolnaaba; 07-03-2006 at 22:22.
Rolnaaba is offline
 



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 07:59.


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