Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×

Eroge

Member
  • Content Count

    36
  • Joined

  • Last visited

  • Medals

Everything posted by Eroge

  1. I'm a noob for scripting so plz forgive me if I say something stupid. I'm trying to make a script to limit the number of fixed-wing aircraft for each side cause spamming aircraft is so annoying. I tried this to count the number of planes of opfor: _countEastVehicles = { side _x == east } count vehicles; _eastVehiclesInArray = []; { if (side _x == east) then { _eastVehiclesInArray set [count _eastVehiclesInArray, _x]; }; } forEach vehicles; But How do I get a number in return so I can compare it with the vehicle limit?
  2. They do have side actually (but in my scenario there won't be any empty aircraft so it won't return "CIV") the description of "side" function and thanks a lot for that
  3. That's exactly what I was trying to say, and my problem is I have no idea how to get the number of the aircraft on player side when a player is trying to purchase another aircraft
  4. This is the SQL file from a3wasteland, and what do the characters at the end of the line mean?
  5. So I made a simple blacklist script like this (this is the best I can do with my knowledge of scripting...) _blacklistedUIDList = ["UID12345678"]; if (getplayerUID player in _blacklistedUIDList) then { ["<t color='#ff0000' font='PuristaBold' align='center' size='3'>You're Banned</t>", 0, 0.9, 30, 2] spawn BIS_fnc_dynamicText; endMission "Banned"; }; if (true) exitWith { sleep 3; ["<t color='#ffffff' font='PuristaBold' align='center' size='2'>Welcome to the Server</t>", 0, 0.9, 30, 2] spawn BIS_fnc_dynamicText; playMusic "gameIntro"; }; So every time I want to add a new blacklisted UID I'll have to reupload the mission file, how can I store the uid list serverside?
  6. very helpful, thanks a lot!
  7. Eroge

    Solo Tank Script

    Just let you know, this script stopped functioning for no reason (the AI driver is still in the driver's seat but wont receive any command) after working properly for like 20 minutes in my vehicle deathmatch PVP mission. I'm still looking into this trying to figure this out... I wrote [] execVM "solotank.sqf"; in the initPlayerLocal.sqf
  8. Is it possible to change the color of the smoke according to the occupier of the sector (or change the picture of the sector icon)?
  9. I'm using the official sector module, so I suppose the expression field of the module could do something?
  10. Does this radar detect the shells that would fall in the range of detection, or it detects the shells that already entered the range of detection? Cause I want to modify this script into an arty warning script for vehicles like Warthunder
  11. I tried that mission, but when the mortar shells incoming I only got hint instead of siren...
  12. Very interesting script... but I can't get it to work! I did exactly what you wrote in readme, and I didn't hear the sirena for the whole time. I could really use a video tutorial
  13. I add some info in this kill info code, but no matter where the killer is, the vehicle command will only return he's group number, Why??? KAI_fnc_killedInfo = { _victimName = name (_this select 0); _killerName = name (_this select 1); _weaponName = getText (configFile >> "cfgWeapons" >> currentWeapon (_this select 1) >> "displayname"); _distance = (_this select 0) distance (_this select 1); _vehicle = vehicle (_this select 1); systemChat format ["%1 被(was killed by) %2 杀死 | 使用武器(killer's weapon):%3 | 击杀距离(distance):%4米(m)", _victimName, _killerName, _weaponName, _distance]; systemChat format ["%1 驾驶载具(killer's vehicle) %2", _killerName, _vehicle]; }; { _id = _x addMPEventHandler ["MPKilled", { _nul = _this call KAI_fnc_killedInfo; }]; } foreach allUnits; The result: Should I use objectParent instead?
  14. Sorry for that confusing description... and yes I want the class name of the vehicle
  15. Just want to show the killer's vehicle
  16. Is it possible to indicate the hitpoint's name in chat or hint while hitting the enemy vehicle in MP vehicle fights?
  17. found something like this this addEventHandler["HitPart",{{ player sidechat format["Hit: %1",_x select 5] } forEach _this;}]; dont know if it's helpful...
  18. Eroge

    Solo Tank Script

    Hi there, I came into another problem... I tried addWeaponTurret and addMagazineTurret in your codes to add smoke launchers for gunner's seat, but it doesn't work... any suggestions?
  19. I made a repairing script with a progress bar indicates the repairing progress in my mission. And I tried command "removeAction" to temporarily remove the action for players but I can't restore it. The first addAction returned 0 and if I use addAction again it will return 1... so if the player performs repairing again the option won't be removed. Any suggestions?
  20. Thank you, that's really illuminating... and I also found one solution for that, but then I ran into another problem: I want to check the damage of the vehicle to see if it need repairing, and I use damage _target >= 0.01 and if returns true then addaction. But when the vehicle blew a tyre this function returns false.... so I cant repair the tyre, How do I fix this?
  21. Never mind, I found a solution, just check the fuel of the vehicle and see if it's more than 0.... cause I set fuel to 0 while repairing
  22. params["_vehicle"]; _vehicle addAction ["<img image='HG\UI\Icons\reset.paa' size='1.5'/><t color='#ffffff' size='1.5'>"+(localize "STR_HG_EMPTY_VEHICLE")+"</t>",{[(_this select 0)] spawn HG_fnc_emptyVehicle},"",0,false,false,"",'(alive player) AND (alive _target) AND (speed _target <= 10) AND ((objectParent player) isEqualTo _target)']; And this is the fn_addActions.sqf file
  23. params["_vehicle","_question"]; _question = [(localize "STR_HG_EMPTY_QUESTION"),(localize "STR_HG_EMPTY_VEHICLE"),(localize "STR_HG_YES"),(localize "STR_HG_NO")] call BIS_fnc_guiMessage; waitUntil {!isNil "_question"}; _sound = "hg_repair"; if(_question) then { _vehicle setFuel 0; _vehicle setVelocity [0, 0, 0]; hint "正在维修载具"; playSound _sound; with uiNamespace do { waitUntil {!isNull findDisplay 46}; disableSerialization; tag_myProgressBar = findDisplay 46 ctrlCreate ["RscProgress",-1]; tag_myProgressBar ctrlSetPosition [safezoneX+0.3*safezoneW,safezoneY+0.95*safezoneH,0.4*safezoneW,0.02*safezoneH]; tag_myProgressBar ctrlSetTextColor [0.2,0.8,0.4,0.8]; tag_myProgressBar progressSetPosition 0.5; tag_myProgressBar ctrlCommit 0; }; disableSerialization; _ctrl = uiNamespace getVariable "tag_myProgressBar"; private _n = 0; while {_n < 1} do { _n = _n + 0.001; _ctrl progressSetPosition _n; sleep 0.02; }; ctrlDelete _ctrl; uiNamespace setVariable ["tag_myProgressBar",nil]; _vehicle setDamage 0; _vehicle setFuel 1; hint (localize "STR_HG_VEHICLE_EMPTIED"); }; I barely know nothing about coding... and this is the fn_emptyVehicle.sqf in [HG] SimpleShop, I modified the empty vehicle option into repair vehicle option
×