Stats -
[]Allex[] - 13.11.2012
pawn Код:
C:\Users\Alex\Desktop\EvoOfStunt\filterscripts\WAdmin.pwn(6508) : warning 213: tag mismatch
C:\Users\Alex\Desktop\EvoOfStunt\filterscripts\WAdmin.pwn(6528) : warning 213: tag mismatch
C:\Users\Alex\Desktop\EvoOfStunt\filterscripts\WAdmin.pwn(6550) : warning 213: tag mismatch
pawn Код:
CMD:stats( playerid , params[] )
{
new str[ 1024 ], str2[ 1024 ], str3[ 2048 ], pDeaths, Player, h, m, s;
if ( !sscanf( params, "u", Player ) )
{
TotalGameTime( Player, h, m, s );
if ( PlayerInfo[ Player ][ Deaths ] == 0 ) pDeaths = 1; else pDeaths = PlayerInfo[ Player ][ Deaths ];
format( str, sizeof( str ), "{FFFF00}Your Stats:\n\n\
{00FF00}^^ Kills: {FFFFFF}%d\n\
{00FF00}^^ Deaths: {FFFFFF}%d\n\
{00FF00}^^ Ratio: {FFFFFF}%0.2f\n\
{00FF00}^^ Moneys: {FFFFFF}%d{00FF00}$\n\
{00FF00}^^ Score: {FFFFFF}%d\n", PlayerInfo[ playerid ][ Kills ], PlayerInfo[ playerid ][ Deaths ], Float:PlayerInfo[ playerid ][ Kills ]/Float:pDeaths, GetPlayerMoney( playerid ), GetPlayerScore( playerid ) );
format( str2, sizeof( str2 ), "%s{00FF00}^^ Online Time: {FFFFFF}%d Hrs | %d Min | %d Sec\n\
{00FF00}^^ Coins: {FFFFFF}%d\n\
{00FF00}^^ Race Score: {FFFFFF}%d\n\
{00FF00}^^ DeathMatch Score: {FFFFFF}%d\n\
{00FF00}^^ Admin Level: {FFFFFF}%d\n", str, h, m, s, PlayerInfo[ playerid ][ Coins ], PlayerInfo[ playerid ][ DeathMatch ], PlayerInfo[ playerid ][ RaceScore ], PlayerInfo[ playerid ][ Level ] );
format( str3, sizeof( str3 ), "%s{00FF00}^^ V.I.P Level: {FFFFFF}%d\n\
{00FF00}^^ Logged: {FFFFFF}%d\n\
{00FF00}^^ Player Warns: {FFFFFF}%d\n", str2, PlayerInfo[ playerid ][ Vip ], PlayerInfo[ playerid ][ LoggedIn ], PlayerInfo[ playerid ][ Warnings ] );
return ShowPlayerDialog( playerid, YStats, DIALOG_STYLE_MSGBOX, "{00FF00}Stats:", str3, "Quit", "" );
}
else
{
if ( Player == playerid )
{
format( str, sizeof( str ), "{FFFF00}Your Stats:\n\n\
{00FF00}^^ Kills: {FFFFFF}%d\n\
{00FF00}^^ Deaths: {FFFFFF}%d\n\
{00FF00}^^ Ratio: {FFFFFF}%0.2f\n\
{00FF00}^^ Moneys: {FFFFFF}%d{00FF00}$\n\
{00FF00}^^ Score: {FFFFFF}%d\n", PlayerInfo[ playerid ][ Kills ], PlayerInfo[ playerid ][ Deaths ], Float:PlayerInfo[ playerid ][ Kills ]/Float:pDeaths, GetPlayerMoney( playerid ), GetPlayerScore( playerid ) );
format( str2, sizeof( str2 ), "%s{00FF00}^^ Online Time: {FFFFFF}%d Hrs | %d Min | %d Sec\n\
{00FF00}^^ Coins: {FFFFFF}%d\n\
{00FF00}^^ Race Score: {FFFFFF}%d\n\
{00FF00}^^ DeathMatch Score: {FFFFFF}%d\n\
{00FF00}^^ Admin Level: {FFFFFF}%d\n", str, h, m, s, PlayerInfo[ playerid ][ Coins ], PlayerInfo[ playerid ][ DeathMatch ], PlayerInfo[ playerid ][ RaceScore ], PlayerInfo[ playerid ][ Level ] );
format( str3, sizeof( str3 ), "%s{00FF00}^^ V.I.P Level: {FFFFFF}%d\n\
{00FF00}^^ Logged: {FFFFFF}%d\n\
{00FF00}^^ Player Warns: {FFFFFF}%d\n", str2, PlayerInfo[ playerid ][ Vip ], PlayerInfo[ playerid ][ LoggedIn ], PlayerInfo[ playerid ][ Warnings ] );
}
else
{
if ( !IsPlayerConnected( Player ) ) return SendClientMessage( playerid, red, "ERROR: Player not connected" );
TotalGameTime( Player, h, m, s );
if ( PlayerInfo[ Player ][ Deaths ] == 0 ) pDeaths = 1; else pDeaths = PlayerInfo[ Player ][ Deaths ];
format( str, sizeof( str ), "{FFFF00}%s's {E60000}Stats:\n\
{00FF00}^^ Kills: {FFFFFF}%d\n\
{00FF00}^^ Deaths: {FFFFFF}%d\n\
{00FF00}^^ Ratio: {FFFFFF}%0.2f\n\
{00FF00}^^ Moneys: {FFFFFF}%d{00FF00}$\n\
{00FF00}^^ Score: {FFFFFF}%d\n", PlayerName2( Player ), PlayerInfo[ Player ][ Kills ], PlayerInfo[ Player ][ Deaths ], Float:PlayerInfo[ Player ][ Kills ]/Float:pDeaths, GetPlayerMoney( Player ), GetPlayerScore( Player ) );
format( str2, sizeof( str2 ), "%s{00FF00}^^ Online Time: {FFFFFF}%d Hrs | %d Min | %d Sec\n\
{00FF00}^^ Coins: {FFFFFF}%d\n\
{00FF00}^^ Race Score: {FFFFFF}%d\n\
{00FF00}^^ DeathMatch Score: {FFFFFF}%d\n\
{00FF00}^^ Admin Level: {FFFFFF}%d\n", str, h, m, s, PlayerInfo[ Player ][ Coins ], PlayerInfo[ Player ][ DeathMatch ], PlayerInfo[ Player ][ RaceScore ], PlayerInfo[ Player ][ Level ] );
format( str3, sizeof( str3 ), "%s{00FF00}^^ V.I.P Level: {FFFFFF}%d\n\
{00FF00}^^ Logged: {FFFFFF}%d\n\
{00FF00}^^ Player Warns: {FFFFFF}%d\n", str2, PlayerInfo[ Player ][ Vip ], PlayerInfo[ Player ][ LoggedIn ], PlayerInfo[ Player ][ Warnings ] );
return ShowPlayerDialog( playerid, SStats, DIALOG_STYLE_MSGBOX, "{00FF00}Stats:", str2, "Quit", "" );
}
}
return 1;
}
How can I Rezolve that warnings ?
Re: Stats -
Konstantinos - 13.11.2012
Show the lines 6508, 6528, 6550
Re: Stats -
Team_PRO - 13.11.2012
You Just Forgot To Line It
Try This
PHP код:
CMD:stats( playerid , params[] )
{
new str[ 1024 ], str2[ 1024 ], str3[ 2048 ], pDeaths, Player, h, m, s;
if ( !sscanf( params, "u", Player ) )
{
TotalGameTime( Player, h, m, s );
if ( PlayerInfo[ Player ][ Deaths ] == 0 ) pDeaths = 1; else pDeaths = PlayerInfo[ Player ][ Deaths ];
format( str, sizeof( str ), "{FFFF00}Your Stats:\n\n\
{00FF00}^^ Kills: {FFFFFF}%d\n\
{00FF00}^^ Deaths: {FFFFFF}%d\n\
{00FF00}^^ Ratio: {FFFFFF}%0.2f\n\
{00FF00}^^ Moneys: {FFFFFF}%d{00FF00}$\n\
{00FF00}^^ Score: {FFFFFF}%d\n", PlayerInfo[ playerid ][ Kills ], PlayerInfo[ playerid ][ Deaths ], Float:PlayerInfo[ playerid ][ Kills ]/Float:pDeaths, GetPlayerMoney( playerid ), GetPlayerScore( playerid ) );
format( str2, sizeof( str2 ), "%s{00FF00}^^ Online Time: {FFFFFF}%d Hrs | %d Min | %d Sec\n\
{00FF00}^^ Coins: {FFFFFF}%d\n\
{00FF00}^^ Race Score: {FFFFFF}%d\n\
{00FF00}^^ DeathMatch Score: {FFFFFF}%d\n\
{00FF00}^^ Admin Level: {FFFFFF}%d\n", str, h, m, s, PlayerInfo[ playerid ][ Coins ], PlayerInfo[ playerid ][ DeathMatch ], PlayerInfo[ playerid ][ RaceScore ], PlayerInfo[ playerid ][ Level ] );
format( str3, sizeof( str3 ), "%s{00FF00}^^ V.I.P Level: {FFFFFF}%d\n\
{00FF00}^^ Logged: {FFFFFF}%d\n\
{00FF00}^^ Player Warns: {FFFFFF}%d\n", str2, PlayerInfo[ playerid ][ Vip ], PlayerInfo[ playerid ][ LoggedIn ], PlayerInfo[ playerid ][ Warnings ] );
return ShowPlayerDialog( playerid, YStats, DIALOG_STYLE_MSGBOX, "{00FF00}Stats:", str3, "Quit", "" );
}
else
{
if ( Player == playerid )
{
format( str, sizeof( str ), "{FFFF00}Your Stats:\n\n\
{00FF00}^^ Kills: {FFFFFF}%d\n\
{00FF00}^^ Deaths: {FFFFFF}%d\n\
{00FF00}^^ Ratio: {FFFFFF}%0.2f\n\
{00FF00}^^ Moneys: {FFFFFF}%d{00FF00}$\n\
{00FF00}^^ Score: {FFFFFF}%d\n", PlayerInfo[ playerid ][ Kills ], PlayerInfo[ playerid ][ Deaths ], Float:PlayerInfo[ playerid ][ Kills ]/Float:pDeaths, GetPlayerMoney( playerid ), GetPlayerScore( playerid ) );
format( str2, sizeof( str2 ), "%s{00FF00}^^ Online Time: {FFFFFF}%d Hrs | %d Min | %d Sec\n\
{00FF00}^^ Coins: {FFFFFF}%d\n\
{00FF00}^^ Race Score: {FFFFFF}%d\n\
{00FF00}^^ DeathMatch Score: {FFFFFF}%d\n\
{00FF00}^^ Admin Level: {FFFFFF}%d\n", str, h, m, s, PlayerInfo[ playerid ][ Coins ], PlayerInfo[ playerid ][ DeathMatch ], PlayerInfo[ playerid ][ RaceScore ], PlayerInfo[ playerid ][ Level ] );
format( str3, sizeof( str3 ), "%s{00FF00}^^ V.I.P Level: {FFFFFF}%d\n\
{00FF00}^^ Logged: {FFFFFF}%d\n\
{00FF00}^^ Player Warns: {FFFFFF}%d\n", str2, PlayerInfo[ playerid ][ Vip ], PlayerInfo[ playerid ][ LoggedIn ], PlayerInfo[ playerid ][ Warnings ] );
}
else
{
if ( !IsPlayerConnected( Player ) ) return SendClientMessage( playerid, red, "ERROR: Player not connected" );
TotalGameTime( Player, h, m, s );
if ( PlayerInfo[ Player ][ Deaths ] == 0 ) pDeaths = 1; else pDeaths = PlayerInfo[ Player ][ Deaths ];
format( str, sizeof( str ), "{FFFF00}%s's {E60000}Stats:\n\
{00FF00}^^ Kills: {FFFFFF}%d\n\
{00FF00}^^ Deaths: {FFFFFF}%d\n\
{00FF00}^^ Ratio: {FFFFFF}%0.2f\n\
{00FF00}^^ Moneys: {FFFFFF}%d{00FF00}$\n\
{00FF00}^^ Score: {FFFFFF}%d\n", PlayerName2( Player ), PlayerInfo[ Player ][ Kills ], PlayerInfo[ Player ][ Deaths ], Float:PlayerInfo[ Player ][ Kills ]/Float:pDeaths, GetPlayerMoney( Player ), GetPlayerScore( Player ) );
format( str2, sizeof( str2 ), "%s{00FF00}^^ Online Time: {FFFFFF}%d Hrs | %d Min | %d Sec\n\
{00FF00}^^ Coins: {FFFFFF}%d\n\
{00FF00}^^ Race Score: {FFFFFF}%d\n\
{00FF00}^^ DeathMatch Score: {FFFFFF}%d\n\
{00FF00}^^ Admin Level: {FFFFFF}%d\n", str, h, m, s, PlayerInfo[ Player ][ Coins ], PlayerInfo[ Player ][ DeathMatch ], PlayerInfo[ Player ][ RaceScore ], PlayerInfo[ Player ][ Level ] );
format( str3, sizeof( str3 ), "%s{00FF00}^^ V.I.P Level: {FFFFFF}%d\n\
{00FF00}^^ Logged: {FFFFFF}%d\n\
{00FF00}^^ Player Warns: {FFFFFF}%d\n", str2, PlayerInfo[ Player ][ Vip ], PlayerInfo[ Player ][ LoggedIn ], PlayerInfo[ Player ][ Warnings ] );
return ShowPlayerDialog( playerid, SStats, DIALOG_STYLE_MSGBOX, "{00FF00}Stats:", str2, "Quit", "" );
}
}
return 1;
}
If YOu Got Error This
PHP код:
CMD:stats( playerid , params[] )
{
new str[ 1024 ], str2[ 1024 ], str3[ 2048 ], pDeaths, Player, h, m, s;
if ( !sscanf( params, "u", Player ) )
{
TotalGameTime( Player, h, m, s );
if ( PlayerInfo[ Player ][ Deaths ] == 0 ) pDeaths = 1; else pDeaths = PlayerInfo[ Player ][ Deaths ];
format( str, sizeof( str ), "{FFFF00}Your Stats:\n\n\
{00FF00}^^ Kills: {FFFFFF}%d\n\
{00FF00}^^ Deaths: {FFFFFF}%d\n\
{00FF00}^^ Ratio: {FFFFFF}%0.2f\n\
{00FF00}^^ Moneys: {FFFFFF}%d{00FF00}$\n\
{00FF00}^^ Score: {FFFFFF}%d\n", PlayerInfo[ playerid ][ Kills ], PlayerInfo[ playerid ][ Deaths ], Float:PlayerInfo[ playerid ][ Kills ]/Float:pDeaths, GetPlayerMoney( playerid ), GetPlayerScore( playerid ) );
format( str2, sizeof( str2 ), "%s{00FF00}^^ Online Time: {FFFFFF}%d Hrs | %d Min | %d Sec\n\
{00FF00}^^ Coins: {FFFFFF}%d\n\
{00FF00}^^ Race Score: {FFFFFF}%d\n\
{00FF00}^^ DeathMatch Score: {FFFFFF}%d\n\
{00FF00}^^ Admin Level: {FFFFFF}%d\n", str, h, m, s, PlayerInfo[ playerid ][ Coins ], PlayerInfo[ playerid ][ DeathMatch ], PlayerInfo[ playerid ][ RaceScore ], PlayerInfo[ playerid ][ Level ] );
format( str3, sizeof( str3 ), "%s{00FF00}^^ V.I.P Level: {FFFFFF}%d\n\
{00FF00}^^ Logged: {FFFFFF}%d\n\
{00FF00}^^ Player Warns: {FFFFFF}%d\n", str2, PlayerInfo[ playerid ][ Vip ], PlayerInfo[ playerid ][ LoggedIn ], PlayerInfo[ playerid ][ Warnings ] );
return ShowPlayerDialog( playerid, YStats, DIALOG_STYLE_MSGBOX, "{00FF00}Stats:", str3, "Quit", "" );
}
else
{
if ( Player == playerid )
{
format( str, sizeof( str ), "{FFFF00}Your Stats:\n\n\
{00FF00}^^ Kills: {FFFFFF}%d\n\
{00FF00}^^ Deaths: {FFFFFF}%d\n\
{00FF00}^^ Ratio: {FFFFFF}%0.2f\n\
{00FF00}^^ Moneys: {FFFFFF}%d{00FF00}$\n\
{00FF00}^^ Score: {FFFFFF}%d\n", PlayerInfo[ playerid ][ Kills ], PlayerInfo[ playerid ][ Deaths ], Float:PlayerInfo[ playerid ][ Kills ]/Float:pDeaths, GetPlayerMoney( playerid ), GetPlayerScore( playerid ) );
format( str2, sizeof( str2 ), "%s{00FF00}^^ Online Time: {FFFFFF}%d Hrs | %d Min | %d Sec\n\
{00FF00}^^ Coins: {FFFFFF}%d\n\
{00FF00}^^ Race Score: {FFFFFF}%d\n\
{00FF00}^^ DeathMatch Score: {FFFFFF}%d\n\
{00FF00}^^ Admin Level: {FFFFFF}%d\n", str, h, m, s, PlayerInfo[ playerid ][ Coins ], PlayerInfo[ playerid ][ DeathMatch ], PlayerInfo[ playerid ][ RaceScore ], PlayerInfo[ playerid ][ Level ] );
format( str3, sizeof( str3 ), "%s{00FF00}^^ V.I.P Level: {FFFFFF}%d\n\
{00FF00}^^ Logged: {FFFFFF}%d\n\
{00FF00}^^ Player Warns: {FFFFFF}%d\n", str2, PlayerInfo[ playerid ][ Vip ], PlayerInfo[ playerid ][ LoggedIn ], PlayerInfo[ playerid ][ Warnings ] );
}
else
{
if ( !IsPlayerConnected( Player ) ) return SendClientMessage( playerid, red, "ERROR: Player not connected" );
TotalGameTime( Player, h, m, s );
if ( PlayerInfo[ Player ][ Deaths ] == 0 ) pDeaths = 1; else pDeaths = PlayerInfo[ Player ][ Deaths ];
format( str, sizeof( str ), "{FFFF00}%s's {E60000}Stats:\n\
{00FF00}^^ Kills: {FFFFFF}%d\n\
{00FF00}^^ Deaths: {FFFFFF}%d\n\
{00FF00}^^ Ratio: {FFFFFF}%0.2f\n\
{00FF00}^^ Moneys: {FFFFFF}%d{00FF00}$\n\
{00FF00}^^ Score: {FFFFFF}%d\n", PlayerName2( Player ), PlayerInfo[ Player ][ Kills ], PlayerInfo[ Player ][ Deaths ], Float:PlayerInfo[ Player ][ Kills ]/Float:pDeaths, GetPlayerMoney( Player ), GetPlayerScore( Player ) );
format( str2, sizeof( str2 ), "%s{00FF00}^^ Online Time: {FFFFFF}%d Hrs | %d Min | %d Sec\n\
{00FF00}^^ Coins: {FFFFFF}%d\n\
{00FF00}^^ Race Score: {FFFFFF}%d\n\
{00FF00}^^ DeathMatch Score: {FFFFFF}%d\n\
{00FF00}^^ Admin Level: {FFFFFF}%d\n", str, h, m, s, PlayerInfo[ Player ][ Coins ], PlayerInfo[ Player ][ DeathMatch ], PlayerInfo[ Player ][ RaceScore ], PlayerInfo[ Player ][ Level ] );
format( str3, sizeof( str3 ), "%s{00FF00}^^ V.I.P Level: {FFFFFF}%d\n\
{00FF00}^^ Logged: {FFFFFF}%d\n\
{00FF00}^^ Player Warns: {FFFFFF}%d\n", str2, PlayerInfo[ Player ][ Vip ], PlayerInfo[ Player ][ LoggedIn ], PlayerInfo[ Player ][ Warnings ] );
return ShowPlayerDialog( playerid, SStats, DIALOG_STYLE_MSGBOX, "{00FF00}Stats:", str2, "Quit", "" );
}
}
return 1;
}
Re: Stats -
[]Allex[] - 13.11.2012
It Doesn't work !
Thanks for help