Unkown Command issue.
#1

Creating a giftbox system and I have seemed to run into a issue.



The following command is runing into the Unkown Command

pawn Код:
CMD:creategiftbox(playerid, params[])
{
    if(pInfo[playerid][pAdmin] == 5)
    {
        if(GiftBoxSpawned < MAX_GIFTBOXS)
        {
            GiftBoxSpawned++;
            GetPlayerPos(playerid, GiftData[GiftBoxSpawned][gXPos],GiftData[GiftBoxSpawned][gYPos], GiftData[GiftBoxSpawned][gZPos]);
            GiftData[GiftBoxSpawned][Model] = CreateObject(19054,GiftData[GiftBoxSpawned][gXPos],GiftData[GiftBoxSpawned][gYPos], GiftData[GiftBoxSpawned][gZPos], 0,0,0,250);
            GiftData[GiftBoxSpawned][ggLabel] = Create3DTextLabel("Gift box!\nType /getgift to claim your gift!", COLOR_YELLOW, GiftData[GiftBoxSpawned][gXPos],GiftData[GiftBoxSpawned][gYPos], GiftData[GiftBoxSpawned][gZPos]+1.3, 15.0, 0, 0);
        }
        else
        {
            SendClientMessage(playerid, COLOR_GREY, "Maxed Spawned");
        }
    }
    else
    {
        Bad_Rank(playerid, COLOR_GREY);
    }
    return 1;
}
Although once I have reached max giftboxes it will then show Maxed Spawned.


What am I doing wrong?


Solved, Had to put GiftBoxSpawned++; at the bottlom.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)