Raised This Month: $ Target: $400
 0% 

HELP with some codes.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
lolzin123
Member
Join Date: Apr 2009
Old 05-28-2009 , 15:11   HELP with some codes.
Reply With Quote #1

GodMode:

PHP Code:
case 6// GodMode
        
if( get_user_flags(plr0)&ADMIN_KICK )
        {
            if (!
get_user_godmode(plr))     
            {
                
set_user_godmode(plr,1);
                
                new 
szName[32];
                
get_user_name(plrszName32);
    
                
fnGreenChat(0"[BCM] %s ligou o GodMode."szName);
            }
        }
        else 
        {
            
set_user_godmode(plr,0);
            
            new 
szName[32];
            
get_user_name(plrszName32);
    
            
fnGreenChat(0"[BCM] %s desligou o GodMode."szName);
        }
    } 
I want every time you press the button, turn on or off.

AND SAVE/LOAD:
PHP Code:
case 5// Save/Load
        
{
            new 
szTitle[49];
            
format(szTitle48"Load Menu - Current: %s"gCurConfig);
            
            new 
menu menu_create(szTitle"mnuLoad"0);
            
            new 
szAccessFlag[2];
            
get_pcvar_string(gCvarAccessLoadszAccessFlag1);
            new 
accessLoad read_flags(szAccessFlag);
            
            new 
dir open_dir(gDir""0);
            
            new 
szFileName[65];
            while( 
next_file(dirszFileName64) )
            {
                if( 
szFileName[0] == '.' )
                {
                    continue;
                }
                
                
replace(szFileName64".txt""");
                
menu_additem(menuszFileName""accessLoad, -1);
            }
            
close_dir(dir);
            
            
menu_additem(menu"New Config""1"0, -1);
            
            
menu_additem(menu"Save""2"0, -1);
            {
            new 
szName[32];
            
get_user_name(plrszName31);
            
            
fnGreenChat(0"[BCM] %s saved config ^"%s^", %i objects."szName,
                
gCurConfigfnSave());
            }
            
            
menu_setprop(menuMPROP_EXITNAME"Main Menu");
            
            
menu_display(plrmenu0);
            
            return 
PLUGIN_CONTINUE;
            
            
/*new ent = fnGetAimEnt(plr);
            
            new type = fnGetObjectType(ent);
            if( type && type != 99 )
            {
                new szName[32];
                pev(ent, pev_targetname, szName, 31);
                
                if( szName[0] == '^0' )
                {
                    copy(szName, 31, "Unknown");
                }
                
                fnGreenChat(plr, "[KzM] Creator: %s", szName);
            }
            else
            {
                fnGreenChat(plr, "[KzM] Aim at an object first.");
            }*/
        

I want to save, create cfg's, and load.Because saving has a bug.

Any help will be very grateful.
lolzin123 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:47.


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