What's wrong with this? +rep
#1

Hi,
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;
}
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.
Reply


Messages In This Thread
What's wrong with this? +rep - by rangerxxll - 06.03.2012, 21:43
Re: What's wrong with this? +rep - by Cameltoe - 06.03.2012, 21:51
Re: What's wrong with this? +rep - by rangerxxll - 06.03.2012, 21:53
Re: What's wrong with this? +rep - by Cameltoe - 06.03.2012, 21:59
Re: What's wrong with this? +rep - by Basicz - 06.03.2012, 21:59
Re: What's wrong with this? +rep - by Cameltoe - 06.03.2012, 22:01
Re: What's wrong with this? +rep - by rangerxxll - 06.03.2012, 22:12
Re: What's wrong with this? +rep - by rangerxxll - 06.03.2012, 22:14
Re: What's wrong with this? +rep - by rangerxxll - 06.03.2012, 23:58
Re: What's wrong with this? +rep - by Basicz - 07.03.2012, 07:59

Forum Jump:


Users browsing this thread: 1 Guest(s)