DestroyDynamicPickup
#4

You are creating double pickup here
pawn Код:
Points[pointid][Pointz] = slz;
            Points[pointid][PointPickupID] = CreateDynamicPickup( 1239, 23, Points[pointid][Pointx], Points[pointid][Pointy], Points[pointid][Pointz]);
and here

pawn Код:
CreateDynamicPickup(1239, 23, Points[pointid][Pointx], Points[pointid][Pointy], Points[pointid][Pointz]);
            format(string, sizeof(string), "You have set point's ID %d position to X: %f Y: %f Z: %f", pointid, slx, sly, slz);
            SendClientMessageEx(playerid, COLOR_WHITE, string);

pawn Код:
if (!strcmp(choice, "position", true))
        {
            new Float: slx, Float: sly, Float: slz;
            GetPlayerPos(playerid, slx, sly, slz);
            DestroyDynamicPickup(Points[pointid][PointPickupID]);
            DestroyDynamic3DTextLabel(Points[pointid][TextLabel]);
            Points[pointid][Pointx] = slx;
            Points[pointid][Pointy] = sly;
            Points[pointid][Pointz] = slz;
            Points[pointid][PointPickupID] = CreateDynamicPickup( 1239, 23, Points[pointid][Pointx], Points[pointid][Pointy], Points[pointid][Pointz]);
            if(Points[pointid][Type] == 3)
            {
                format(string, sizeof(string), " POT AVAILABLE: %d/1000.", Points[pointid][Stock]);
                Points[pointid][TextLabel] = CreateDynamic3DTextLabel(string, COLOR_YELLOW, Points[pointid][Pointx], Points[pointid][Pointy], Points[pointid][Pointz], 4.0);
                Points[pointid][CratePoint] = 1;
            }
            else if(Points[pointid][Type] == 4)
            {
                format(string, sizeof(string), " CRACK AVAILABLE: %d/500.", Points[pointid][Stock]);
                Points[pointid][TextLabel] = CreateDynamic3DTextLabel(string, COLOR_YELLOW, Points[pointid][Pointx], Points[pointid][Pointy], Points[pointid][Pointz], 4.0);
                Points[pointid][CratePoint] = 2;
            }
            CreateDynamicPickup(1239, 23, Points[pointid][Pointx], Points[pointid][Pointy], Points[pointid][Pointz]);
            format(string, sizeof(string), "You have set point's ID %d position to X: %f Y: %f Z: %f", pointid, slx, sly, slz);
            SendClientMessageEx(playerid, COLOR_WHITE, string);
            UpdatePoints();
            LoadPoints();
        }
Reply


Messages In This Thread
DestroyDynamicPickup - by Lidor124 - 10.02.2014, 12:54
Re: DestroyDynamicPickup - by Lidor124 - 22.02.2014, 06:38
Re: DestroyDynamicPickup - by BornHuman - 22.12.2014, 22:05
Re: DestroyDynamicPickup - by RaeF - 22.12.2014, 23:15

Forum Jump:


Users browsing this thread: 1 Guest(s)