22.12.2014, 23:15
You are creating double pickup here
and here
pawn Код:
Points[pointid][Pointz] = slz;
Points[pointid][PointPickupID] = CreateDynamicPickup( 1239, 23, Points[pointid][Pointx], Points[pointid][Pointy], Points[pointid][Pointz]);
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();
}