07.12.2013, 10:42
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:
Please reply fast..
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);
}