Vehicle bounce help.
#1

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
// Check if the player is in any vehicle and is the driver
if (IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
// Check for the HORN key (Crouch key is the same as the horn key)
if (newkeys & KEY_CROUCH)
{
// Create variables
new Float:vx, Float:vy, Float:vz;

// Get the vehicles velocity
GetVehicleVelocity(GetPlayerVehicleID(playerid), vx, vy, vz);

// Check the values are not too high already
if (floatabs(vx) < 1.4 && floatabs(vy) < 1.4 && floatabs(vz) < 1.4)
{
// Boost the vehicle speed
SetVehicleVelocity(GetPlayerVehicleID(playerid),vx BounceMultiplier[playerid],vy BounceMultiplier[playerid],vz + BounceMultiplier[playerid]);
}
// Exit here
return 1;
}
}

// Exit here
return 1;
}
Error shown:
C:\Users\Admin\Desktop\VehFunctions.pwn(170) : error 001: expected token: ",", but found "-identifier-"
C:\Users\Admin\Desktop\VehFunctions.pwn(170) : warning 215: expression has no effect
C:\Users\Admin\Desktop\VehFunctions.pwn(170) : warning 215: expression has no effect
C:\Users\Admin\Desktop\VehFunctions.pwn(170) : error 001: expected token: ";", but found "-identifier-"
C:\Users\Admin\Desktop\VehFunctions.pwn(170) : warning 215: expression has no effect
C:\Users\Admin\Desktop\VehFunctions.pwn(170) : warning 215: expression has no effect
C:\Users\Admin\Desktop\VehFunctions.pwn(170) : error 001: expected token: ";", but found ")"
C:\Users\Admin\Desktop\VehFunctions.pwn(170) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.

I'm a new scripter and I don't really know the problem >.<
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)