Raised This Month: $ Target: $400
 0% 

Checking "developer"


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
znovit
Member
Join Date: Mar 2009
Location: Behind you :=
Old 06-11-2009 , 09:20   Re: Checking "developer"
Reply With Quote #5

This will work
PHP Code:
#include <amxmodx>
 
#define POPUP_DELAY 1.0
 
new ChangedSettings[][] =
{
        
"fps_max 101",
        
"developer 0"
};
 
new 
Title[128] = "To play here you must accept these settings:";
new 
Yes[] = "Yes (Your settings will be changed)";
new 
No[] = "No (You will be kicked)";
new 
KickReason[] = "You were kicked because you got illegal settings.";
 
public 
plugin_init()
{
        
register_plugin("Settings Pop-Up""1.1""hleV");
 
        for (new 
Num 0Num sizeof(ChangedSettings); Num++)
                
format(Title127"%s^n%s"TitleChangedSettings[Num]);
}
 
public 
client_putinserver(Cl)
        
set_task(POPUP_DELAY"ShowMenu"Cl);
 
public 
ShowMenu(Cl)
{
        new 
Menu menu_create(Title"MenuChoice");
 
        
menu_additem(MenuYes);
        
menu_additem(MenuNo);
 
        
menu_setprop(MenuMPROP_PERPAGE0);
        
menu_setprop(MenuMPROP_EXITMEXIT_NEVER);
 
        
menu_display(ClMenu0);
}
 
public 
MenuChoice(ClMenuItem)
{
        switch (++
Item)
        {
                case 
1:
                        for (new 
Num 0Num sizeof(ChangedSettings); Num++)
                                
client_cmd(ClChangedSettings[Num]);
                case 
2:
                        
server_cmd("kick #%d ^"%s^""get_user_userid(Cl), KickReason);
        }
 
        
menu_destroy(Menu);

__________________
znovit 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 13:49.


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