| fxfighter |
06-24-2007 06:48 |
nvault code help
this code dosent load can you help me and plz only post back if you can help me..
Code:
#include <amxmodx>
#include <amxmisc>
#include <nvault>
#include <fun>
#include <cstrike>
#define PLUGIN "nVault"
#define VERSION "1.0"
#define AUTHOR "...."
new g_vault
new IP[33]
new XP[33]
new CLASS[33]
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
g_vault = nvault_open("VAULT")
register_event("ResetHUD","event_spawn","be")
register_event( "DeathMsg", "eDeath", "a" )
}
public client_putinserver(id)
{
LoadData(id)
}
public client_disconnect(id) {
SaveData(id)
XP[id] = 0
CLASS[id] = 0
IP[id] = 0
}
public SaveData(id)
{
new AuthID[35]
get_user_authid(id,AuthID,34)
new vaultkey[64],vaultdata[256]
format(vaultkey,63,"%s-FX",AuthID)
format(vaultdata,255,"%i#%i#",XP[id],CLASS[id])
nvault_set(g_vault,vaultkey,vaultdata)
return PLUGIN_HANDLED
}
public LoadData(id)
{
new AuthID[35]
get_user_authid(id,AuthID,34)
new vaultkey[64],vaultdata[256]
format(vaultkey,63,"%s-FX",AuthID)
format(vaultdata,255,"%i#%i#",XP[id],CLASS[id])
nvault_get(g_vault,vaultkey)
return PLUGIN_HANDLED
}
public event_spawn(id)
{
ShowHud(id)
}
public eDeath( )
{
new attacker = read_data(1)
XP[attacker] += 20
ShowHud(attacker)
}
public ShowHud(id)
{
set_hudmessage(255, 0, 0, -1.0, -1.0, 0, 6.0, 12.0)
show_hudmessage(id, "CLASS: %i^nXP: %i",CLASS[id],XP[id])
}
|