Why this pickup doesn't work?
#1

I have created a pickup(using streamer) type 14; "Pickupable, but only when in a vehicle." But, it doesn't work. Here's my script.

pawn Код:
nitro = CreateDynamicPickup(1239, 14, x, y, z-1);

//OnPlayerPickupDynamicPickup
if(pickupid == nitro)
{
    AddVehicleComponent(vehicleid,1010);
}
It should give me a nitro for my car.
Reply
#2

pawn Код:
CreateDynamicPickup(1239, 14, Float:x, Float:y, z-1, -1,-1, -1, 100.0);
Try this, with the optional (right?) parameters..
Reply
#3

It didn't work. Btw, the pickup is outside of San Andreas.
Reply
#4

//OnPlayerPickupDynamicPickup

i can fix you prob
put this


new ptest;

public OnGameModeInit()
{
ptest = CreatePickup(19345, 2, 985.3165, 2459.883, 10.8203, 0);///cordinates of the pickup
////fou can add another pickup here
return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{

if(pickupid == ptest)
{
GivePlayerMoney(playerid, 50000);
SendClientMessage(playerid, 0x09E326FF, "You Found 50000!");
///you can add another foucion here // sorry for bad eng
}
return 1;
}
Reply
#5

That's not what I want... + I'm using streamer plugin.
I'm just asking why the pickup doesn't work.
Reply
#6

Quote:
Originally Posted by Fitri
Посмотреть сообщение
//OnPlayerPickupDynamicPickup

i can fix you prob
put this


new ptest;

public OnGameModeInit()
{
ptest = CreatePickup(19345, 2, 985.3165, 2459.883, 10.8203, 0);///cordinates of the pickup
////fou can add another pickup here
return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{

if(pickupid == ptest)
{
GivePlayerMoney(playerid, 50000);
SendClientMessage(playerid, 0x09E326FF, "You Found 50000!");
///you can add another foucion here // sorry for bad eng
}
return 1;
}
(facepalm), He uses Incognito's Streamer Plugin.
Reply
#7

I just did a whole test and it worked fine for me.
Here's what i did:
pawn Код:
new Nitro;
pawn Код:
public OnPlayerSpawn(playerid)
{
    Nitro = CreateDynamicPickup(1239, 14,269.0363, 1990.0571, 17.6406-1);
//....
pawn Код:
public OnPlayerPickUpDynamicPickup(playerid,pickupid)
{
    if(pickupid == Nitro)
    {
    new vehicleid = GetPlayerVehicleID(playerid);
    AddVehicleComponent(vehicleid,1010);
    SendClientMessage(playerid,-1,"works?");
    }
    return 1;
}
Reply
#8

That's what I got in my script. Btw, my x,y,z coords are outside of San Andreas.

EDIT: I found this on ******. https://sampforum.blast.hk/showthread.php?tid=360843
Any fix?
Reply
#9

It's not possible to fix it server side because it's the way the GTA game was designed. You can create your own vehicle pickup system however that detects when a player's vehicle is within range of a pickup and destroys it, simulating the pickup effect. This however, obviously, isn't as efficient.
Reply
#10

Oh wait btw, if the x y z are so far from SA (in sea maybe?) it won't work
https://sampforum.blast.hk/showthread.php?tid=398879 See Vince's reply.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)