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

Get the variable of the "player cookies", and in format just add the %d or %i to add numbers inside a string.

pawn Код:
CMD:cookies(playerid, params[])
{
    new id;
    if(sscanf(params, "u", 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) does have %d cookies.", GetName(id), id, /*Put here the player variable of the cookies*/);
    SendClientMessage(playerid, COLOR_WHITE, str);
    return 1;
}
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)