ID Bug
#1

hey guys i would like to know how am i abel to fix my ID Bug if i use like /setstat and my id is 0 but if i put ID 1 it is suppose to say that theres no one with that ID but it wont give me like that it gives all to ID 0 so only id 0 Is not bugged please help me
Reply
#2

do you mean this

pawn Код:
#if defined USE_STATS
CMD:stats(playerid,params[]) {
    new string[128], pDeaths, player1, h, m, s;
    if(isnull(params)) player1 = playerid;
    else player1 = strval(params);

    if(IsPlayerConnected(player1)) {
        TotalGameTime(player1, h, m, s);
        if(PlayerInfo[player1][Deaths] == 0) pDeaths = 1; else pDeaths = PlayerInfo[player1][Deaths];
        format(string, sizeof(string), "| %s's Stats:  Level: %d | Kills: %d | Deaths: %d | Ratio: %0.2f | Money: $%d | Bank: $%d | Time: %d hrs %d mins %d secs |",PlayerName2(player1), PlayerInfo[player1][Level],PlayerInfo[player1][Kills], PlayerInfo[player1][Deaths], Float:PlayerInfo[player1][Kills]/Float:pDeaths,GetPlayerMoney(player1),PlayerInfo[player1][bank], h, m, s);
        return SendClientMessage(playerid, green, string);
    } else return SendClientMessage(playerid, red, "Player Not Connected!");
}
#endif
if i have helped you please rep me
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)