Little help!
#1

Hello everybody.I made today gift box system.But still have some bugs which I don`t know how to fix them.When I type my command object will be destroyed but label not.I used streamers function for label to destroy but still same problem here are screen shots:

And when object is destroyed:


Here is the code:
pawn Код:
CMD:takegift(playerid,params[])
{
    if(IsPlayerInRangeOfPoint(playerid,5.0,GiftBox[rand][Gift][0],GiftBox[rand][Gift][1],GiftBox[rand][Gift][2]))
    {
        DestroyObject(GiftBox[rand][GiftObject]);
        DestroyDynamic3DTextLabel(GiftBox[rand][label2]);
        SendClientMessage(playerid,-1,"DEBUG:Works");
        CreateGift();
    }
    return 1;
}
//and function for creating gifits:
CreateGift()
{
    rand = random(sizeof(GiftBox));
    format(slova,sizeof(slova),"%s",GiftBox[rand][GiftText]);
    CreateDynamic3DTextLabel(slova,0xFFFFFFFF,GiftBox[rand][Gift][0],GiftBox[rand][Gift][1],GiftBox[rand][Gift][2]+0.0,8.0);
    GiftBox[rand][GiftObject] = CreateObject(19054,GiftBox[rand][Gift][0],GiftBox[rand][Gift][1],GiftBox[rand][Gift][2],0.0,0.0,0.0,250);
}
Please reply fast..
Reply
#2

pawn Код:
GiftBox[rand][label2] = CreateDynamic3DTextLabel(slova,0xFFFFFFFF,GiftBox[rand][Gift][0],GiftBox[rand][Gift][1],GiftBox[rand][Gift][2]+0.0,8.0);
Reply
#3

Quote:
Originally Posted by Dragonsaurus
Посмотреть сообщение
pawn Код:
GiftBox[rand][label2] = CreateDynamic3DTextLabel(slova,0xFFFFFFFF,GiftBox[rand][Gift][0],GiftBox[rand][Gift][1],GiftBox[rand][Gift][2]+0.0,8.0);
*face palm* Ohhh jesus I really stuped -.- thank you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)