Help with stats
#10

With Using y_ini

enum :
Kills,
Deaths,
under public LoadUser_data(playerid,name[],value[])


pawn Код:
INI_Int("Kills",PlayerInfo[playerid][Kills]);
INI_Int("Deaths",PlayerInfo[playerid][Deaths]);
under onplayerdisconnect:

pawn Код:
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Kills",PlayerInfo[playerid][Kills]);
INI_WriteInt(File,"Deaths",PlayerInfo[playerid][Deaths]);
INI_Close(File);
pawn Код:
public OnPlayerDeath(playerid,killerid,reason)
{
    kills[killerid]++;
    deaths[playerid]++;
    return 1;
}
Reply


Messages In This Thread
Help with stats - by Glossy42O - 21.10.2014, 12:19
Re: Help with stats - by MasonSFW - 21.10.2014, 12:21
Re: Help with stats - by Glossy42O - 21.10.2014, 12:55
Re: Help with stats - by Rudy_ - 21.10.2014, 13:09
Re: Help with stats - by Glossy42O - 21.10.2014, 13:15
Re: Help with stats - by TwinkiDaBoss - 21.10.2014, 13:17
Re: Help with stats - by Glossy42O - 21.10.2014, 13:22
Re: Help with stats - by TwinkiDaBoss - 21.10.2014, 13:33
Re: Help with stats - by Glossy42O - 21.10.2014, 14:08
Re : Help with stats - by AmirRFCNR - 21.10.2014, 14:19

Forum Jump:


Users browsing this thread: 1 Guest(s)