/stats command
#1

Hey gus,

I just made command to check the players stats.
But when i use it the fields are free and the stats dont show up...

CODE:
pawn Код:
CMD:stats(playerid, params[])
{
    new pname[56];
    new psprache[56];
    new string1[256];
    new string2[256];
   
    GetPlayerName(playerid, pname, sizeof(pname));
    if (Player[playerid][Sprache] == GERMAN)
    {
        psprache = "Deutsch";
    }
    else
    {
        psprache = "English";
    }
   
    SendClientMessage(playerid, RED, "----------STATS----------\n");
    if (Player[playerid][Sprache] == GERMAN)
    {
        format(string1, sizeof(string1), "Name: %s \tSprache: %s", pname, Player[playerid][Sprache]);
        format(string2, sizeof(string2), "Kills: %d \tTode: %d", Player[playerid][Kills], Player[playerid][Tode]);
    }
    else
    {
        format(string1, sizeof(string1), "Name: %s \tLanguage: %s", pname, Player[playerid][Sprache]);
        format(string2, sizeof(string2), "Kills: %d \tDeaths: %d", Player[playerid][Kills], Player[playerid][Tode]);
    }
    SendClientMessage(playerid, GREEN, string1);
    SendClientMessage(playerid, GREEN, string2);
    SendClientMessage(playerid, RED, "-----------------------------------\n");
    return 1;
}
and here is my PlayerData-enum and Player-Array:
pawn Код:
enum PlayerData
{
    Kills,
    Tode,
    Sprache,
    ALevel,
    Eingeloggt
}
new Player[MAX_PLAYERS][PlayerData];
Maybe you know the problem.


//EDIT:

Maybe u know how to make a function to check if the player is freezed too.
Because i have to check that for my freeze/unfreeze commands.
Reply


Messages In This Thread
/stats command - by Jonni8 - 06.06.2010, 13:57
Re: /stats command - by Jonni8 - 06.06.2010, 16:11
Re: /stats command - by MadeMan - 06.06.2010, 16:17
Re: /stats command - by Jonni8 - 06.06.2010, 16:29
Re: /stats command - by MadeMan - 06.06.2010, 16:37
Re: /stats command - by Jonni8 - 06.06.2010, 16:52
Re: /stats command - by Jonni8 - 06.06.2010, 17:23
Re: /stats command - by Jonni8 - 06.06.2010, 20:21

Forum Jump:


Users browsing this thread: 1 Guest(s)