08.06.2010, 09:13
How can I make to save the wanted when they will quit the game...
i tried with tthese comands:
on: public OnPlayerLogin(playerid,password[]) i put in that list this:
if( strcmp( key , "WantedLevel" , true ) == 0 ) { val = ini_GetValue( Data ); WantedLevel[playerid] = strval( val ); }
onublic OnPlayerUpdate(playerid) i put
format(var, 32, "WantedLevel=%d\n",WantedLevel[playerid]);fwrite(hFile, var);
and same for public OnPlayerRegister(playerid, password[]
When I quit the game it saves but when login on my account automaticaly set wanted level to 0 (zero)
can someone help...?
i tried with tthese comands:
on: public OnPlayerLogin(playerid,password[]) i put in that list this:
if( strcmp( key , "WantedLevel" , true ) == 0 ) { val = ini_GetValue( Data ); WantedLevel[playerid] = strval( val ); }
onublic OnPlayerUpdate(playerid) i put
format(var, 32, "WantedLevel=%d\n",WantedLevel[playerid]);fwrite(hFile, var);
and same for public OnPlayerRegister(playerid, password[]
When I quit the game it saves but when login on my account automaticaly set wanted level to 0 (zero)
can someone help...?