02.09.2013, 08:22
MAX_PLAYERS can be even 1000, but not 10000000000.
By the way, opening braces like that is pointless.
By the way, opening braces like that is pointless.
pawn Код:
CMD:getcookies(playerid, params[])
{
new ID;
if(sscanf(params, "r", ID)) return SendClientMessage(playerid, RED, "USAGE: /getcookies [Name/ID]");
if(ID == INVALID_PLAYER_ID) return SendClientMessage(playerid, RED, "ERROR: Player is not connected");
if(ID == playerid) SendClientMessage(playerid, RED, "ERROR: You can check your own cookies using /mycookies");
new str[64],name2[MAX_PLAYER_NAME];
GetPlayerName(ID, name2, MAX_PLAYER_NAME);
format(str, sizeof(str), "Name : %s\n Cookies\n%d", name2, pInfo[ID][COOKIES]);
ShowPlayerDialog(playerid, D_GETCOOKIES, DIALOG_STYLE_MSGBOX, "Cookies Statistic",str,"OK","");
return 1;
}