Kod: Tümünü seç
SaveData(id)
{
new szAuth[33];
new szKey[64];
new szData[256];
get_user_authid(id , szAuth , charsmax(szAuth))
formatex(szKey , 63 , "%s-ID" , szAuth)
formatex(szData, 255, "%i %i %i %i", AuraMode[id], MapLight[id], iFlare[id], nVision[id])
nvault_set(g_Vault, szKey, szData)
}
LoadData(id)
{
new szAuth[33];
new szKey[40];
get_user_authid(id , szAuth , charsmax(szAuth))
formatex(szKey , 63 , "%s-ID" , szAuth)
new szData[256];
nvault_get(g_Vault, szAuth, szData, 255)
new str1[8], str2[8], str3[8], str4[8]
parse(szData, str1, 7, str2, 7, str3, 7, str4, 7)
AuraMode[id] = str_to_num(str1)
MapLight[id] = str_to_num(str2)
iFlare[id] = str_to_num(str3)
nVision[id] = str_to_num(str4)
set_task(0.000001, "ChangeLight", id+TASK_LIGHT, _, _, "b", 1)
}