Vehicle bounce help. - 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: Vehicle bounce help. (
/showthread.php?tid=387608)
Vehicle bounce help. -
Tandokude - 25.10.2012
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 >.<