22.08.2013, 02:02
How can i save variables using for loop when player disconnects ?
Код:
// this doesn't work ;not one piece of data gets saved #define ABC 10 enum Player { something, data[ABC], }; new pInfo[MAX_PLAYERS][Player]; OnPlayerDisconnect(playerid, reason) { new str[20]; new INI:File = ..... INI_WriteInt(File ,"BlaBla" ,pInfo[playerid][something]); for(new i = 0; i < ABC ; i++) { format(str ,sizeof(str) ,"test_%i" ,i); INI_WriteInt(File ,str ,pInfo[playerid][data][i]); } return 1; }