Hello i have problem with Points
I adding in the main Points System + Shop and i need save points i work 1 day and all one no save
PHP Code:
public save_points(id)
{
new valut = nvault_open("points")
if(valut == INVALID_HANDLE)
set_fail_state("nValut returned invalid handle")
new key[62], value[10], ip[33]
//get_user_ip(id, ip, 32, 1);
get_user_authid(id, ip, 32);
format(key, 61,"%s-points", ip)
format(value, 9,"%d", Point[id])
nvault_set(valut, key, value)
nvault_close(valut)
return PLUGIN_CONTINUE;
}
public load_points(id)
{
new valut = nvault_open("points")
if(valut == INVALID_HANDLE)
set_fail_state("nValut returned invalid handle")
new key[100], ip[33]
//get_user_ip(id, ip, 32, 1);
get_user_authid(id, ip, 32);
formatex(key, 99,"%s-points", ip)
Point[id] = nvault_get(valut, key)
nvault_close(valut)
return PLUGIN_CONTINUE;
}
__________________