只要储存一个数据这样更快吧...
复制程式
new name[33][32], point[33]
public client_putinserver(id)
{
get_user_name(id, name[id], charsmax(name[]))
get_point(id)
}
public get_point(id)
{
if(nvault_get(vault, name[id]))
{
point[id] = nvault_get(vault, name[id])
}
else
{
point[id] = 0
nvault_touch(vault, name[id])
}
}
public save_point(id)
{
new point_num[11]
formatex(point_num, charsmax(point_num) , "%d", point[id])
nvault_set(vault, name[id], point_num)
}
开头我还以为要讲 register_native
不过文中似乎完全没有教到...