stats not updating
#7

ok so i tried with the code u showed me;

Код:
CMD:stats(playerid, params[])
{
	new string[128];
	format(string, sizeof(string), "† Kills: %d † Deaths: %d † Experience: %d †", PlayerInfo[playerid][pKills], PlayerInfo[playerid][pDeaths], PlayerInfo[playerid][pExp]);
	SendClientMessage(playerid, COLOR_GREEN, string);

	PlayerInfo[playerid][pKills] ++;
	PlayerInfo[playerid][pDeaths]++;
	PlayerInfo[playerid][pExp]   ++;
	
	format(string, sizeof(string), "† Kills: %d † Deaths: %d † Experience: %d †", PlayerInfo[playerid][pKills], PlayerInfo[playerid][pDeaths], PlayerInfo[playerid][pExp]);
	SendClientMessage(playerid, COLOR_GREEN, string);
	return 1;
}
the first string returns 0 in all the variables but the second returns 1 in each....

what could be the problem? im using an account that i can confirm has several of each (kills,deaths,exp...)

this is my onplayerdeath pretty much

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
	PlayerInfo[killerid][pKills] ++;
	PlayerInfo[playerid][pDeaths] ++;
	PlayerInfo[killerid][pExp] +=5;
	PlayerInfo[killerid][Money] +=15;
	PlayerInfo[playerid][Money] -=5;
	SetPlayerScore(killerid, PlayerInfo[killerid][pExp]);
	ResetPlayerMoney(killerid);
	ResetPlayerMoney(playerid);
	GivePlayerMoney(killerid, PlayerInfo[killerid][Money]);
	SendDeathMessage(killerid, playerid, reason);
        return 1;
}
maybe my account system isnt working properly?
Reply


Messages In This Thread
stats not updating - by facekche - 01.08.2015, 16:26
Re: stats not updating - by xVIP3Rx - 01.08.2015, 16:54
Re: stats not updating - by Keyhead - 01.08.2015, 17:17
Re: stats not updating - by facekche - 01.08.2015, 17:54
Re: stats not updating - by xVIP3Rx - 01.08.2015, 18:21
Re: stats not updating - by facekche - 02.08.2015, 03:37
Re: stats not updating - by facekche - 02.08.2015, 05:06
Re: stats not updating - by xVIP3Rx - 02.08.2015, 05:12
Re: stats not updating - by facekche - 02.08.2015, 05:28
Re: stats not updating - by xVIP3Rx - 02.08.2015, 05:47

Forum Jump:


Users browsing this thread: 2 Guest(s)