SA-MP Forums Archive
Little help! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Little help! (/showthread.php?tid=479802)



Little help! - Sanady - 07.12.2013

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..


Re: Little help! - Dragonsaurus - 07.12.2013

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



Re: Little help! - Sanady - 07.12.2013

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