help of score - 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: help of score (
/showthread.php?tid=439383)
help of score -
Xport6050 - 25.05.2013
hey guys when im killing someone in my srv i will get score but when i relog it will gone so how can i save my scres in sript files ladmin\user\ini.sav
Re: help of score -
TheArcher - 25.05.2013
Use an INI saver.
Re: help of score -
Gamer_007 - 25.05.2013
Use Y_Ini or Dini for saving or if u r able to use mysql, then use that
AW: help of score -
Skimmer - 25.05.2013
Do you have Register & Login System in your server?
If yes, you can save it on OnPlayerDisconnect() callback.
If not, create your own Register & Login System
Re: help of score -
Xport6050 - 26.05.2013
guys can i get code bcoz i dont know so much scripting and i have register and login system im using satdm
Re: help of score -
IceBilizard - 26.05.2013
First do
at the top of script
Then go on
pawn Код:
public OnPlayerConnect(playerid)
{
SetPlayerScore(playerid,0);
}
Now do for save stats
pawn Код:
SStats(playerid)
{
dini_IntSet(Pos(playerid),"Score",GetPlayerScore(playerid));
}
Now go for load stats
pawn Код:
LoadStats(playerid)
{
SetPlayerScore(playerid, dini_Int(Pos(playerid),"Score"));
}
After this
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
for(new i=0; i<MAX_PLAYERS; i++)
{
PlayerInfo[i][Score] +=25;//or what you want
}
}
in Last do
pawn Код:
public OnGameModeInit()
{
LoadStats(playerid);
}
Re: help of score -
Xport6050 - 29.05.2013
ty you so much +1 rep