Why this pickup doesn't work? -
newbienoob - 21.02.2013
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.
Re: Why this pickup doesn't work? -
RajatPawar - 21.02.2013
pawn Код:
CreateDynamicPickup(1239, 14, Float:x, Float:y, z-1, -1,-1, -1, 100.0);
Try this, with the optional (right?) parameters..
Re: Why this pickup doesn't work? -
newbienoob - 21.02.2013
It didn't work. Btw, the pickup is outside of San Andreas.
Re: Why this pickup doesn't work? -
Fitri - 21.02.2013
//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;
}
Re: Why this pickup doesn't work? -
newbienoob - 21.02.2013
That's not what I want... + I'm using streamer plugin.
I'm just asking why the pickup doesn't work.
Re: Why this pickup doesn't work? -
SilverKiller - 21.02.2013
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.
Re: Why this pickup doesn't work? -
DaRk_RaiN - 21.02.2013
I just did a whole test and it worked fine for me.
Here's what i did:
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;
}
Re: Why this pickup doesn't work? -
newbienoob - 21.02.2013
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?
Re: Why this pickup doesn't work? -
Jay_ - 21.02.2013
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.
Re: Why this pickup doesn't work? -
DaRk_RaiN - 21.02.2013
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.