Salve a tutti, Vorrei sapere come faccio a fare l'accensione dei fari del veicolo manualmente premendo il tasto 2(KEY_SUB_MISSION)
Potete aiutarmi????
Pagina 1 di 1
[HELP]Accensione manuale fari
#2
Inviato il 15 febbraio 2012 - 21:37
Semplice
Allora in OnGameModeInt
Poi:

Allora in OnGameModeInt
ManualVehicleEngineAndLights();
Poi:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if (newkeys & KEY_SUBMISSION && IsPlayerInAnyVehicle(playerid)) { new veh = GetPlayerVehicleID(playerid); new engine,lights,alarm,doors,bonnet,boot,objective; GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,lights,alarm,doors,bonnet,boot,objective); SetVehicleParamsEx(veh,engine,VEHICLE_PARAMS_ON,alarm,doors,bonnet,boot,objective); } return 1; }

#3
Inviato il 15 febbraio 2012 - 21:53
Grazie, un'altra cosa, come faccio a fare spegni e accendi sempre con il tasto 2, tipo se i fari sono accesi e premo 2 si spengono, e se premo di nuovo 2 si accendono?? Grazie ancora in anticipo
Messaggio modificato da peppetrack93 il 15 febbraio 2012 - 21:53
#4
Inviato il 16 febbraio 2012 - 02:00
peppetrack93, il 15 febbraio 2012 - 21:53 ha detto:
Grazie, un'altra cosa, come faccio a fare spegni e accendi sempre con il tasto 2, tipo se i fari sono accesi e premo 2 si spengono, e se premo di nuovo 2 si accendono?? Grazie ancora in anticipo
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if (newkeys & KEY_SUBMISSION && IsPlayerInAnyVehicle(playerid)) { new veh = GetPlayerVehicleID(playerid); new engine,lights,alarm,doors,bonnet,boot,objective; GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective); if (lights) { SetVehicleParamsEx(veh,engine,0,alarm,doors,bonnet,boot,objective); } else { SetVehicleParamsEx(veh,engine,1,alarm,doors,bonnet,boot,objective); } } return 1; }
"Audentes Fortuna iuvat"
Pagina 1 di 1