19.11.2011, 14:34
Hello peoples.I have one thing with lights. Problem is lights not off and not on at all nothing happines here is a code:
I press numpad 8 but how i say nothing happin...
Code:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { new engine,lights,alarm,doors,bonnet,boot,objective; new vehicleid = GetPlayerVehicleID(playerid); if(IsPlayerInAnyVehicle(playerid) && newkeys & KEY_ANALOG_UP) { if(GetPVarInt(playerid, "Lights") == 0) { GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective); SetVehicleParamsEx(vehicleid,engine,false,alarm,doors,bonnet,boot,objective); } else if(GetPVarInt(playerid, "Lights") == 1) { GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective); SetVehicleParamsEx(vehicleid,engine,true,alarm,doors,bonnet,boot,objective); } } return 1; }