Jump to content


  • Content Count

  • Joined

  • Last visited

  • Medals

  • Medals

Community Reputation

10 Good

About cael817

  • Rank
    Private First Class
  1. Hi, Im trying to have some of my functions in a server sided mod (started with -servermod=@testmod), but im having trouble calling and or define them. I came as far as having some logging(diag_log format ["fn_init.sqf ran"] ;). I understood that i might need to be using addPublicvariableEventhandler but i still don't get it =). So if someone could walk me thru this one step at a time i would greatly appreciate it. This far i got in the @testmod folder config.cpp class CfgPatches { class Testmod { units[] = {}; weapons[] = {}; requiredVersion = 0.1; requiredAddons[] = {}; }; }; class CfgFunctions { class Testmod { class main { file = "\x\addons\testmod\init"; class init { postInit = 1; }; }; }; }; and in @testmod\addons\testmod\init\ fn_init.sqf diag_log format ["fn_init.sqf ran"]; call compile preprocessFileLineNumbers "\x\addons\testmod\code\fnc_teleport.sqf"; and in @testmod\addons\testmod\code\ fnc_teleport.sqf fnc_teleport = { onMapSingleClick "vehicle player setPos _pos; onMapSingleClick '';"; hint "Click on the map to teleport"; }; publicVariable "fnc_teleport"; Now ofc. this doesn't work when i call it from the client (testing with call fnc_teleport from the console). And im guessing if i want to utilize this in an addAction i guess it wont work either way but as long as i can call it from the console(which it does if i have the function in the mission) im pretty happy =). So how do i do this properly? and how do i call or spawn it(depending on the function) As you see i never made a @mod but i want to learn and i want to start small otherwise i will never get it but ofc. i want to effectively compile several functions from several scrips. I also if possible want to log which playerUID used each function (admin logging) but i guess that is even more impossible? Thanks. I got it working, still don't know if im doing it properly but i hade some of my paths wrong(i edited my post so hopefully it will work for any one trying to do the same).
  2. cael817

    RPT logs

    Thank you, i was confused i guess =)
  3. cael817

    RPT logs

    Is it just me being confused or didn't the server create a new .rpt log each time you ran a "restart" command before 1.44 or 1.42? Now it seems i need to "shutdown" to make that happen, i dont remember having to do that in a very long time but now my logs grew very large and i noticed it.
  4. Worked prefectly, and thanks for cleaning up =) Thank you very much Larrow
  5. Hi im using this script that i believe Larrow made for making lights around a helipad #define RADIUS 30 #define AMOUNT 100 _target = cursorTarget; _target_pos = getPos _target; if (isNil "borderObjects") then { borderObjects = []; _rad = RADIUS; _bcount = AMOUNT; _inc = 360/_bcount; for "_ang" from 1 to 360 step _inc do { _a = (_target_pos select 0)+(sin(_ang)*_rad); _b = (_target_pos select 1)+(cos(_ang)*_rad); _pos = [_a,_b,_target_pos select 2]; _object = createVehicle ["Land_CncShelter_F", _pos, [], 0, "CAN_COLLIDE"]; borderObjects pushBack _object; }; [format ["Added objects around a radius of (%1m) they will be removed in 30 seconds",RADIUS], 5] call mf_notify_client; }; sleep 30; if ( !(isNil "borderObjects") ) then { { deleteVehicle _x; }forEach borderObjects; borderObjects = nil; }; Can i easily add to this script so each Land_CncShelter_F is rotated x degrees for each increment? I used the Land_CncShelter_F for testing as its easy to see if my changes worked.
  6. cael817

    Disable voting in 1.40

    Thanks, And this seemed to work voteMissionPlayers = 9999; voteThreshold = 1; allowedVoteCmds[] = {}; allowedVotedAdminCmds[] = {};
  7. I noticed in the rpt logs (with 1.40) that when i had set "voteThreshold" to 1.1 it says it reverts to 0.5 What is the right way to disable all forms of voting right now or at least make it impossible for a vote to pass. Thanks ---------- Post added at 14:21 ---------- Previous post was at 12:44 ---------- So, will voteMissionPlayers = 9999; voteThreshold = 1; allowedVoteCmds[] = {}; allowedVotedAdminCmds[] = {}; Suffice?
  8. Thanks for this time and tool nuxil. BEC helped me alot so far =) . Regards Micael
  9. Yes i could do that but i guess that would be to only mark a random player with a high enough value. That i can actually manage to do =). I would like it so the "bounty target" gets marked and hinted about when they approach certain places, like towns or villages, actually having the possibility for adding my own markers and triggers to them might be just what i want. If there where an eventhandler like "nearTown" that would probably be perfect.
  10. Thank you Schatten, I'm thinking that i may i need to take an alternative route to achieve what i want so i looked at KKs Trigger Tutorial here http://killzonekid.com/arma-scripting-tutorials-triggers-v3-1-basic-multiplayer-coding-v1-1/ but how do i get something like this _triggerPositions = nearestLocations [getArray(configFile >> "CfgWorlds" >> worldName >> "centerPosition"), ["NameVillage","NameCity","NameCityCapital"], 25000]; to output/reflect this ? _triggerPositions = [[0,0,0],[1,1,1],[2,2,2]];
  11. Do i need to make the marker name unique? is this sufficient? _markerName = format["bt%1",(name player)]; _bountyMarker = createMarker ["_markerName", _pos];
  12. I used 1.35 exp for some time now and it seems to run fine, no issues so far =). Thanks for making this tool
  13. I have an variable with a scalar value that changes if the players gets killed or kills someone (cbounty), when they kill someone they get the targets cbounty value added to theirs which is fine in itself. Now i want to add so if cbounty reaches a certain value (lets say 1000) and above it will globally hint the server that "player name" has a bounty of "cbounty" and was last seen near "town name" and place a marker (preferably with the player name) the position where the player where at the time of the hint and then remove the marker some time later (to keep the map clean). I have read that it would be bad to do "while loops" but if i want this script to check all players for a higher cbounty value than the set one from time to time i need some kind of loop right or using "near/nearest(something)" as you understand this is way over my head so any help is appreciated =). i found this thread http://forums.bistudio.com/showthread.php?186287-Select-a-random-player/page1 but that is not how i would like it to behave and i would like players to have a chance of staying away, ill probably make the bounty "bleed" off but thats another issue =). Thanks. Im slowly getting towards something that i think might work #define PUBLIC_AREAS call cityList if (isDedicated) exitWith {}; waitUntil {!isNull player}; player addEventHandler ["Fired", { if (player getvariable "cbounty" > 1000) then { if ({(_this select 0) distance getMarkerPos (_x select 0) < _x select 1} count PUBLIC_AREAS > 0) then { systemChat "A high value target was last seen near the area marked on the map"; createBountyMarker = { deleteMarker "bountyMarker"; _pos = getPos (vehicle player); _markerText = format["Bounty Target, %1",(name player)]; _bountyMarker = createMarker ["bountyMarker", _pos]; _bountyMarker setMarkerShape "ICON"; _bountyMarker setMarkerPos _pos; _bountyMarker setMarkerText _markerText; _bountyMarker setMarkerColor "ColorRed"; _bountyMarker setMarkerType "select"; sleep 300; deleteMarker _bountyMarker; }; [] spawn createBountyMarker; }; }; }]; This places the marker for me, but i would like to if possible to use all "NameCityCapital","NameCity","NameVillage","CityCenter" and maybe other places. Can i use that together with the code above? btw cityList is already in A3W [ // Marker Name, Diameter, City Name ["Town_1", 400, "Kavala"], ["Town_2", 300, "Agios Dionysios"], ["Town_3", 150, "Abdera"], etc. but it doesnt and shouldn't contain all towns. I could of create one separate with all towns if that's good practice? Is it possible to suppress the "systemChat" or make a (global) hint that only throws once in a while. Also can i add more eventhandlers ("fired" isnt really optimal for what i want) into this or is it better to put all the towns etc into an array and create triggers on top of those? not that i think i will figure that out by myself =). Or can one create an custom eventhandler that is something like "enteringTown"? (any town or something like that above) that would be really nice...
  14. cael817

    RCon loses its connection

    Sorry, i forgot to thanks you for the info Nuxil, i also wanted to inform that i never gott rid of the problem until i did a complete reinstall of windows, i was probably just to lazy to go thru the register or whatever i forgot to remove =). Bec is a great tool btw! Thanks again.
  15. Thanks austin_medic, Worked like a charm and i learned that you need to restart the mission/local server from time to time =). I actually had it like that but it just threw errors at me, guess that's what you get doing stuff other than sleep 4 in the morning. Thanks again