[Tutorial] Making a Level and Experience System( With Paydays) - 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)
+---- Forum: Tutorials (
https://sampforum.blast.hk/forumdisplay.php?fid=70)
+---- Thread: [Tutorial] Making a Level and Experience System( With Paydays) (
/showthread.php?tid=377207)
Re: Making a Level and Experience System( With Paydays) -
x96664 - 08.11.2012
Nice tut!
Re: Making a Level and Experience System( With Paydays) -
Slavica - 06.07.2017
How am I suppose to load data on OnPlayerConnect?
Re: Making a Level and Experience System( With Paydays) -
SteSte - 06.07.2017
Quote:
Originally Posted by Slavica
How am I suppose to load data on OnPlayerConnect?
|
*BUMP
Add this on top of your script, after the defines if you like.
And list the data you want to load
PHP Code:
forward LoadPlayerData(playerid, name[], value[]);
public LoadPlayerData(playerid, name[], value[])
{
INI_Int("Level", PlayerInfo[playerid][Level]); //Example, if you want to load the player's level
return 1;
}
PHP Code:
OnPlayerConnect(playerid)
{
if(fexist(UserPath(playerid)))
{
INI_ParseFile(UserPath(playerid), "LoadPlayerData", .bExtra = true, .extra = playerid); //Add this onplayerconnect
}
return 1;
}