29.11.2010, 20:39
(
Последний раз редактировалось TaMeD; 29.11.2010 в 21:17.
)
I am using 0.3c, so I don't know if that'll affect this script or not..
When I go in game and hit my jump button (Left shift), the engine does not start/stop. However when I hit S (brake/reverse), it does. I know you can make this work, because I've seen it done. I just can't work it out.
Help!
EDIT: Looks like others are having trouble in 0.3c too.
pawn Код:
#define PRESSED(%0) \
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
new engine,lights,alarm,doors,bonnet,boot,objective;
if(PRESSED( KEY_JUMP ))
{
if(IsPlayerInAnyVehicle(playerid))
{
new vid = GetPlayerVehicleID(playerid);
new getcar = GetCar(vid,1);
if(Vehicle[getcar][vEngine] == 0)
{
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,1,alarm,doors,bonnet,boot,objective);
Vehicle[getcar][vEngine] = 1;
}
else if(Vehicle[getcar][vEngine] == 1)
{
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,1,alarm,doors,bonnet,boot,objective);
Vehicle[getcar][vEngine] = 0;
}
}
}
return 1;
}
Help!
EDIT: Looks like others are having trouble in 0.3c too.