A small review, i can be wrong about some, so let's discuss about them:
1. I think you could add 'these' to _:ItemData enumeration:
PHP Code:
new g_szAuthID[33][35], g_AP[33]
Btw, szAuthId should be 34 not 35.
2. Here
PHP Code:
public plugin_end()
{
for( new Players = 1; Players <= get_maxplayers(); Players++ )
save_ap(Players)
nvault_close(g_Vault)
}
You should use get_players()
3. Your clcmd_say() function is not need , just register directly register_clcmd("say /donat .... and skip su much checks.
4. In save_ap don't use formatex() they are already strings, just use directly them.
5. In load_ap you use get_auth insteand of get_user_authid, i'm asking if is not a mistake? Also same problem, remove formatex() and use directly the string, it is pointless.
EDIT: Now i see, your get_auth() is a function typed by cvar, why is that? Why you don't save just for steam and that's all ?
6. In your register native functions, you don't have to make variables if you use just once the natives, example:
PHP Code:
public native_set_user_ap( Index, iAmount)
{
new id = get_param(1)
new Amount = get_param(2)
g_AP[id] = Amount
}
- >
PHP Code:
public native_set_user_ap( Plugin, Params)
{
g_AP[get_param(1)] = get_param(2)
}
If you use them just once is pointless to insert is value in variables.