#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
#define StatsDialog 1245
#if defined USE_STATS
CMD:stats(playerid,params[]) {
new string[500], 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];
new string2[128];
format(string2,sizeof(string2),"%s's statistics",PlayerName2(player1));
strcat(string,"Level: %d");
strcat(string,"Kills: %d");
strcat(string,"Deaths: %d");
strcat(string,"Ratio: %0.2f");
strcat(string,"Money: $%d");
strcat(string,"Bank: $%d");
strcat(string,"Time: %d hrs %dmins %d secs");
format(string,sizeof(string),string,
PlayerInfo[player1][Level],PlayerInfo[player1][Kills],PlayerInfo[player1][Deaths],Float:PlayerInfo[player1][Kills]/Float:pDeaths,GetPlayerMoney(playerid1),PlayerInfo[player1][bank],h,m,s);
ShowPlayerDialog(playerid, StatsDialog, DIALOG_STYLE_MSGBOX, string2, string, "Close", "");
format(string,sizeof(string),"");
} else return SendClientMessage(playerid, red, "Player Not Connected!");
}
#endif
F:\Program Files\RBCluBxB v6.5\Gamemodes\SATDM.pwn(32933 -- 32934) : error 017: undefined symbol "playerid1" F:\Program Files\RBCluBxB v6.5\Gamemodes\SATDM.pwn(3293 ![]() Pawn compiler 3.2.3664 Copyright (coffee) 1997-2006, ITB CompuPhase 1 Error. |
#if defined USE_STATS
CMD:stats(playerid,params[]) {
new string[500], 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];
new string2[128];
format(string2,sizeof(string2),"%s's statistics",PlayerName2(player1));
strcat(string,"Level: %d");
strcat(string,"Kills: %d");
strcat(string,"Deaths: %d");
strcat(string,"Ratio: %0.2f");
strcat(string,"Money: $%d");
strcat(string,"Bank: $%d");
strcat(string,"Time: %d hrs %dmins %d secs");
format(string,sizeof(string),string,
PlayerInfo[player1][Level],PlayerInfo[player1][Kills],PlayerInfo[player1][Deaths],Float:PlayerInfo[player1][Kills]/Float:pDeaths,GetPlayerMoney(player1),PlayerInfo[player1][bank],h,m,s);
ShowPlayerDialog(playerid, StatsDialog, DIALOG_STYLE_MSGBOX, string2, string, "Close", "");
format(string,sizeof(string),"");
} else
return SendClientMessage(playerid, red, "Player Not Connected!");
}
#endif