03.09.2016, 11:03
Hello i have problem with stats command when i type /stats it shows stats of id0 even tho im id1
Код:
CMD:stats(playerid,params[]) { new string[1250]; new player1; new name[MAX_PLAYER_NAME]; new rankdon1[50], rankdon2[50]; new pName[MAX_PLAYER_NAME]; GetPlayerName(playerid, pName, MAX_PLAYER_NAME); if(!strlen(params)) player1 = playerid; else player1 = strval(params); switch(PlayerInfo[player1][pDj]) { case 0: rankdon1 = "No"; case 1: rankdon1 = "Yes"; } switch(PlayerInfo[player1][pHelper]) { case 0: rankdon2 = "No"; case 1: rankdon2 = "Yes"; } if(IsPlayerConnected(player1)) { format(string, sizeof(string), "%s Stats of %s\n",string, name); format(string, sizeof(string), "%s» Score: %s\n",string,PlayerInfo[player1][pScores]); format(string, sizeof(string), "%s» Money: %d\n",string,PlayerInfo[player1][pMoney]); format(string, sizeof(string), "%s» Kills: %d\n",string,PlayerInfo[player1][pKills]); format(string, sizeof(string), "%s» Deaths: %d\n",string,PlayerInfo[player1][pDeaths]); format(string, sizeof(string), "%s» Admin Level: %d\n",string,PlayerInfo[player1][pAdmin]); format(string, sizeof(string), "%s» Reaction Tests Won: %d\n",string,PlayerInfo[player1][pReactions]); format(string, sizeof(string), "%s» Total Warns: %d\n",string,PlayerInfo[player1][pWarns]); format(string, sizeof(string), "%s» Total kicks: %d\n",string,PlayerInfo[player1][pKicks]); format(string, sizeof(string), "%s» Total bans: %d\n",string,PlayerInfo[player1][pBans]); format(string, sizeof(string), "%s» Trusted Player: %s\n",string,rankdon2); format(string, sizeof(string), "%s» DJ: %s\n",string,rankdon1); ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "Player Stistics" , string,"ok",""); } else return SendClientMessage(playerid, RED, "ERROR: Player Not Connected!"); return 1; }