Hello I have a problem, I create MySQL Pickup System and i need help, because when he approaches to pickup don't deleted, and not give info for my code.
Код:
public OnPlayerPickUpDynamicPickup(playerid, pickupid)
{
if(pickupid == EventInfo[pickupid][eUID])
{
{
new eventpickup = random(3);
switch(eventpickup)
{
case 0:
{
new eventcar = random(3);
Tip(playerid, 5, "Znalazles Pickup i zdobyles jedno z 3 pojazdow wpisz: ~y~/v");
switch(eventcar)
{
case 0:
{
new Float:posx, Float:posy, Float:posz, Float:angle, vw, int;
GetPlayerPos(playerid, posx, posy, posz);
GetPlayerFacingAngle(playerid, angle);
vw = GetPlayerVirtualWorld(playerid);
int = GetPlayerInterior(playerid);
new uid = StworzPojazd(playerid, 439, 1, 1, vw, int, posx+2, posy+2, posz+1, angle);
VehicleInfo[uid][vLocked]=false;
SetVehicleLock(VehicleInfo[uid][vSAMPID], false);
}
case 1:
{
new Float:posx, Float:posy, Float:posz, Float:angle, vw, int;
GetPlayerPos(playerid, posx, posy, posz);
GetPlayerFacingAngle(playerid, angle);
vw = GetPlayerVirtualWorld(playerid);
int = GetPlayerInterior(playerid);
new uid = StworzPojazd(playerid, 542, 1, 1, vw, int, posx+2, posy+2, posz+1, angle);
VehicleInfo[uid][vLocked]=false;
SetVehicleLock(VehicleInfo[uid][vSAMPID], false);
}
case 2:
{
new Float:posx, Float:posy, Float:posz, Float:angle, vw, int;
GetPlayerPos(playerid, posx, posy, posz);
GetPlayerFacingAngle(playerid, angle);
vw = GetPlayerVirtualWorld(playerid);
int = GetPlayerInterior(playerid);
new uid = StworzPojazd(playerid, 507, 1, 1, vw, int, posx+2, posy+2, posz+1, angle);
VehicleInfo[uid][vLocked]=false;
SetVehicleLock(VehicleInfo[uid][vSAMPID], false);
}
}
}
case 1:
{
Tip(playerid, 5, "Znalazles Pickup i zdobyles gotowke.");
GivePlayerCash(playerid, 7000);
}
case 2:
{
Tip(playerid, 5, "Znalazles Pickup i zdobyles unikalny przedmiot!.");
StworzPrzedmiot(OWNER_PLAYER, CharacterInfo[playerid][pUID], "Dynia na Głowe", ITEM_TYPE_ATTACHED, 19320, 2, 1);
}
}
}
return 1;
}
}
put this into your script to delete any pick you want DestroyPickup( your pickup id);