SA-MP Forums Archive
DOF2 doesn't saving - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: DOF2 doesn't saving (/showthread.php?tid=581337)



DOF2 doesn't saving - Lirbo - 12.07.2015

idk why but after someone is re-logging or server restarting it doesn't saving his progress, it's saving only mine. why?

PHP код:
public OnPlayerDisconnect(playeridreason)
{
    
DOF2_SaveFile();
    
DOF2_Exit();
    return 
1;




Re: DOF2 doesn't saving - dominik523 - 12.07.2015

This shows us nothing. Please put the code of the functions that are not working properly.


Re: DOF2 doesn't saving - Lirbo - 12.07.2015

Quote:
Originally Posted by dominik523
Посмотреть сообщение
This shows us nothing. Please put the code of the functions that are not working properly.
It's not only one code, it's everything.

here's an example for a code for changing skin
PHP код:
CMD:setskin(playerid,params[]){
LoggedCMD TAdminCMD
if(sscanf(params,"ui",p[0],p[1])) return MSG(playerid,C_RED,"[ERROR] {ff7777}Usage: /SetSkin [ID] [Skin ID]");
if(
p[1]<|| p[1]>311) return MSG(playerid,C_RED,"[ERROR] {ff7777}Minimum 1 Maximum 311.");
CCMD
DOF2_SetInt
(pFile(p[0]),"Skin",p[1]);
SetPlayerSkin(p[0],p[1]);
GetPlayerPos(p[0],F[0],F[1],F[2]);
SetPlayerPos(p[0],F[0],F[1],F[2]+0.1);
format(String,sizeof(String),"[Admin] You've set %s's skin to %s",GetName(p[0]),Comma(p[1]));
MSG(playerid,C_GRAY,String);
format(String,sizeof(String),"[Admin] %s has set your skin to %s",GetName(playerid),Comma(p[1]));
MSG(p[0],C_GRAY,String);
return 
1;} 



Re: DOF2 doesn't saving - dominik523 - 12.07.2015

If something doesn't work when the user disconnects, then you should show the code from OnPlayerDisconnect, not a command for changing skin because that doesn't help at all.
I meant on codes from DOF2_SaveFile.


Re: DOF2 doesn't saving - Lirbo - 12.07.2015

Quote:
Originally Posted by dominik523
Посмотреть сообщение
This shows us nothing. Please put the code of the functions that are not working properly.
Quote:
Originally Posted by dominik523
Посмотреть сообщение
If something doesn't work when the user disconnects, then you should show the code from OnPlayerDisconnect, not a command for changing skin because that doesn't help at all.
I meant on codes from DOF2_SaveFile.
what do you mean? it's whole my public of OnPlayerDisconnect, it's not a part of it.