Pickup not working. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Pickup not working. (
/showthread.php?tid=311789)
Pickup not working. -
Ronaldo_raul™ - 18.01.2012
Hello i want to make a velocity pickup and this is my code -
pawn Код:
// At the top of the script
new Velocity;
//Under Gamemodeinit();
Velocity = CreatePickup(1318,2,3761.2717,-1701.9760,7.7385);
Create3DTextLabel("Velocity", 0xFF0000AA,3761.2717,-1701.9760,7.7385,100.0, 0);
//Under OnPlayerPickUpPickup
{
if(pickupid == Velocity)
{
new Float:vx, Float:vy, Float:vz;
new veh = GetPlayerVehicleID(playerid);
GetVehicleVelocity(veh, vx, vy, vz);
SetVehicleVelocity(veh, 50, vy, 0.5);
}
//i have another pickups too so its the needed code
But actually what happens is when i go through the pickup nothing happens.I cant figure out the problem, i hope you guys can fix this.+rep will be the reward
Regards,
Ronaldo_raul™
Re: Pickup not working. -
Richie - 18.01.2012
i dont think you can pickup things inside a vehicle man.
i would try to use checkpoints instead.
Re: Pickup not working. -
Stigg - 18.01.2012
Quote:
Originally Posted by Richie
i dont think you can pickup things inside a vehicle man.
i would try to use checkpoints instead.
|
Yes you can, pickup type 14 can be picked up in a vehicle:
https://sampwiki.blast.hk/wiki/Pickup_IDs
See bottom of page for pickup types.
Re: Pickup not working. -
Prumpuz - 18.01.2012
pawn Код:
CreatePickup(1318,14,3761.2717,-1701.9760,7.7385);
Changed the pickup type to 14.
https://sampwiki.blast.hk/wiki/PickupTypes
Quote:
14 Pickupable, but only when in a vehicle.
|
Edit: Stigg beat me to it...
Re: Pickup not working. -
Ronaldo_raul™ - 18.01.2012
Quote:
Originally Posted by Stigg
|
Quote:
Originally Posted by Prumpuz
|
Still not working, the pickup isn't visible.
EDIT : the velocity is not working.Nothing happens when i pick up the pick up
Re: Pickup not working. -
Ronaldo_raul™ - 24.01.2012
BUMP ?