29.09.2018, 16:10
Code:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if(newkeys == 65536 && GetPlayerState(playerid) == PLAYER_STATE_DRIVER) // Y { GetVehicleParamsEx(id, engine, lights, alarm, doors, bonnet, boot, objective); if(boot == VEHICLE_PARAMS_OFF || boot == VEHICLE_PARAMS_UNSET) { SetVehicleParamsEx(id, engine, lights, alarm, doors, bonnet, VEHICLE_PARAMS_ON, objective); SendClientMessage(playerid, Branco, "Vocк abriu a mala do carro !"); } else { SetVehicleParamsEx(id, engine, lights, alarm, doors, bonnet, VEHICLE_PARAMS_OFF, objective); SendClientMessage(playerid, Cinza, "Vocк fechou a mala do carro !"); } } } new t[80]; format(t, sizeof(t)," Tecla: %d", newkeys); SendClientMessage(playerid, -1, t); return true; }
@edit