Deaths aren't counting help!
#1

pawn Код:
new kills = PlayerInfo[playerid][pKills];
  SetPlayerScore(playerid, kills);
  new Float:Health;
  GetPlayerHealth(playerid, Health);
  if(Health == 0.0)
  {
   PlayerInfo[playerid][pDeaths] += 1;
  }
  GivePlayerMoney(killerid,3000);
  PlayerInfo[killerid][pKills] = PlayerInfo[killerid][pKills] + 1;
  if(team[killerid] != team[playerid])
  {
Can anyone tell me how to get deaths to count cause this isn't working I don't know anything else to do I removed the = sign and it still didn't fix it.
Reply
#2

Quote:
Originally Posted by kujox32
pawn Код:
new kills = PlayerInfo[playerid][pKills];
  SetPlayerScore(playerid, kills);
  new Float:Health;
  GetPlayerHealth(playerid, Health);
  if(Health == 0.0)
  {
  PlayerInfo[playerid][pDeaths] += 1;
  }
  GivePlayerMoney(killerid,3000);
  PlayerInfo[killerid][pKills] = PlayerInfo[killerid][pKills] + 1;
  if(team[killerid] != team[playerid])
  {
Can anyone tell me how to get deaths to count cause this isn't working I don't know anything else to do I removed the = sign and it still didn't fix it.
try this:

pawn Код:
new kills = PlayerInfo[playerid][pKills];
  SetPlayerScore(playerid, kills);
  new Float:Health;
  GetPlayerHealth(playerid, Health);
  if(Health == 0.0)
  {
   kills++;
  }
  GivePlayerMoney(killerid,3000);
  PlayerInfo[killerid][pKills] = kills;
  if(team[killerid] != team[playerid])
  {
Reply
#3

Didn't work. This is my Stats system could anything in here be the problem?

pawn Код:
public ShowStats(playerid,targetid)
{
  if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
    {
        new cash = GetPlayerMoney(targetid);
        new deaths = PlayerInfo[targetid][pDeaths];
        new kills = PlayerInfo[targetid][pKills];
        new name[MAX_PLAYER_NAME];
        GetPlayerName(targetid, name, sizeof(name));
        new Float:px,Float:py,Float:pz;
        GetPlayerPos(targetid, px, py, pz);
        new coordsstring[256];
        SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
        format(coordsstring, sizeof(coordsstring),"*** %s ***",name);
        SendClientMessage(playerid, COLOR_WHITE,coordsstring);
        format(coordsstring, sizeof(coordsstring), "Kills:[%d] Deaths:[%d] Cash:[$%d]",kills,deaths,cash);
        SendClientMessage(playerid, COLOR_GRAD5,coordsstring);
        SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
    }
}
Reply
#4

pawn Код:
PlayerInfo[killerid][pKills]++;
  SetPlayerScore(killerid, PlayerInfo[killerid][pKills]);
  GivePlayerMoney(killerid,3000);
  PlayerInfo[playerid][pDeaths]++;
  if(team[killerid] != team[playerid])
  {
Reply
#5

Quote:
Originally Posted by Killa_
pawn Код:
PlayerInfo[killerid][pKills]++;
  SetPlayerScore(killerid, PlayerInfo[killerid][pKills]);
  GivePlayerMoney(killerid,3000);
  PlayerInfo[playerid][pDeaths]++;
  if(team[killerid] != team[playerid])
  {
Thanks that worked
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)