06.02.2015, 14:20
(
Последний раз редактировалось hamzajaved780; 06.02.2015 в 14:20.
Причина: title edit
)
Can some convert this to sql for me so that it save player hunger with name in a sql table "hunger" of database "wgrp"
Код:
public OnPlayerDisconnect(playerid, reason) { new file[256],n[MAX_PLAYER_NAME]; GetPlayerName(playerid,n,MAX_PLAYER_NAME); format(file,sizeof(file),"Stats/%s.txt",n); PInfo[playerid][Hunger] = floatround(GetProgressBarValue(hungry[playerid])); if(dini_Exists(file)) { dini_IntSet(file,"Hunger",floatround(GetProgressBarValue(hungry[playerid]))); return 1; } return 1; } public OnPlayerSpawn(playerid) { new file[256],n[MAX_PLAYER_NAME]; GetPlayerName(playerid,n,MAX_PLAYER_NAME); format(file,sizeof(file),"Stats/%s.txt",n); if(!dini_Exists(file)) { dini_Create(file); dini_IntSet(file,"Hunger",100); }