06.06.2010, 13:57
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:
and here is my PlayerData-enum and Player-Array:
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.
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;
}
pawn Код:
enum PlayerData
{
Kills,
Tode,
Sprache,
ALevel,
Eingeloggt
}
new Player[MAX_PLAYERS][PlayerData];
//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.

