18.08.2011, 00:28
Код:
if (newkeys==KEY_CROUCH) { new engine,lights,alarm,doors,bonnet,boot,objective; GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective); if(GetPlayerState(playerid)==PLAYER_STATE_DRIVER) { if(lights != 1) { lights = 1; SetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,VEHICLE_PARAMS_ON,alarm,doors,bonnet,boot,objective); SendClientMessage(playerid, 0xFFFFFFAA, "You've turned the vehicle's lights on!"); return 1; } else { lights = 0; SetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective); SendClientMessage(playerid, 0xFFFFFFAA, "You've turned the vehicle's lights off!"); return 1; } } return lights; }