Loaaaaaaaad [REP++]
#1

I made a police system it works and when the player disconnected and connected again it load his police level.
The problem that if the server losed and re-open it set the player levle to 0.
Here is some codes might help
PHP код:
stock LoadLevel(name[],value[],playerid)
{
new 
file[60];
format(file,sizeof(file),"/police/%s.ini",playerid);
INI_Open(file);
return 
1;
}
public 
OnPlayerConnect(playerid)
{
LoadLevel("Police",Playerinfo[playerid][pPolice],playerid);
return 
1;
}
public 
OnPlayerDisconnect(playeridreason)
{
    new 
INI:File INI_Open(UserPath(playerid));
    
INI_SetTag(File,"data");
    
INI_WriteInt(File,"Police",PlayerInfo[playerid][pPolice]);
    
INI_Close(File);
    return 
1;

Here is the save and under the command that make a police officer
PHP код:
PlayerInfo[playerid][pPoilce] = level
Please Help !!
I am using Y_ini btw
Reply


Messages In This Thread
Loaaaaaaaad [REP++] - by nezo2001 - 17.01.2015, 22:07
Re : Loaaaaaaaad [REP++] - by FilesMAker - 17.01.2015, 22:26
Re: Loaaaaaaaad [REP++] - by nezo2001 - 17.01.2015, 22:29
Re : Loaaaaaaaad [REP++] - by FilesMAker - 17.01.2015, 22:33
Re: Loaaaaaaaad [REP++] - by nezo2001 - 18.01.2015, 07:52
Re: Loaaaaaaaad [REP++] - by iFiras - 18.01.2015, 11:31

Forum Jump:


Users browsing this thread: 2 Guest(s)