09.08.2012, 06:25
Hello! How can I show my team in the /stats command? I tried like this,but its fully error.
Код:
CMD:stats( playerid, params[ ] ) { if ( GetPVarInt( playerid, "Logged" ) == 0 ) return SendClientMessage( playerid, -1, ""COLOR_RED"{FFFFFF}To view your stats you must be logged in."); new iBox[ 1024 ], RegDate[ 40 ], pLastOn[ 20 + 20 ], TeamText[ 20 ], pLevel = GetPVarInt( playerid, "AdminLevel") ; GetPVarString( playerid, "Date", RegDate, sizeof RegDate ); GetPVarString( playerid, "On", pLastOn, sizeof pLastOn ); if(GetPlayerTeam == 0) { TeamText = "{FFFFFF}Civillians"; } else if(GetPlayerTeam == 1) { TeamText = "{6CCFFF}SouthBoys"; } else if(GetPlayerTeam == 2) { TeamText = "{F27900}Yakoo"; } else if(GetPlayerTeam == 3) { TeamText = "{548200}The Triads"; } else if(GetPlayerTeam == 4) { TeamText = "{CC0000}The Mafia"; } else if(GetPlayerTeam == 5) { TeamText = "{E6E600}Vagos"; } else if(GetPlayerTeam == 6) { TeamText = "{0000A0}Cops"; } format( iBox, sizeof iBox, "{FFFFFF}Hello "COLOR_LIGHTBLUE"%s{FFFFFF}, these are your stats\n\n\ {FFFFFF}Admin Level: "COLOR_LIGHTBLUE"%s{FFFFFF}["COLOR_LIGHTBLUE"%d{FFFFFF}]\n\ {FFFFFF}VIP Level: "COLOR_LIGHTBLUE"%d\n\ {FFFFFF}Money: "COLOR_LIGHTBLUE"%d\n\ {FFFFFF}Score: "COLOR_LIGHTBLUE"%d\n\ {FFFFFF}Coins: "COLOR_LIGHTBLUE"%d\n\ {FFFFFF}SkinID: "COLOR_LIGHTBLUE"%d\n\ {FFFFFF}Team: %s\n\ {FFFFFF}Drugs: "COLOR_LIGHTBLUE"%d\n\ {FFFFFF}Kills: "COLOR_LIGHTBLUE"%d\n\ {FFFFFF}Deaths: "COLOR_LIGHTBLUE"%d\n", pName( playerid ), GetPlayerLevelName( playerid ), pLevel, GetPlayerVLevel( playerid ), GetPlayerMoney( playerid ), GetPlayerScore( playerid ), GetPVarInt( playerid,"Coins" ), GetPlayerSkin( playerid ), TeamText, GetPVarInt( playerid,"Drugs" ), GetPVarInt( playerid,"Kills" ), GetPVarInt( playerid,"Deaths" ) ); format( iBox, sizeof iBox, "%s{FFFFFF}Registration Date: "COLOR_LIGHTBLUE"%s\n\ {FFFFFF}Last On: "COLOR_LIGHTBLUE"%s\n\ {FFFFFF}PM Disabled: "COLOR_LIGHTBLUE"%s\n\ {FFFFFF}Car God: "COLOR_LIGHTBLUE"%s\n\ {FFFFFF}Player God: "COLOR_LIGHTBLUE"%s", iBox, RegDate, pLastOn, GetPVarInt( playerid, "Disable_PM" ) ? (""COLOR_GREEN"YES") : (""COLOR_RED"NO"), GetPVarInt( playerid, "CGod" ) ? (""COLOR_GREEN"YES") : (""COLOR_RED"NO"), GetPVarInt( playerid, "God" ) ? (""COLOR_GREEN"YES") : (""COLOR_RED"NO")); ShowPlayerDialog( playerid, DIALOG_STATS, DIALOG_STYLE_MSGBOX, ""COLOR_LIGHTBLUE"Your Stats!", iBox, "OK", ""); return 1; }