Save Score Problem !! - 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: Save Score Problem !! (
/showthread.php?tid=295670)
Save Score Problem !! -
IvancheBG - 07.11.2011
Hi all I have a problem when i do score in my server And then exit it and connect again my score is 0 why ?? Please Helpp
Re: Save Score Problem !! -
Michael@Belgium - 07.11.2011
It doesn't save the score on OnPlayerDisconnect() ?! So make it save
Re: Save Score Problem !! -
IvancheBG - 07.11.2011
How sorry but I dont know how
Re: Save Score Problem !! -
Michael@Belgium - 07.11.2011
Show the code of OnPlayerDisconnect()
Re: Save Score Problem !! -
IvancheBG - 07.11.2011
Here is my code:
Код:
public OnPlayerDisconnect(playerid, reason)
{
new
string[64],
name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,MAX_PLAYER_NAME);
switch(reason)
{
case 0: format(string,sizeof string,"%s left the server. (Timed out)",name);
case 1: format(string,sizeof string,"%s left the server. (Leaving)",name);
case 2: format(string,sizeof string,"%s left the server. (Kicked/Banned)",name);
}
SendClientMessageToAll(0xFFFFFFAA,string);
}
return 1;
}
Re: Save Score Problem !! -
TheArcher - 07.11.2011
You have to save the player stats details on a file or database.
Re : Re: Save Score Problem !! -
Alvin007 - 07.11.2011
Quote:
Originally Posted by IvancheBG
Here is my code:
Код:
public OnPlayerDisconnect(playerid, reason)
{
new
string[64],
name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,MAX_PLAYER_NAME);
switch(reason)
{
case 0: format(string,sizeof string,"%s left the server. (Timed out)",name);
case 1: format(string,sizeof string,"%s left the server. (Leaving)",name);
case 2: format(string,sizeof string,"%s left the server. (Kicked/Banned)",name);
}
SendClientMessageToAll(0xFFFFFFAA,string);
}
return 1;
}
|
There are many tuts about registering , saving score ; using dini , Y_ini.. Go to Tutorials section.
Re: Save Score Problem !! -
Michael@Belgium - 07.11.2011
Yes, there is nothing to save if the player leaves the server ... and as above ^ search for tuts for saving score etc
Re: Save Score Problem !! -
IvancheBG - 07.11.2011
I am with Ladmin and still it dont saves the score when i leave and connect the server : ((
Re: Save Score Problem !! -
IvancheBG - 07.11.2011
Ok i tried this
http://forum.sa-mp.com/showthread.ph...ght=save+score and still doesnt work