Jump to content

TolH

Member
  • Posts

    73
  • Joined

  • Days Won

    2

Reputation Activity

  1. Like
    TolH got a reaction from RC_Robio in Simple Server -LogReader- in python   
    If you are like me and love to make random Arma3 server for fun "LOCALLY". And/or making scripts and want to look for errors or whatever without opening the .rpt manually to keep track of your errors, then you can use this, made in python to stream your .rpt live on a second screen to see whats going on? Then maybe you will find an utility for it.
    What is this script doing ?
    Well it's main function is to constantly stream your server .rpt in a seperate window to keep track of anything you like.
    Right now i use it to see any errors and copy the errors to a file when found.
    It also copy "tickets" or "idea" from a function i have on the server to a file.
    Can be expanded to suit your need for anything you like if you know a tiny bit of python like i do.
    Video link:
    The script:
    Can be easily tested in VSCode, to get a cmd prompt like in the video, you will need some setting on opening a .py file.
    #//=======================================================// import sys, time, os, glob#, psutil #//=======================================================// # §§§ CONFIGS START HERE §§§ #//=======================================================// # # (SET YOUR OWN PATH TO SERVER .rpt FILE!) AUTO OPEN LATEST CREATED .RPT FROM SERVER, NO FILE NEED TO BE CREATED! Server_RPT_location = 'D:/SteamLibrary/steamapps/common/Arma 3/SC_0908_MAIN/*.rpt' # (SET YOUR OWN PATH TO SERVER .err FILE!) YOU HAVE TO CREATE THE FILE FIRST! Error_logs = 'D:/SteamLibrary/steamapps/common/Arma 3/SC_0908_MAIN/-=ERRORS_LOGS=-.err' # (SET YOUR OWN PATH TO SERVER .tck FILE!) YOU HAVE TO CREATE THE FILE FIRST! Tickets_logs = 'D:/SteamLibrary/steamapps/common/Arma 3/SC_0908_MAIN/-=TICKETS_LOGS=-.tck' # #//=======================================================// # §§§ CONFIGS END HERE §§§ #//=======================================================// os.system("") class ColorStyle(): RED = '\033[91m' GREEN = '\033[92m' BLUE = '\033[0;94m' YELLOW = '\033[0;93m' BLACK='\033[0;90m' PURPLE='\033[0;95m' CYAN='\033[0;96m' WHITE='\033[0;97m' RESET = '\033[0m' #//=======================================================// print (ColorStyle.YELLOW + ''' ______ ______ ______ ______ ______ ______ ______ ______ ______ ______ ______ ______ | | | | | | | | | | | | | _ _____ _ _____ _ _ | | | __ \ | | / ____| (_) | | | | ___ __ _| |__) |___ __ _ __| | ___ _ __ | (___ ___ _ __ _ _ __ | |_ | | / _ \ / _` | _ // _ \/ _` |/ _` |/ _ \ '__| \___ \ / __| '__| | '_ \| __| | |___| (_) | (_| | | \ \ __/ (_| | (_| | __/ | ____) | (__| | | | |_) | |_ |______\___/ \__, |_| \_\___|\__,_|\__,_|\___|_| |_____/ \___|_| |_| .__/ \__| __/ | | | |___/ |_| |______|______|______|______|______|______|______|______|______|______|______|______| ''') #//=======================================================// array_char_sel = ['.',':'] time_cnt = 0 log_delay = 30 #wait 15 seconds so server can create .log files first before starting main loop sys.stdout.write('Loading latest Arma3_server log:') # for tick_range in range(log_delay): sys.stdout.write (array_char_sel[0]) sys.stdout.flush() time.sleep(0.5) time_cnt = time_cnt + 1 # if (time_cnt == log_delay): sys.stdout.write (array_char_sel[1]) print(ColorStyle.GREEN + "\n") # # #//=======================================================// open_Server_RPT_location = open(max(glob.glob(Server_RPT_location),key=os.path.getctime), 'r') #read latest .rpt log file from server keep_reading_loop = 1 read_speed = 0.010 #DEFAULT 0.010 #//=======================================================// # SERVER HAS BEEN STARTED AND LOGS SHOULD BE AVAILABLE, STRATING LOOP while (keep_reading_loop == 1): # Server_RPT = open_Server_RPT_location.readline() #read latest .rpt file from server open_Error_RPT_location = open(Error_logs, 'a') #append latest .err errors file from server write_Tickets_logs = open(Tickets_logs,'a') #append latest .tck tickets file from server # #if Server_RPT.isascii(): #Returns True if all characters in the string are ascii characters if Server_RPT.find(":") != -1: time.sleep(read_speed) print(Server_RPT.strip ("\n")) # if (Server_RPT.find("ERROR") != -1) or (Server_RPT.find("Error") != -1) or (Server_RPT.find("error") != -1): print(ColorStyle.RED + Server_RPT.strip ("\n") + ColorStyle.GREEN) open_Error_RPT_location.write("%s %s" % (time.strftime("%Y-%m-%d %H:%M"), Server_RPT)) # if Server_RPT.find("PLAYER CONNECTED") != -1 or Server_RPT.find("PLAYER DISCONNECTED") != -1 or Server_RPT.find("SL_Zeus") != -1: print(ColorStyle.BLUE + Server_RPT.strip ("\n") + ColorStyle.GREEN) # if Server_RPT.find("TIMSBR SUBMITBOX:") != -1: print(ColorStyle.YELLOW + Server_RPT.strip ("\n") + ColorStyle.GREEN) write_Tickets_logs.write("%s %s" % (time.strftime("%Y-%m-%d %H:%M"), Server_RPT)) # if Server_RPT.find("Class CBA_Extended_EventHandlers_base destroyed with lock count") != -1: keep_reading_loop = 0 # else: #Arma3server_Running = "arma3server_x64.exe" in (p.name() for p in psutil.process_iter()) time.sleep(0.5) #if (Arma3server_Running == False): #keep_reading_loop = 0 # #//=======================================================// open_Server_RPT_location.close() open_Error_RPT_location.close() write_Tickets_logs.close() loopEnded = input(ColorStyle.RED + ' -=============(ARMA3 SERVER IS NOT RUNNING OR CRASHED!!! Press enter to exit or restart)=============-' + ColorStyle.RESET) #//=======================================================// # TODO ADD CHOICE TO EITHER EXIT OR RESTART THE SERVER #os.startfile('D:\SteamLibrary\steamapps\common\Arma 3\SC_0908_MAIN\LogReader_Server.py')  
  2. Thanks
    TolH reacted to DirtySanchez in Simple Server -LogReader- in python   
    Looks good thank for the share
  3. Like
    TolH got a reaction from He-Man in Simple Server -LogReader- in python   
    If you are like me and love to make random Arma3 server for fun "LOCALLY". And/or making scripts and want to look for errors or whatever without opening the .rpt manually to keep track of your errors, then you can use this, made in python to stream your .rpt live on a second screen to see whats going on? Then maybe you will find an utility for it.
    What is this script doing ?
    Well it's main function is to constantly stream your server .rpt in a seperate window to keep track of anything you like.
    Right now i use it to see any errors and copy the errors to a file when found.
    It also copy "tickets" or "idea" from a function i have on the server to a file.
    Can be expanded to suit your need for anything you like if you know a tiny bit of python like i do.
    Video link:
    The script:
    Can be easily tested in VSCode, to get a cmd prompt like in the video, you will need some setting on opening a .py file.
    #//=======================================================// import sys, time, os, glob#, psutil #//=======================================================// # §§§ CONFIGS START HERE §§§ #//=======================================================// # # (SET YOUR OWN PATH TO SERVER .rpt FILE!) AUTO OPEN LATEST CREATED .RPT FROM SERVER, NO FILE NEED TO BE CREATED! Server_RPT_location = 'D:/SteamLibrary/steamapps/common/Arma 3/SC_0908_MAIN/*.rpt' # (SET YOUR OWN PATH TO SERVER .err FILE!) YOU HAVE TO CREATE THE FILE FIRST! Error_logs = 'D:/SteamLibrary/steamapps/common/Arma 3/SC_0908_MAIN/-=ERRORS_LOGS=-.err' # (SET YOUR OWN PATH TO SERVER .tck FILE!) YOU HAVE TO CREATE THE FILE FIRST! Tickets_logs = 'D:/SteamLibrary/steamapps/common/Arma 3/SC_0908_MAIN/-=TICKETS_LOGS=-.tck' # #//=======================================================// # §§§ CONFIGS END HERE §§§ #//=======================================================// os.system("") class ColorStyle(): RED = '\033[91m' GREEN = '\033[92m' BLUE = '\033[0;94m' YELLOW = '\033[0;93m' BLACK='\033[0;90m' PURPLE='\033[0;95m' CYAN='\033[0;96m' WHITE='\033[0;97m' RESET = '\033[0m' #//=======================================================// print (ColorStyle.YELLOW + ''' ______ ______ ______ ______ ______ ______ ______ ______ ______ ______ ______ ______ | | | | | | | | | | | | | _ _____ _ _____ _ _ | | | __ \ | | / ____| (_) | | | | ___ __ _| |__) |___ __ _ __| | ___ _ __ | (___ ___ _ __ _ _ __ | |_ | | / _ \ / _` | _ // _ \/ _` |/ _` |/ _ \ '__| \___ \ / __| '__| | '_ \| __| | |___| (_) | (_| | | \ \ __/ (_| | (_| | __/ | ____) | (__| | | | |_) | |_ |______\___/ \__, |_| \_\___|\__,_|\__,_|\___|_| |_____/ \___|_| |_| .__/ \__| __/ | | | |___/ |_| |______|______|______|______|______|______|______|______|______|______|______|______| ''') #//=======================================================// array_char_sel = ['.',':'] time_cnt = 0 log_delay = 30 #wait 15 seconds so server can create .log files first before starting main loop sys.stdout.write('Loading latest Arma3_server log:') # for tick_range in range(log_delay): sys.stdout.write (array_char_sel[0]) sys.stdout.flush() time.sleep(0.5) time_cnt = time_cnt + 1 # if (time_cnt == log_delay): sys.stdout.write (array_char_sel[1]) print(ColorStyle.GREEN + "\n") # # #//=======================================================// open_Server_RPT_location = open(max(glob.glob(Server_RPT_location),key=os.path.getctime), 'r') #read latest .rpt log file from server keep_reading_loop = 1 read_speed = 0.010 #DEFAULT 0.010 #//=======================================================// # SERVER HAS BEEN STARTED AND LOGS SHOULD BE AVAILABLE, STRATING LOOP while (keep_reading_loop == 1): # Server_RPT = open_Server_RPT_location.readline() #read latest .rpt file from server open_Error_RPT_location = open(Error_logs, 'a') #append latest .err errors file from server write_Tickets_logs = open(Tickets_logs,'a') #append latest .tck tickets file from server # #if Server_RPT.isascii(): #Returns True if all characters in the string are ascii characters if Server_RPT.find(":") != -1: time.sleep(read_speed) print(Server_RPT.strip ("\n")) # if (Server_RPT.find("ERROR") != -1) or (Server_RPT.find("Error") != -1) or (Server_RPT.find("error") != -1): print(ColorStyle.RED + Server_RPT.strip ("\n") + ColorStyle.GREEN) open_Error_RPT_location.write("%s %s" % (time.strftime("%Y-%m-%d %H:%M"), Server_RPT)) # if Server_RPT.find("PLAYER CONNECTED") != -1 or Server_RPT.find("PLAYER DISCONNECTED") != -1 or Server_RPT.find("SL_Zeus") != -1: print(ColorStyle.BLUE + Server_RPT.strip ("\n") + ColorStyle.GREEN) # if Server_RPT.find("TIMSBR SUBMITBOX:") != -1: print(ColorStyle.YELLOW + Server_RPT.strip ("\n") + ColorStyle.GREEN) write_Tickets_logs.write("%s %s" % (time.strftime("%Y-%m-%d %H:%M"), Server_RPT)) # if Server_RPT.find("Class CBA_Extended_EventHandlers_base destroyed with lock count") != -1: keep_reading_loop = 0 # else: #Arma3server_Running = "arma3server_x64.exe" in (p.name() for p in psutil.process_iter()) time.sleep(0.5) #if (Arma3server_Running == False): #keep_reading_loop = 0 # #//=======================================================// open_Server_RPT_location.close() open_Error_RPT_location.close() write_Tickets_logs.close() loopEnded = input(ColorStyle.RED + ' -=============(ARMA3 SERVER IS NOT RUNNING OR CRASHED!!! Press enter to exit or restart)=============-' + ColorStyle.RESET) #//=======================================================// # TODO ADD CHOICE TO EITHER EXIT OR RESTART THE SERVER #os.startfile('D:\SteamLibrary\steamapps\common\Arma 3\SC_0908_MAIN\LogReader_Server.py')  
  4. Thanks
    TolH got a reaction from DirtySanchez in Simple Server -LogReader- in python   
    If you are like me and love to make random Arma3 server for fun "LOCALLY". And/or making scripts and want to look for errors or whatever without opening the .rpt manually to keep track of your errors, then you can use this, made in python to stream your .rpt live on a second screen to see whats going on? Then maybe you will find an utility for it.
    What is this script doing ?
    Well it's main function is to constantly stream your server .rpt in a seperate window to keep track of anything you like.
    Right now i use it to see any errors and copy the errors to a file when found.
    It also copy "tickets" or "idea" from a function i have on the server to a file.
    Can be expanded to suit your need for anything you like if you know a tiny bit of python like i do.
    Video link:
    The script:
    Can be easily tested in VSCode, to get a cmd prompt like in the video, you will need some setting on opening a .py file.
    #//=======================================================// import sys, time, os, glob#, psutil #//=======================================================// # §§§ CONFIGS START HERE §§§ #//=======================================================// # # (SET YOUR OWN PATH TO SERVER .rpt FILE!) AUTO OPEN LATEST CREATED .RPT FROM SERVER, NO FILE NEED TO BE CREATED! Server_RPT_location = 'D:/SteamLibrary/steamapps/common/Arma 3/SC_0908_MAIN/*.rpt' # (SET YOUR OWN PATH TO SERVER .err FILE!) YOU HAVE TO CREATE THE FILE FIRST! Error_logs = 'D:/SteamLibrary/steamapps/common/Arma 3/SC_0908_MAIN/-=ERRORS_LOGS=-.err' # (SET YOUR OWN PATH TO SERVER .tck FILE!) YOU HAVE TO CREATE THE FILE FIRST! Tickets_logs = 'D:/SteamLibrary/steamapps/common/Arma 3/SC_0908_MAIN/-=TICKETS_LOGS=-.tck' # #//=======================================================// # §§§ CONFIGS END HERE §§§ #//=======================================================// os.system("") class ColorStyle(): RED = '\033[91m' GREEN = '\033[92m' BLUE = '\033[0;94m' YELLOW = '\033[0;93m' BLACK='\033[0;90m' PURPLE='\033[0;95m' CYAN='\033[0;96m' WHITE='\033[0;97m' RESET = '\033[0m' #//=======================================================// print (ColorStyle.YELLOW + ''' ______ ______ ______ ______ ______ ______ ______ ______ ______ ______ ______ ______ | | | | | | | | | | | | | _ _____ _ _____ _ _ | | | __ \ | | / ____| (_) | | | | ___ __ _| |__) |___ __ _ __| | ___ _ __ | (___ ___ _ __ _ _ __ | |_ | | / _ \ / _` | _ // _ \/ _` |/ _` |/ _ \ '__| \___ \ / __| '__| | '_ \| __| | |___| (_) | (_| | | \ \ __/ (_| | (_| | __/ | ____) | (__| | | | |_) | |_ |______\___/ \__, |_| \_\___|\__,_|\__,_|\___|_| |_____/ \___|_| |_| .__/ \__| __/ | | | |___/ |_| |______|______|______|______|______|______|______|______|______|______|______|______| ''') #//=======================================================// array_char_sel = ['.',':'] time_cnt = 0 log_delay = 30 #wait 15 seconds so server can create .log files first before starting main loop sys.stdout.write('Loading latest Arma3_server log:') # for tick_range in range(log_delay): sys.stdout.write (array_char_sel[0]) sys.stdout.flush() time.sleep(0.5) time_cnt = time_cnt + 1 # if (time_cnt == log_delay): sys.stdout.write (array_char_sel[1]) print(ColorStyle.GREEN + "\n") # # #//=======================================================// open_Server_RPT_location = open(max(glob.glob(Server_RPT_location),key=os.path.getctime), 'r') #read latest .rpt log file from server keep_reading_loop = 1 read_speed = 0.010 #DEFAULT 0.010 #//=======================================================// # SERVER HAS BEEN STARTED AND LOGS SHOULD BE AVAILABLE, STRATING LOOP while (keep_reading_loop == 1): # Server_RPT = open_Server_RPT_location.readline() #read latest .rpt file from server open_Error_RPT_location = open(Error_logs, 'a') #append latest .err errors file from server write_Tickets_logs = open(Tickets_logs,'a') #append latest .tck tickets file from server # #if Server_RPT.isascii(): #Returns True if all characters in the string are ascii characters if Server_RPT.find(":") != -1: time.sleep(read_speed) print(Server_RPT.strip ("\n")) # if (Server_RPT.find("ERROR") != -1) or (Server_RPT.find("Error") != -1) or (Server_RPT.find("error") != -1): print(ColorStyle.RED + Server_RPT.strip ("\n") + ColorStyle.GREEN) open_Error_RPT_location.write("%s %s" % (time.strftime("%Y-%m-%d %H:%M"), Server_RPT)) # if Server_RPT.find("PLAYER CONNECTED") != -1 or Server_RPT.find("PLAYER DISCONNECTED") != -1 or Server_RPT.find("SL_Zeus") != -1: print(ColorStyle.BLUE + Server_RPT.strip ("\n") + ColorStyle.GREEN) # if Server_RPT.find("TIMSBR SUBMITBOX:") != -1: print(ColorStyle.YELLOW + Server_RPT.strip ("\n") + ColorStyle.GREEN) write_Tickets_logs.write("%s %s" % (time.strftime("%Y-%m-%d %H:%M"), Server_RPT)) # if Server_RPT.find("Class CBA_Extended_EventHandlers_base destroyed with lock count") != -1: keep_reading_loop = 0 # else: #Arma3server_Running = "arma3server_x64.exe" in (p.name() for p in psutil.process_iter()) time.sleep(0.5) #if (Arma3server_Running == False): #keep_reading_loop = 0 # #//=======================================================// open_Server_RPT_location.close() open_Error_RPT_location.close() write_Tickets_logs.close() loopEnded = input(ColorStyle.RED + ' -=============(ARMA3 SERVER IS NOT RUNNING OR CRASHED!!! Press enter to exit or restart)=============-' + ColorStyle.RESET) #//=======================================================// # TODO ADD CHOICE TO EITHER EXIT OR RESTART THE SERVER #os.startfile('D:\SteamLibrary\steamapps\common\Arma 3\SC_0908_MAIN\LogReader_Server.py')  
  5. Like
    TolH got a reaction from exploadead in Epoch 0.5 Questions   
    it's in:
    "\epoch_config\Configs\CfgEpochClient.hpp"
    look for:

  6. Like
    TolH got a reaction from truemc in Server difficulty   
    Check in your server launch parameter after your loaded mod for something like this:
    -config=@epochhive\server.cfg -port=2302 -profiles=SC_EPOCH -cfg=@epochhive\basic.cfg -name=SC_EPOCH -malloc=tbbmalloc_x64 -autoinit
    If your parameter looks like this -profiles=SC_EPOCH and -name=SC_EPOCH then, go into  your  "\Arma 3\SC_EPOCH\users\SC_EPOCH" and open:  SC_EPOCH.Arma3Profile
    Should look something like this:
    class Missions
    {
        class Epoch {
            template = epoch.Chernarus; // DO NOT CHANGE THIS, IT WILL BREAK YOUR SERVER
            difficulty = "Custom";    // difficulty settings: veteran == NORMAL, mercenary == HARDCORE
        };
    };
  7. Like
    TolH got a reaction from lesvieuxcrevards in [SOLVED]specific daytime at start of mission ?   
    try in @epochhive and open epochconfig.hpp and check this out:
    StaticDateTime[] = {0,0,0,8,0}; // {0,0,0,8,0} would forces the server to start at 8am each time it is started while allowing the year, month and day to stay real time. Any values left at 0 will result in no change.
  8. Like
    TolH got a reaction from natoed in call Epoch_message;   
    Hello,
    Ive got a question about the epoch_message notification.
    I really like the notification epoch uses and wanted to add it to my mission to notify player but i am having format problem.
    this is what i did:
    Client:
    //"Epoch_Message1" "Epoch_Message1" addPublicVariableEventHandler { private ["_Epoch_msg"]; _Epoch_msg = _this select 1; [_Epoch_msg, 10] call Epoch_message; }; And server uses this to use it:
    Epoch_Message1 = ["New mission available. Check map."]; publicVariable "Epoch_Message1";
    But as you can see on the picture below, the message copy the  [  and the  " "How can i get ride of it without breaking it. If i remove anything it doesn't work.
    Thanks!
  9. Like
    TolH got a reaction from truemc in Broken Phone Please help   
    Just a guess, if you added this at the end of your altis.h did you remove the extra  ,  at the end of your last line before the };
    Only thing i can see right now. Or post your complete file.
  10. Like
    TolH got a reaction from vbawol in call Epoch_message;   
    _msg = (_this select 1) select 0; // Would equal "New mission availible. Check Map." Thats great, thanks alot. Actually didn't know you could do = (_this select 1) select 0;  Make sense now!
  11. Like
    TolH reacted to TheVampire in call Epoch_message;   
    In your example you would be getting this in return:
    ["Epoch_Message1",["New mission availible. Check Map."]] So your selections:
    _var = (_this select 0); // Would Equal "Epoch_Message1" _msg = (_this select 1) select 0; // Would equal "New mission availible. Check Map." If you wanted to pass an array of strings you would have to either take the entire array and forEach it or select each element of the array for different variables.
    So:
    Epoch_Message1 = ["New mission available.","Check map."]; publicVariable "Epoch_Message1"; And then:
    _var = (_this select 0); // Would Equal "Epoch_Message1" _msg = (_this select 1) select 0; // Would equal "New mission availible." _msg2 = (_this select 1) select 1; // Would equal "Check map."
  12. Like
    TolH got a reaction from vbawol in call Epoch_message;   
    yes, even better! works great.
    Thank you.
  13. Like
    TolH reacted to TheVampire in call Epoch_message;   
    In a publicVariable there are a few this values. The incoming looks like this:
    ["PublicVariableName",[value1,value2,etc]]
    So you were doing select 1 which selects the value array adding the brackets to the message.
    Should be (_this select 1) select 0;
    I see you have it solved though.
  14. Like
    TolH got a reaction from truemc in call Epoch_message;   
    Hello,
    Ive got a question about the epoch_message notification.
    I really like the notification epoch uses and wanted to add it to my mission to notify player but i am having format problem.
    this is what i did:
    Client:
    //"Epoch_Message1" "Epoch_Message1" addPublicVariableEventHandler { private ["_Epoch_msg"]; _Epoch_msg = _this select 1; [_Epoch_msg, 10] call Epoch_message; }; And server uses this to use it:
    Epoch_Message1 = ["New mission available. Check map."]; publicVariable "Epoch_Message1";
    But as you can see on the picture below, the message copy the  [  and the  " "How can i get ride of it without breaking it. If i remove anything it doesn't work.
    Thanks!
  15. Like
    TolH reacted to vbawol in call Epoch_message;   
    Even better way is to use RemoteExec from the server, like so:
    ["New mission available. Check map.", 10] remoteExec ["Epoch_message",-2]; // -2 targets everyone but the server This way there are no client side changes needed.

    Also, this is the function:
    https://github.com/EpochModTeam/Epoch/blob/e16ee710ae7cd909fa4f9b1eae569a182e8cc10d/Sources/epoch_code/gui/scripts/messaging/Epoch_message.sqf
  16. Like
    TolH reacted to He-Man in call Epoch_message;   
    The "" are standard in this messages. To remove the [] try: Epoch_Message1 = "New mission available. Check map."; publicVariable "Epoch_Message1";
  17. Like
    TolH reacted to He-Man in onPlayerRespawn.sqf   
    If you only want to change the loadout, you can add it to the config (Will also be added in the next Update):
    https://github.com/EpochModTeam/Epoch/commit/e3fb007cf402edd702d416e92ce7765729c15ef8
  18. Like
    TolH reacted to natoed in onPlayerRespawn.sqf   
    also check out this the hard work has been done for us all sometime ago
    my epochconfig.hpp as an example below from line 33 to 81
     
     
  19. Like
    TolH got a reaction from Brian Soanes in onPlayerRespawn.sqf   
    A big thanks to you sir. Working great now, was about to give up after hours of trying and nothing at all was happening. Can't beleive it was this simple :D
  20. Like
    TolH reacted to Brian Soanes in onPlayerRespawn.sqf   
    Make sure in sandbox_config in your mission file, you have respawnOnStart = 0; and not = -1
  21. Like
    TolH got a reaction from natoed in call EPOCH_server_setVToken;   
    Thank you, i got it sorted out. Simply added 2 line in a CUSTOM_FNC_SPAWNVEHICLE function.
    Big thanks for looking it up and your time :D
    It's the way i am using the spawn of vehicle that was making it not work as it should : \
     
  22. Like
    TolH reacted to natoed in call EPOCH_server_setVToken;   
    Soz I thought the script ran client side, cause my post above would have worked if it was client side.
    could try He-Man's answer here
    As its server side the below should work.
    call EPOCH_server_setVToken;
    Also I have noted in lotta scripts/mission systems the "BIG BOYS"  all use the below as well.
    _veh call EPOCH_server_vehicleInit;
    hope you sort it,  i'll shut up now.
    cheers
    natoed
     
  23. Like
    TolH reacted to natoed in call EPOCH_server_setVToken;   
    I take it the script run's client side, remoteexec the vehicle spawning by adding  the below in your missionfile \epoch_config\ConfigsCfgRemoteExec.hpp
    within the  class Functions brackets.
    class EPOCH_server_setVToken { allowedTargets = 2; jip = 0; }; so you use
    _spawnGroup6 call EPOCH_server_setVToken;
    finish with
    _spawnGroup6 remoteexec ['EPOCH_server_setVToken',2];
    try this, let me know plz
    //ADDING GROUND PATROL //GROUP #6 _spawnGroup6 = [_kRandSpawnPos5, 180, "O_G_Offroad_01_armed_F", resistance] _spawnGroup6 call EPOCH_server_setVToken; nul_script6 = [(_spawnGroup6 select 2), (getMarkerPos "Missionmarker1"), 1000] call VEHICLE_PATROL; //BIS_fnc_taskPatrol; TANK_AI_1 = _spawnGroup6 select 0; _spawnGroup6 remoteexec ['EPOCH_server_setVToken',2]; //CREATE VEHICLE MARKER IF OPTION SELECTED if (VEHICLE_MARKER isEqualTo 1) then { _VehicleMarker1 = createMarker ["Vehicle_1", getPos TANK_AI_1]; "Vehicle_1" setMarkerColor "ColorRed"; "Vehicle_1" setMarkerShape "ICON"; "Vehicle_1" setMarkerType "o_mech_inf"; "Vehicle_1" setMarkerText ""; "Vehicle_1" setMarkerSize [0.6,0.6]; }; //ADDING FLYING PATROL //GROUP #7 _spawnGroup7 = [[getMarkerPos "Missionmarker1" select 0, getMarkerPos "Missionmarker1" select 1], 270, "O_Heli_Light_02_F", resistance] _spawnGroup7 call EPOCH_server_setVToken; nul_script7 = [(_spawnGroup7 select 2), (getMarkerPos "Missionmarker1"), 1000] call HELI_PATROL; //BIS_fnc_taskPatrol; HELI_AI_1 = _spawnGroup7 select 0; _spawnGroup7 remoteexec ['EPOCH_server_setVToken',2]; //CREATE VEHICLE MARKER IF OPTION ENABLED if (VEHICLE_MARKER isEqualTo 1) then { _VehicleMarker2 = createMarker ["Heli_1", getPos HELI_AI_1]; "Heli_1" setMarkerColor "ColorRed"; "Heli_1" setMarkerShape "ICON"; "Heli_1" setMarkerType "c_plane"; "Heli_1" setMarkerText ""; "Heli_1" setMarkerSize [0.6,0.6]; };  
    cheers
    natoed
  24. Like
    TolH reacted to raymix in Init.sqf vs Variables.sqf   
    Wrong.
    init.sqf is the first ever script to be loaded in mpmissions. It can be used for anything - from defining variables to compiling functions (just like any other file... filenames means nothing, any file can be used for any task).
    function is also just a variable that is defined by compiling a file (read by engine in form of string), preprocessor takes care of comments and defines if exists.
    Down the list comes compiles and variables files, which are nothing different from init.sqf - they all are just files to be processed.
    When it comes to programming - when you set a variable, it is created in a namespace (a group of blocks in your RAM), if you redefine variable later, it is overwritten.
    This means that there is no such thing as priority. Last defined is the variable that is used.
    To answer your question - if you define same variable in 2 different places, last one to be loaded will be the one used, and since init.sqf is always first file to be loaded and it is used to load variables.sqf, then variable inside variables.sqf is used instead.
  25. Like
    TolH got a reaction from DaveA in Init.sqf vs Variables.sqf   
    The variables you put in init.sqf will be the one that take priority. If no variable is set for an option in the init.sqf, then it will set a default option set from the variables.sqf
    So variables.sqf will only select that option if nothing is set in the init.sqf
    So from init.sqf   "DZE_GodModeBase = true"    will activate that options and will skip the  "DZE_GodModeBase = false" from variables.sqf since the option is already written in your init.
    From the variables.sqf you can see this:
    if (isNil "DZE_GodModeBase") then { DZE_GodModeBase = false; }; So this mean, if no option is set from init.sqf, then the default option will be set from the variables.sqf, in this case, to false.
    I suggest you go take a look here for options you can add in your init

×
×
  • Create New...