How to make a /checkcookies command? Partially done.
#1

Hi,
I'm wanting to make a command like /cookies [playerid] Which will check how many cookies the player has. I already have cookies in my scriptfiles, and whatnot. But how do I check the player's cookies, and then send a client message back to my player saying how much cookies he has? Here's what I got so far.

pawn Код:
CMD:cookies(playerid, params[])
{
    new pCookies;
    new target;
    new str[128];
    if(sscanf(params, "u[128]", target)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /cookies [Player ID]");
    if!IsPlayerConnected(target)) return SendClientMessage(playerid, COLOR_BRIGHTRED, "ERROR: Player is not connected");
    if(PlayerInfo[playerid][pAdmin] >=1
    {
        format(str, sizeof(str), "You have checked %s's Cookies.", GetName(target));
        SendClientMessage(playerid, COLOR_CYAN, str);
It's not finished yet. But what else do I need to add? Thanks!
Reply


Messages In This Thread
How to make a /checkcookies command? Partially done. - by rangerxxll - 06.03.2012, 02:29
AW: How to make a /checkcookies command? Partially done. - by BigETI - 06.03.2012, 02:38
Re: AW: How to make a /checkcookies command? Partially done. - by rangerxxll - 06.03.2012, 02:44

Forum Jump:


Users browsing this thread: 1 Guest(s)