06.03.2012, 21:43
Hi,
I'm still working on my cookie system, but I'm having problems with this command.
I want that command to check a player's cookies. Not just mine. like /cookies [playerid/partofname] Then it will read their file from my scriptfiles, and tell me how much cookies they have.
This isn't working, all the current command does is say "Name has () cookies" How can I get this working? Thanks you.
I'm still working on my cookie system, but I'm having problems with this command.
pawn Код:
CMD:cookies(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin]>=1)
{
new id;
if(sscanf(params, "r", id)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /cookies [Player ID]");
if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFF0000, "This player is not connected!");
new str[64];
format(str, sizeof(str), "%s(%d) has (%d) Cookies.", GetName(id),PlayerInfo[playerid][pCookies]);
SendClientMessage(playerid, COLOR_WHITE, str);
}
else SendClientMessage(playerid, COLOR_BRIGHTRED, "You're not authorized to use this command.");
return 1;
}
This isn't working, all the current command does is say "Name has () cookies" How can I get this working? Thanks you.