Raised This Month: $ Target: $400
 0% 

I need help with nVault


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
GolfCart
Junior Member
Join Date: Jun 2013
Old 06-26-2016 , 14:14   Re: I need help with nVault
Reply With Quote #5

PHP Code:
#include <amxmodx>
#include <nvault>  

new g_vault;

public 
plugin_init() { 
    
register_clcmd("say /resetall""RestartUbistava");
    
    
g_vault nvault_open("KnifeSystem");
    if(
g_vault== INVALID_HANDLEset_fail_state("Greska pri otvaranju gVaulta");  
}

public 
client_putinserver(id)
{
    
LoadData(id)
}

public 
client_disconnect(id)
{
    
SaveData(id)
}

public 
SaveData(id

    new 
AuthID[35
    
get_user_authid(id,AuthID,34)
    new 
vaultkey[64],vaultdata[256
 
    
format(vaultkey,63,"%s-Knife",AuthID
    
format(vaultdata,255,"%i",ubistva_igraca[id]) 
    
    
nvault_set(g_vault,vaultkey,vaultdata)
    return 
PLUGIN_CONTINUE 


public 
LoadData(id

    new 
AuthID[35
    
get_user_authid(id,AuthID,34
    new 
vaultkey[64],vaultdata[256
    
    
format(vaultkey,63,"%s-Knife",AuthID
    
format(vaultdata,255,"%i",ubistva_igraca[id]) 
    
    
nvault_get(g_vault,vaultkey,vaultdata,255
    
replace_all(vaultdata255"#"" "
    new 
ubistva[32]
    
parse(vaultdataubistva31
    
ubistva_igraca[id] = str_to_num(ubistva
    return 
PLUGIN_CONTINUE 
}  

public 
plugin_end()
{
    
nvault_close(g_vault)
}

public 
RestartUbistava(id)
{
    
nvault_prune(g_vault0get_systime() + 1)
    
ColorChat(0NORMAL"^4[Knife Mod] ^1Administrator je restartovao ubistva svim igracima.");
    
server_cmd("changelevel de_dust2");

There is also other part of code but it's not connected to this problem.

Last edited by GolfCart; 06-26-2016 at 14:14.
GolfCart is offline
 


Thread Tools
Display Modes

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:55.


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