18.01.2012, 13:52
Hello i want to make a velocity pickup and this is my 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™
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
Regards,
Ronaldo_raul™