Pickup not working.
#1

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™
Reply
#2

i dont think you can pickup things inside a vehicle man.
i would try to use checkpoints instead.
Reply
#3

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.
Reply
#4

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...
Reply
#5

Quote:
Originally Posted by Stigg
Посмотреть сообщение
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.
Quote:
Originally Posted by Prumpuz
Посмотреть сообщение
pawn Код:
CreatePickup(1318,14,3761.2717,-1701.9760,7.7385);
Changed the pickup type to 14.

https://sampwiki.blast.hk/wiki/PickupTypes


Edit: Stigg beat me to it...
Still not working, the pickup isn't visible.

EDIT : the velocity is not working.Nothing happens when i pick up the pick up
Reply
#6

BUMP ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)