Posts: 186
Threads: 80
Joined: Aug 2015
Reputation:
0
i need a script to add on gm
when i press 2 to start engine !
the script can add under onplayerkeystatechange.
any help ?
Posts: 1,208
Threads: 36
Joined: Apr 2015
Код:
public OnPlayerKeyStateChange(playerid,newkeys,oldkeys){
if(newkeys == KEY_LOOK_BEHIND){
if(IsPlayerInAnyVehicle(playerid)){
new engine, lights, alarm, doors, bonnet, boot, objective, vehid;
vehid = GetPlayerVehicleID(playerid);
GetVehicleParamsEx(vehid, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(vehid, (engine>0?0:1), lights, alarm, doors, bonnet, boot, objective);
if((engine>0?0:1) == 1){
//Msg engine ON
} else {
//Msg engine OFF
}
}
}
return 1;
}