Raised This Month: $ Target: $400
 0% 

How to: create an admin cmd for reset vault


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
xxxperts
Senior Member
Join Date: Oct 2013
Location: India
Old 05-23-2014 , 00:39   Re: How to: create an admin cmd for reset vault
Reply With Quote #5

PHP Code:
public cmd_ResetXP(idlevelcid)
{
    if(!
cmd_access(idlevelcid2)) return PLUGIN_HANDLED;
    
    new 
iArg[7]; // size of variable must me enough
    
read_argv(1iArgsizeof(iArg) - 1);
    
    new 
input str_to_num(iArg);
    
    if(
input == 1)
    {
        new 
Players[32], iNumid;
        
get_players(PlayersiNum"ch");
        
        
/* if thier are some players online loop and reset their xp and bla bla*/
        
for(--iNumiNum >= 0iNum--)
        {
            
id Players[iNum];
            
            
/* Reset your Variable here if u understood */
            
XP[id] = 0;
            
SaveData(id);
        }
        
        
nvault_prune(iVaultHandle0get_systime() + 1);
        
server_cmd("restart 1"); /* restarting sv depends on you*/
    
}
    
    return 
PLUGIN_CONTINUE;

__________________
All my work is here
xxxperts 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 09:37.


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