Cannot make a command
#10

Try this
pawn Код:
CMD:stats(playerid,params[])
{
     new string[128],pname[MAX_PLAYER_NAME];
     if(sscanf(params, "u", id)) return SendClientMessage(playerid, -1, "/Stats [ID]");
     if(!IsPlayerConnected(id)) return SendClientMessage(playerid,0xFF000080,"Player has not logged in the server!");
     {
          GetPlayerName(id, pname, sizeof(pname));
          format(string, sizeof(string), "Account: %s\nMoney: $%d\nKills: %d\nDeaths: %d",pname,GetPlayerMoney(id),pInfo[id][Kills],pInfo[id][Deaths]);
          ShowPlayerDialog(playerid, dstats, DIALOG_STYLE_MSGBOX, "Account Stats", string, "Close", "");
     }
     return 1;
}
This code would require to always have a ID filled in.
So if you want to check your owns stats you would have to fill in your own ID.
Reply


Messages In This Thread
Cannot make a command - by Axey187 - 02.01.2015, 11:47
Re: Cannot make a command - by Glossy42O - 02.01.2015, 11:49
Re: Cannot make a command - by Sawalha - 02.01.2015, 11:49
Re: Cannot make a command - by Facerafter - 02.01.2015, 11:50
Re: Cannot make a command - by Axey187 - 02.01.2015, 11:54
Re: Cannot make a command - by HY - 02.01.2015, 11:57
Re: Cannot make a command - by Facerafter - 02.01.2015, 11:58
Re: Cannot make a command - by Axey187 - 02.01.2015, 12:04
Re: Cannot make a command - by ATGOggy - 02.01.2015, 12:09
Re: Cannot make a command - by Facerafter - 02.01.2015, 12:11

Forum Jump:


Users browsing this thread: 2 Guest(s)