/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
#2

Please help...
Just say if u need more code.
Reply
#3

Quote:
Originally Posted by тħeρяш
But when i use it the fields are free and the stats dont show up...
I don't understand what you mean?
Reply
#4

So when i type in /stats there is show
Quote:

Name: "playername" Sprache: [let out]
Kills: [let out] Tode: [let out]

but there should come up:
Quote:

Name: "playername" Sprache: English
Kills: 1...2...3(however) Tode: same

Reply
#5

Use psprache

pawn Код:
format(string1, sizeof(string1), "Name: %s \tLanguage: %s", pname, psprache);
Reply
#6

Okay, lol i scripted it but didnt use it ROFL

Another question...
I use REL Streamer plugin to make a weaponpickup.
can i display the weapon as pickup? because there is no pickup shown but when i go to the position i get the weapon. ?
Reply
#7

So Well. I fixed my /stats Problem.
I will open a new topic for my second question.
Reply
#8

deleted...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)