Jump to content

LoSantos_YT

Members
  • Posts

    15
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by LoSantos_YT

  1. @bubu09 try substituting _player for player and _vehicle for vehicle player. Make sure you have followed all the steps correctly.
  2. I leave here a version I made https://www.altisliferpg.com/topic/14636-gopro-for-cops-imobile-view/
  3. I'm not a developer to begin with, but I like to try things like this. This script works to be able to view the GoPro's of your colleagues (being a cop in this case) from a kind of tablet. Sorry if you don't understand the scripts, I am Spanish and I program in Spanish too so they are not in English. By: LoSantosYT & Alponcho Difficulty: Fácil Material used: https://steamcommunity.com/sharedfiles/filedetails/?id=2303942525 We go to the editor and make sure that your cop is named cop_1, cop_2, cop_3 ....... without interruption as cop_1, cop_2, cop_4.... https://gyazo.com/b54b9167550ebeac8133de9a60e909ef Set some object in the "comisaria" variable since this is where the cam is created when we have not yet selected a player. https://gyazo.com/630cb5d583ec216bebaf08314824153e Go to Functions.hpp and add the following at the bottom: class LoSantosYT { tag = "lsyt" class CopGoPro { file = "LoSantosYT\GoPro"; class gopro {}; class CopsDispo {}; class Conectarse {}; class OpenDialogGoPro {}; }; }; Go Functions.hpp and add: #incluye "LoSantosYT\gopro\menugopro.hpp" After this line: #incluye "derleon\Scripts_Master.hpp" Go to init.sqf and add the following line at the bottom: [] execVM "LoSantosYT\gopro\fn_gopro.sqf" ; Download the following folder and place it in your lost folder: https://mega.nz/file/IlhmwShI#897Xxm0z3wC4PHary6mrfwLkKRdx1bwlYVizJBd-jlY Put the following where you want the menu to open (a button, a key...): call lsyt_fnc_OpenDialogGoPro; In the fn_gopro.sqf file, change "JD_InvPack" to some invisible, non-collision object : cam_on = { gopro_cam = "JD_InvPack" createVehicleLocal [0,0,0]; //Invisible object class [gopro_cam, true] remoteExec ["hideObjectGlobal", 2]; gopro_cam attachTo [comisaria, [0, 0, 0]]; gopro_cam cameraEffect ["Internal", "FRONT", "camponcho"]; player setVariable ["gopro_1", true]; }; Result: https://gyazo.com/5d7c079f854983a102fff04a1ab855e0 https://youtu.be/oK_a3Net90E
  4. Sorry for the stupid question, but where can I modify the camera? I'm using it in a server with a custom map and they appear underwater.
  5. I'm not a developer to begin with, but I do like to try things like this. What this script does is to detect if a vehicle has exceeded the speed in an area with a speed camera, if so it takes money with a ticket. Sorry if you don't understand the script annotations, I am Spanish and I program in Spanish too so they are not in English. Difficulty: Easy Credit to: LoSantosYT We go to editor and put an trigger: To avoid any problems, I do not put model or addon speed camera (As there are paid scripts for this) So I recommend to look for a surveillance camera and put it as below Go to Functions.hpp and add the next at the bottom: class LoSantosYT { tag = "lsyt" class DGT { file = "LoSantosYT\SpeedCamera"; class controlvelocidad {}; class calcmulta {}; }; }; If you know how to program instead of copy and paste other people's scripts, you will know how to modify this Create a folder in your mission folder Create the following folder structure in your_mission_folder\LoSantosYT\SpeedCamera. Create the next file in and call him fn_calcmulta.sqf /* File: fn_calcularsancionconlimite.sqf Author: LoSantosYT Description: Dada una velocidad y un límite, calcula la sanción de puntos y de dinero. PARAMS 0 - Número: límite 1 - Número: velocidad Devuelve: Array [dinero, puntos] Ejemplo [120, 138] call lsyt_fnc_calcularsancionconlimite */ params ["_limit", "_speed"]; private["_base", "_result", "_return"]; _base = 1250; // 100€ de base _result = false; if(_limit isEqualTo 30) then { _result = true; if(_speed > 30) then {_return = [_base * 1, 0]}; if(_speed > 50) then {_return = [_base * 3, 2]}; if(_speed > 60) then {_return = [_base * 4, 4]}; if(_speed > 70) then {_return = [_base * 5, 6]}; if(_speed > 80) then {_return = [_base * 6, 6]}; }; if(_limit isEqualTo 40) then { _result = true; if(_speed > 40) then {_return = [_base * 1, 0]}; if(_speed > 60) then {_return = [_base * 3, 2]}; if(_speed > 70) then {_return = [_base * 4, 4]}; if(_speed > 80) then {_return = [_base * 5, 6]}; if(_speed > 90) then {_return = [_base * 6, 6]}; }; if(_limit isEqualTo 50) then { _result = true; if(_speed > 50) then {_return = [_base * 1, 0]}; if(_speed > 70) then {_return = [_base * 3, 2]}; if(_speed > 80) then {_return = [_base * 4, 4]}; if(_speed > 90) then {_return = [_base * 5, 6]}; if(_speed > 100) then {_return = [_base * 6, 6]}; }; if(_limit isEqualTo 60) then { _result = true; if(_speed > 60) then {_return = [_base * 1, 0]}; if(_speed > 90) then {_return = [_base * 3, 2]}; if(_speed > 110) then {_return = [_base * 4, 4]}; if(_speed > 120) then {_return = [_base * 5, 6]}; if(_speed > 130) then {_return = [_base * 6, 6]}; }; if(_limit isEqualTo 70) then { _result = true; if(_speed > 70) then {_return = [_base * 1, 0]}; if(_speed > 100) then {_return = [_base * 3, 2]}; if(_speed > 120) then {_return = [_base * 4, 4]}; if(_speed > 130) then {_return = [_base * 5, 6]}; if(_speed > 140) then {_return = [_base * 6, 6]}; }; if(_limit isEqualTo 80) then { _result = true; if(_speed > 80) then {_return = [_base * 1, 0]}; if(_speed > 110) then {_return = [_base * 3, 2]}; if(_speed > 130) then {_return = [_base * 4, 4]}; if(_speed > 140) then {_return = [_base * 5, 6]}; if(_speed > 150) then {_return = [_base * 6, 6]}; }; if(_limit isEqualTo 90) then { _result = true; if(_speed > 90) then {_return = [_base * 1, 0]}; if(_speed > 120) then {_return = [_base * 3, 2]}; if(_speed > 140) then {_return = [_base * 4, 4]}; if(_speed > 150) then {_return = [_base * 5, 6]}; if(_speed > 160) then {_return = [_base * 6, 6]}; }; if(_limit isEqualTo 100) then { _result = true; if(_speed > 100) then {_return = [_base * 1, 0]}; if(_speed > 140) then {_return = [_base * 3, 2]}; if(_speed > 160) then {_return = [_base * 4, 4]}; if(_speed > 170) then {_return = [_base * 5, 6]}; if(_speed > 180) then {_return = [_base * 6, 6]}; }; if(_limit isEqualTo 110) then { _result = true; if(_speed > 110) then {_return = [_base * 1, 0]}; if(_speed > 140) then {_return = [_base * 3, 2]}; if(_speed > 160) then {_return = [_base * 4, 4]}; if(_speed > 170) then {_return = [_base * 5, 6]}; if(_speed > 180) then {_return = [_base * 6, 6]}; }; if(_limit isEqualTo 120) then { _result = true; if(_speed > 120) then {_return = [_base * 1, 0]}; if(_speed > 150) then {_return = [_base * 3, 2]}; if(_speed > 170) then {_return = [_base * 4, 4]}; if(_speed > 180) then {_return = [_base * 5, 6]}; if(_speed > 190) then {_return = [_base * 6, 6]}; }; if(!_result) then { _return = [0,0]}; _return Also create the next file in and call him fn_controlvelocidad.sqf /* File: fn_calcularsancionconlimite.sqf Author: LoSantosYT Description: Recibe una llamada desde un trigger. MAL, CAMBIAR Parámetros: 0: Número, límite de velocidad 1: String, nombre público del radar 2: Jugador, jugador que va en el vehículo [limite, "Nombre del radar", jugador] call lsyt_fn_controlvelocidad; [120, "Autopista Morrison-Lakeside PK.5", player] lsyt_fn_controlvelocidad Condición trigger: this && (local player) && (vehicle player in thisList) Script en el trigger: [120, "Nombre autopista", player] call lsyt_fnc_controlvelocidad */ params ["_limit", "_name", "_speed", "_player"]; private["_fineCalc", "_vehicle", "_speed", "_trigger", "_license", "_fine", "_percentage", "_plate", "_points", "_speeltime", "_text"]; _vehicle = vehicle _player; _speed = speed _vehicle; _speed = round _speed; // Comprobar que se haya superado el límite de velocidad if(_speed <= _limit) exitWith {}; // Comprobar que el jugador esté montado a un vehículo if(_player == _vehicle) exitWith {}; // Comprobar que el jugador sea civil if(side _player != civilian) exitWith {}; // Comprobar que el jugador sea el conductor if(_player != driver _vehicle) exitWith {}; // Los radares tienen un margen de error... // Si el límite es = o menor de 100, es el límite + 10 if(_limit <= 100) then { _trigger = _limit + 10; } else { // Si el límite es +100, el margen es 110% del límite _trigger = round (limit * 1.10); }; if(_speed < _trigger) exitWith {}; // Aquí estaría bien añadir un sleep random de x tiempo para que la gente tenga la incertidumbre de si le ha saltado o no... // _tiempo = random 15; // sleep _tiempo (...) //sleep _sleeptime; playSound "fotoradar"; cutText ["","WHITE OUT",0.5]; cutText ["","WHITE IN",0.5]; // Ahora, la cantidad también depende de la velocidad a la que íbamos... // Para simplificarlo, lo haré en base a una función con un máximo, pero siguiendo una fórmula _fineCalc = [_limit, _speed] call lsyt_fnc_calcmulta; _fine = _fineCalc select 0; // Si encima no tiene el permiso de conducir, le sumamos un plus fijo _license = license_civ_driver; if(!_license) then { _fine = _fine + 500; // Cantidad a sumar si no tiene el carnet }; _points = _fineCalc select 1; _plate = _vehicle; _datos = format ["CIRCULAR A %1 KM/H, TENIENDO LIMITADA LA VELOCIDAD A %2 KM/H. VELOCIMETRO DE POLICE DEPARTAMENT QUE HA SIDO SOMETIDO AL CONTROL METEOROLÓGICO LEGALMENTE ESTABLECIDO.", _speed, _limit]; // Llamamos al sistema de sanciones systemChat "Deberia aparecer la multa"; // La notificación por hint se genera por partes _text = "<t size='2'>DGT</t><br/><t size='1'>Notificación de sanción</t><t align='left'>"; _text = _text + format["<br/><br/><t size='1' underline='true'>1. LUGAR DE DENUNCIA</t><br/>%1", _name]; _text = _text + format["<br/><br/><t size='1' underline='true'>2. HECHO DENUNCIADO</t><br/>%1", _datos]; _text = _text + format["<br/><br/><t size='1' underline='true'>3. DATOS VEHÍCULO</t><br/>Velocidad captada: %1 Km/h", _speed]; _text = _text + format["<br/><br/><t size='1' underline='true'>SANCIÓN</t>"]; if(_fine > 0) then { imperial_bank = (imperial_bank - _fine) max 0; _text = _text + format["<br/>Importe total multa: %1 € (PAGADO)", _fine]; }; _text = _text + "</t>"; hint parseText _text; // Lo enviamos // ... y ya estaría. Result:
  6. I'm not a developer to begin with, but I do like to try things like this. What this script does is to detect if the player is carrying a weapon on him or in his backpack. If so, it beeps Difficulty: Easy Credit to: LoSantosYT We go to editor and put an trigger 10 x 10 x 10 I have the game in Spanish, sorry. Look for the translation of the options: Condition: this && !(weapons player isEqualTo []) When activated: hintSilent "Player have weapon!"; I put that sound "CarAlarm" which is from mod, but you can choose the one you like the most. Just as you can remove the hintSilent "Player have weapon!"; what it does is to warn the players. And finally put it near a structure similar to a metal detector: I am using the structure of this AimRabbit mod: https://steamcommunity.com/sharedfiles/filedetails/?id=1589118688
  7. The post was deleted, what was it?
  8. For the cop level you should check in the database if you have it added. you should have something like this. To create a swat license just go to config/Config_Licenses and create one for cop. And then you only have to put as a condition when buying the clothes "call life_coplevel >= 7 number chosen for the Swat" or "licence_cop_Swat" for example.
  9. for that you can use the CopLevel or create a license in the Config_License
  10. I am going to help you, since they have removed the search option. But there is already a topic with that in the forum (I can't give you credits because I can't find it). 1. Go to init.sqf and paste this on the top [] execVM "script\tfr_channellock.sqf"; 2. Go to mission folder and create and other folder with name "script" 3. Go to script folder and create tfr_channellock.sqf file. 4. Open tfr_channellock.sqf and paste this: /* File: tfr_channellock Author: Unknown Author Edited by LoSantosYT Description: Channel lock for Task For Radio "Lock police and ems channel" */ private["_hasLRRadio", "_hasSWRadio","_radioArray","_radios", "_channel", "_currentFreq","_check","_curfreqsr"]; if(playerSide != civilian) exitWith {}; [] spawn { while {true} do { _radioArray = []; _radios = player call TFAR_fnc_radiosList; _hasLRRadio = call TFAR_fnc_haveLRRadio; _hasSWRadio = call TFAR_fnc_haveSWRadio; if((count _radios) isEqualTo 1) then { if(_hasLRRadio) then { _channel = (call TFAR_fnc_ActiveLRRadio) call TFAR_fnc_getLRChannel; _channel = _channel + 1; if (driver (vehicle player) == player && (vehicle player) != player) then { _curfreqlr = [(call TFAR_fnc_activeLrRadio), _channel] call TFAR_fnc_GetChannelFrequency; _curfreqlr = parseNumber _curfreqlr; if( _curfreqlr >= 33 && _curfreqlr <= 34 ) then { ["33.1 - 33.9 son frecuencias bloqueadas.","error"] spawn Aquaman_fnc_notification_system; [(call TFAR_fnc_activeLrRadio), _channel, "41"] call TFAR_fnc_SetChannelFrequency; }; }; }; if(_hasSWRadio) then { _channel = (call TFAR_fnc_ActiveSwRadio) call TFAR_fnc_getSwChannel; _channel = _channel + 1; _curfreqsr = [(call TFAR_fnc_activeSwRadio), _channel] call TFAR_fnc_GetChannelFrequency; _curfreqsr = parseNumber _curfreqsr; if(!isNil "_curfreqsr") then { if( _curfreqsr >= 33 && _curfreqsr <= 34 ) then { ["33.1 - 33.9 son frecuencias bloqueadas.","error"] spawn Aquaman_fnc_notification_system; [(call TFAR_fnc_activeSwRadio), _channel, "41"] call TFAR_fnc_SetChannelFrequency; }; }; }; } else { { if(_x != "tf_anprc148jem") then { player unassignItem _x; player removeItem _x; }; if(_hasSWRadio) then { _channel = (call TFAR_fnc_ActiveSwRadio) call TFAR_fnc_getSwChannel; _channel = _channel + 1; _curfreqsr = [(call TFAR_fnc_activeSwRadio), _channel] call TFAR_fnc_GetChannelFrequency; if(!isNil "_curfreqsr") then { ["Estás intentando acceder a una frecuencia bloqueada...","error"] spawn Aquaman_fnc_notification_system; [(call TFAR_fnc_activeSwRadio), _channel, str (round(random 480)+30)] call TFAR_fnc_SetChannelFrequency; }; }; } forEach _radios; uiSleep 3; }; uiSleep 2; }; };
  11. What this script does is to automatically set radio frequencies to the player. This is not only useful for Altis, but for cooperative missions as well. In my case I use it so that the police can configure all the channels with their respective frequencies (since these are blocked for civilians). Difficulty: Easy Credit To: LoSantosYT The resources that I use: We go to \core\functions\fn_keyHandler.sqf we can put it wherever we want, I recommend putting it in the middle or at the end of the document. //Shift + F1 - RADIO case 59: { if (_shift) then { if (playerSide in [west]) then { //Function -->[(if short or long range, channel, frequency] call TFAR_fnc_SetChannelFrequency [(call TFAR_fnc_activeSwRadio), 1, "33.1"] call TFAR_fnc_SetChannelFrequency; [(call TFAR_fnc_activeSwRadio), 2, "33.2"] call TFAR_fnc_SetChannelFrequency; [(call TFAR_fnc_activeSwRadio), 3, "33.3"] call TFAR_fnc_SetChannelFrequency; [(call TFAR_fnc_activeSwRadio), 4, "33.4"] call TFAR_fnc_SetChannelFrequency; [(call TFAR_fnc_activeSwRadio), 5, "33.5"] call TFAR_fnc_SetChannelFrequency; [(call TFAR_fnc_activeSwRadio), 6, "33.6"] call TFAR_fnc_SetChannelFrequency; [(call TFAR_fnc_activeSwRadio), 7, "33.7"] call TFAR_fnc_SetChannelFrequency; [(call TFAR_fnc_activeSwRadio), 8, "70.1"] call TFAR_fnc_SetChannelFrequency; //Notification ["Established frequencies", "info"] call Aquaman_fnc_notification_system; }; }; }; If we wanted the same for a long-range radio, we replace it with: [(call TFAR_fnc_activeLrRadio), 1, "30"] call TFAR_fnc_SetChannelFrequency; I placed it here because it seems easier to me that every time the player's frequencies are changed, he gets them right again. Post from where I got the script: https://forums.bohemia.net/forums/topic/191099-task-force-radio-auto-channel-set-script/
  12. Thank you very much. Finally, in a robbery, how could I make the notification only for the police? changing the 0 for west?
  13. I am new to the subject, and I wanted to know how to put this system in a global notification (such as when they steal or capture a zone) that reaches all players that notification?
  14. this is not necessary to write anything in the eden editor?
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.