Raised This Month: $ Target: $400
 0% 

nvault code help


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
fxfighter
Veteran Member
Join Date: Feb 2007
Location: Trollhättan
Old 06-24-2007 , 06:48   nvault code help
Reply With Quote #1

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])
}
__________________
If one of my plugins become broken, contact me by mail. [email protected]

Last edited by fxfighter; 06-24-2007 at 06:49. Reason: no life
fxfighter is offline
Send a message via MSN to fxfighter
 



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 21:28.


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