I found this thread and thought it might be a way to handle my
plugin request.
I want it to read and write to the vault file. This piece of code compiles but i get a bad load.
L 08/15/2004 - 22:55:01: [AMXX] Plugin file open error (plugin "firstvisit").
Are there any obvious errors in the code that you can see?
Code:
#include <amxmodx>
#include <vault>
public plugin_init(){
register_plugin("First Visit","0.1","originally tla-nick")
}
/* store client's name in vault, indexed by authid,
if they already have name in vault, extract it first */
public storeName(id) {
new newName[32], oldName[32], authid[32]
get_user_name(id,newName,31)
get_user_authid(id,authid,31)
if (vaultdata_exists(authid))
get_vaultdata(authid,oldName,31)
set_vaultdata(authid,newName)
return PLUGIN_CONTINUE
}
/* remove client data from vault on disconnect */
public client_disconnect(id) {
new authid[32]
get_user_authid(id,authid,31)
if (vaultdata_exists(authid))
remove_vaultdata(authid)
return PLUGIN_CONTINUE
}