[Tutorial] Making a Level and Experience System( With Paydays)
#21

Nice tut!
Reply
#22

How am I suppose to load data on OnPlayerConnect?
Reply
#23

Quote:
Originally Posted by Slavica
View Post
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(playeridname[], value[]);
public 
LoadPlayerData(playeridname[], 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;

Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)