02.08.2015, 05:06
ok so i tried with the code u showed me;
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
maybe my account system isnt working properly?
Код:
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; }
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; }