/stats bugged
#1

Upon compiling i get no errors but in game all I get is
Код:
Kills: Deaths: Level: Team/Faction:
Please tell me how I am suppose to make it so it tells me how many kills I have I am using Draco Blue's DUDB and DINI
pawn Код:
// on top of script it says Forward ShowPlayerStats(playerid,targetid);
if (strcmp("/stats", cmdtext, true) == 0)
{
    if(logged[playerid] == 1)
{
    ShowStats(playerid,playerid);
}
    return 1;
}
pawn Код:
public ShowStats(playerid,targetid)
{
    new string[256];
    new level = PlayerInfo[targetid][pLevel];
  new kills = PlayerInfo[targetid][pKills];
  new deaths = PlayerInfo[targetid][pDeaths];
  new team = PlayerInfo[targetid][pTeam];
    format(string, sizeof(string), "       **** %s ****      ",playername);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "_____________________________________");
  SendClientMessage(playerid, COLOR_GRAY,string);//playername
    format(string, sizeof(string),"Kills:%s Deaths:%s Level:%s Team/Faction:%s",kills,deaths,level,team);
    SendClientMessage(playerid, COLOR_GRAY,string);//kills deaths etc.
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "_____________________________________");
    return 1;
}
Reply
#2

Remove the forward.

pawn Код:
if (strcmp("/stats", cmdtext, true) == 0)
{
  if(logged[playerid]) ShowStats(playerid,playerid);
  return 1;
}
pawn Код:
stock ShowStats(playerid,targetid)
{
  new string[128];
  SendClientMessage(playerid, COLOR_LIGHTBLUE, "_____________________________________");
  SendClientMessage(playerid, COLOR_GRAY,playername);//playername
  format(string, sizeof(string),"Kills:%i Deaths:%i Level:%i Team/Faction:%i",PlayerInfo[targetid][pKills],PlayerInfo[targetid][pDeaths],PlayerInfo[targetid][pLevel],PlayerInfo[targetid][pTeam]);
  SendClientMessage(playerid, COLOR_GRAY,string);//kills deaths etc.
  SendClientMessage(playerid, COLOR_LIGHTBLUE, "_____________________________________");
  return 1;
}
Reply
#3

still bugged
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)