27.08.2013, 07:33
what is the id on the sprint button?
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if((newkeys & KEY_SPRINT) { if(IsPlayerInAnyVehicle(playerid)} { ModifyVehicleSpeed(-1); } } return 1; } stock ModifyVehicleSpeed(mph) { new Float:Vx,Float:Vy,Float:Vz,Float:DV,Float:multiple; for( new c = 1; c <= MAX_VEHICLES; c ++ ) { GetVehicleVelocity(c,Vx,Vy,Vz); DV = floatsqroot(Vx*Vx + Vy*Vy + Vz*Vz); if(DV > 0) { multiple = ((mph + DV * 100) / (DV * 100)); return SetVehicleVelocity(c,Vx*multiple,Vy*multiple,Vz*multiple); } } return 0; }
C:\Users\Andrei\Desktop\Andrei\zPlague -v2-\filterscripts\slowmotion.pwn(174) : error 029: invalid expression, assumed zero C:\Users\Andrei\Desktop\Andrei\zPlague -v2-\filterscripts\slowmotion.pwn(175) : error 001: expected token: ")", but found "}" C:\Users\Andrei\Desktop\Andrei\zPlague -v2-\filterscripts\slowmotion.pwn(175) : error 029: invalid expression, assumed zero Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 3 Errors.
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if((newkeys & KEY_SPRINT) {//line... if(IsPlayerInAnyVehicle(playerid)) { ModifyVehicleSpeed(-1); } } return 1; }
C:\Users\Andrei\Desktop\Andrei\zPlague -v2-\filterscripts\slowmotion.pwn(169) : error 029: invalid expression, assumed zero Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
if(IsPlayerInAnyVehicle(playerid)}
if(newkeys & KEY_SPRINT)
if((newkeys & KEY_SPRINT)