Page 1 of 4 123 ... LastLast
Results 1 to 10 of 38
  1. #1

    Question Access to Procon\Configs ("ini_" files)

    Hello all

    In the past few hours I was writing a plugin in ProconRulz. I was working with "ini_" files.
    It says the files will be saved in "Procon\Configs\..." (I copy&pasted it below)

    My question: How do I get access to this folder?
    From my server provider I just got access to the plugin folder for Procon. (I'm using FileZilla)

    Would be happy if somebody could help me

    Thanks!
    Greetings,

    spampostingYT


    _____________________

    ProconRulz v42 onwards includes support for variables that never get reset or deleted, even if Procon or ProconRulz are stopped and restarted. These variables can be used by choosin names beginning with “ini_”, and the actual value will be saved in an “ini” file in the folder Procon\Configs.

    For example:
    1.You have a server called “myclan.net:90210”
    2.You have a rule such as “On Say;Text save;Set %ini_vars_said% %text%”
    3.In-game, some player chats “save hello world”
    At this point, ProconRulz will write to a file Procon\Configs\myclan.net_90210.ini, creating an entry:
    [vars]
    said=save hello world
    You can inspect the file using Notepad, or any other text editor, to see what’s been stored inthere.
    If the file (or the entry) already exists, then it will be updated with this new value.
    Last edited by spampostingYT; 19-06-2014 at 03:16. Reason: Wrote everything in the wrong language... :P

  2. #2
    Senior Member
    Join Date
    Nov 2013
    Location
    Nsw, Australia
    Posts
    399
    Depends on your provider.. you may not get access to other folders or not... but if you can back down the folders from the plugins

    for me that is /####/procon/Plugins/BF4

    the ini files are stored /####/procon/Configs

    #### is just my user folder within the Procon layer server ignore that part

    so using filezilla to go back folders double click on the ".." folder its a special folder for previous directory much like "." is for current directory
    just work your way back to the base procon folder.. then go to the config folder 8).. if you dont have access to those folders there might be no way for you to access those files.. as i said to begin with.. not all providers allow access to everything
    Last edited by LjMjollnir; 19-06-2014 at 04:50.

  3. #3
    Thank you LjMjollnir!

    I tried out to get to the previous directory, but it doesn't work.

    I wrote a ticket to my provider, I hope it's possible for me to get access to this folder :P

    Is there any way, that ProconRulz writes and edits text files in let's say the Plugin folder, instead of the Configs folder?
    Just in case my provider won't let me access this directory :/


    That's my solution of how my code should work:
    It just writes a file with the player name etc. when a player knifes an admin.
    (I couldn't check it yet, cause I can't access the folder)
    Code:
    On Kill;Weapon Melee;If %v% == %server_admins%;Set %ini_vars_PremiumSlot% Player: %p% - Admin: %v% - Date: %ymd%;Say %p% has knifed an admin! 1 month Premium Slot for you!

  4. #4
    Senior Member
    Join Date
    Nov 2013
    Location
    Nsw, Australia
    Posts
    399
    Quote Originally Posted by spampostingYT View Post
    Thank you LjMjollnir!

    I tried out to get to the previous directory, but it doesn't work.

    I wrote a ticket to my provider, I hope it's possible for me to get access to this folder :P

    Is there any way, that ProconRulz writes and edits text files in let's say the Plugin folder, instead of the Configs folder?
    Just in case my provider won't let me access this directory :/


    That's my solution of how my code should work:
    It just writes a file with the player name etc. when a player knifes an admin.
    (I couldn't check it yet, cause I can't access the folder)
    Code:
    On Kill;Weapon Melee;If %v% == %server_admins%;Set %ini_vars_PremiumSlot% Player: %p% - Admin: %v% - Date: %ymd%;Say %p% has knifed an admin! 1 month Premium Slot for you!
    If %v% == %server_admins%

    The problem with your code is that line right there .. unless of course you only have one admin .. then you could just hard code the name in and it would work no problem 8)..

    cant remember for sure but you could try "contains".. i know contains works on %wk% and not sure if you can substitute a different variable there.. but im fairly sure Proconrulz supports it.. if not you could just write a list of the admins int he code itself

    example of how you would use the contains

    if %server_admins% contains %v%

    or the other option.. writing a rule for each admin

    if %v% == "SpampostingYT" .. etc etc

    now for the setting of the %ini_vars_PremiumSlot%
    the way it is currently written it will only keep the 1 Value there this is what it would look like in the .ini file

    Code:
    [vars]
    PremiumSlot=Player: Diseased-LJ - Admin: SpampostingYT - Date: 21/06/2014
    the problem with your varible is it will replace that PremiumSlot value everytime an admin gets knifed 8).. so unless you are actually watching it its quite a useless value to keep because it might be replaced several times in 1 night of play quite easily.. (not saying your admins are easy to knife.. but just an example)

    you would be better off using a nested varible.. like %ini_PremiumSlots_[%p%]%

    that would create a list that looks like this
    Code:
    [PremiumSlots]
    Diseased-LJ=SpampostingYT 21/06/2014
    BamBam=SpampostingYT 21/06/2014
    then you could look at the ini file later and add the premium slots to your reserve list or something or you can automate it even more using the Exec command

    for example
    Code:
    On kill;Weapon Melee;if %v% == "SpampostingYT"; Playersay you've just earned a preium slot;Exec reservedSlotsList.add %p%
    you can even have it remove the player from the premium slot after a month aswell .. but thats for another topic.. and you need a whole other script for that one. ive done it and it isnt too hard.. but mine is for tracking who has the highest death streak for the month/Week and daily
    Last edited by LjMjollnir; 21-06-2014 at 00:52.

  5. #5
    wow, thank you so much for that long answer!

    Now I understand how the ini command is working. The nested variable is of course what I was looking for, thanks!

    And the Exec command is exactly what I was looking for, too (even without asking )

    Now I try to figure out how to get the player removed from the reservedSlot list after a month, thanks for the advice that this is possible!

    Had to laught at "not saying your admins are easy to knife.. but just an example" It's all right, I understand the issue with my code, you're right.


    Quick note:
    Code:
    If %v% == %server_admins%
    That seems to work for me, every time an admin get's knifed the code works and it says the correct admin name in the chat.

    I'll update my code based on your suggestions, thanks a lot LjMjollnir!


    Btw. that is my code to save the admin names in a var during a round:

    Code:
    # Announce admin joining in-game
    
    On Join;Admin;Say Admin %p% is joining the server!
    
    # Accumulate the admin names in a var %server_admins%
    
    On Spawn;Admin;ServerFirst;Set %server_admins% %p%;End
    On Spawn;Admin;PlayerFirst;Set %server_admins% %p%
    You already told me in another thread that this code is not quite right, but strangely this code works for me.
    (Maybe I'll get the problem, after I implemented the correct code from above :P )

    Greetings
    spampostingYT
    Last edited by spampostingYT; 21-06-2014 at 16:32.

  6. #6
    Senior Member
    Join Date
    Nov 2013
    Location
    Nsw, Australia
    Posts
    399
    Not a problem glad i could help 8)

    as for the admin collection thing ill show you what happens


    Code:
    On Join;Admin;Say Admin %p% is joining the server!
    On Spawn;Admin;ServerFirst;Set %server_admins% %p%;End
    On Spawn;Admin;PlayerFirst;Set %server_admins% %p%
          Say Value of Collected Admins is %server_admins%
    ive just added a Say %Server_admins% for an example.. so this next part looks right

    so below in the code box is what the chat would look like if a few admins join.. Admin1,Admin2,Admin3

    Code:
    Admin1 is joining the server!
    Value of Collected Admins is Admin1
    Admin2 is joining the server!
    Value of Collected Admins is Admin2
    Admin3 is joining the server!
    Value of Collected Admins is Admin3
    since you are not adding the previous copy of %server_admins% to the new copy it will only ever keep the current admin

    Code:
    On Join;Admin;Say Admin %p% is joining the server!
    On Spawn;Admin;ServerFirst;Set %server_admins% %p%;End
    On Spawn;Admin;PlayerFirst;Set %server_admins% %p%,%server_admins%
          Say Value of Collected Admins is %server_admins%
    Code:
    Admin1 is joining the server!
    Value of Collected Admins is Admin1
    Admin2 is joining the server!
    Value of Collected Admins is Admin2,Admin1
    Admin3 is joining the server!
    Value of Collected Admins is Admin3,Admin2,Admin1
    now for the automatically removing part after say 30 days..
    a small snippet of my Deathstreak tracker to help you along

    Code:
       If %ini_dsday_day% != %server_day%;Set %ini_dsday_day% %server_day%;incr %ini_dsweek_day%
       If %ini_dsweek_day% >= 8;Set %ini_dsweek_day% 1
    ive removed the actual Deathstreak part .. unimportant for this... this does show you a way to track if 7 days have passed however 8).. change that 8 to a 31 and you now know when a month has passed ... mind you as i mentioned in the actual post that has my Current Deathstreak post.. This will not work without the companion date script. BamBam started it in the proconrulz topic 8).. if you havent found it by the time i remove my deathstreak script i will post it in here (about 8 hours from now)
    Last edited by LjMjollnir; 21-06-2014 at 23:53.

  7. #7
    Senior Member
    Join Date
    Nov 2013
    Location
    Nsw, Australia
    Posts
    399
    Code:
    On Init;
        Set %server_date% %ymd%Z;
        If %server_date% contains 2014;Set %server_year% 2014
        If %server_date% contains 2015;Set %server_year% 2015
        If %server_date% contains 2016;Set %server_year% 2016
    
        If %server_date% contains _01_;Set %server_month% Jan
        If %server_date% contains _02_;Set %server_month% Feb
        If %server_date% contains _03_;Set %server_month% Mar
        If %server_date% contains _04_;Set %server_month% Apr
        If %server_date% contains _05_;Set %server_month% May
        If %server_date% contains _06_;Set %server_month% Jun
        If %server_date% contains _07_;Set %server_month% Jul
        If %server_date% contains _08_;Set %server_month% Aug
        If %server_date% contains _09_;Set %server_month% Sep
        If %server_date% contains _10_;Set %server_month% Oct
        If %server_date% contains _11_;Set %server_month% Nov
        If %server_date% contains _12_;Set %server_month% Dec
    
        If %server_date% contains _01Z;Set %server_day% 01
        If %server_date% contains _02Z;Set %server_day% 02
        If %server_date% contains _03Z;Set %server_day% 03
        If %server_date% contains _04Z;Set %server_day% 04
        If %server_date% contains _05Z;Set %server_day% 05
        If %server_date% contains _06Z;Set %server_day% 06
        If %server_date% contains _07Z;Set %server_day% 07
        If %server_date% contains _08Z;Set %server_day% 08
        If %server_date% contains _09Z;Set %server_day% 09
        If %server_date% contains _10Z;Set %server_day% 10
        If %server_date% contains _11Z;Set %server_day% 11
        If %server_date% contains _12Z;Set %server_day% 12
        If %server_date% contains _13Z;Set %server_day% 13
        If %server_date% contains _14Z;Set %server_day% 14
        If %server_date% contains _15Z;Set %server_day% 15
        If %server_date% contains _16Z;Set %server_day% 16
        If %server_date% contains _17Z;Set %server_day% 17
        If %server_date% contains _18Z;Set %server_day% 18
        If %server_date% contains _19Z;Set %server_day% 19
        If %server_date% contains _20Z;Set %server_day% 20
        If %server_date% contains _21Z;Set %server_day% 21
        If %server_date% contains _22Z;Set %server_day% 22
        If %server_date% contains _23Z;Set %server_day% 23
        If %server_date% contains _24Z;Set %server_day% 24
        If %server_date% contains _25Z;Set %server_day% 25
        If %server_date% contains _26Z;Set %server_day% 26
        If %server_date% contains _27Z;Set %server_day% 27
        If %server_date% contains _28Z;Set %server_day% 28
        If %server_date% contains _29Z;Set %server_day% 29
        If %server_date% contains _30Z;Set %server_day% 30
        If %server_date% contains _31Z;Set %server_day% 31

  8. #8
    Thanks again for you time!

    wow, I need some time to understand everything and to write it so it works for my requirement.
    Yesterday and today were really stressful days, I hope I'm able to do it tomorrow

    I'll let you know if my efforts were successful in the next few days

  9. #9
    Senior Member
    Join Date
    Nov 2013
    Location
    Nsw, Australia
    Posts
    399
    just post away here if ya need help... i enjoy helping other people with this kind of thing.. even if i dont get it right every time 8)

  10. #10
    So, I finally found some time to spend on your suggested code.
    After endless hours we managed to get the knife announcer running again (was completely broken) :P

    I've inserted this code at the top of my whole rules:
    Code:
    On Init;
        Set %server_date% %ymd%Z;
        If %server_date% contains 2014;Set %server_year% 2014
        If %server_date% contains 2015;Set %server_year% 2015
        If %server_date% contains 2016;Set %server_year% 2016
    
        If %server_date% contains _01_;Set %server_month% Jan
        If %server_date% contains _02_;Set %server_month% Feb
        If %server_date% contains _03_;Set %server_month% Mar
        If %server_date% contains _04_;Set %server_month% Apr
        If %server_date% contains _05_;Set %server_month% May
        If %server_date% contains _06_;Set %server_month% Jun
        If %server_date% contains _07_;Set %server_month% Jul
        If %server_date% contains _08_;Set %server_month% Aug
        If %server_date% contains _09_;Set %server_month% Sep
        If %server_date% contains _10_;Set %server_month% Oct
        If %server_date% contains _11_;Set %server_month% Nov
        If %server_date% contains _12_;Set %server_month% Dec
    
        If %server_date% contains _01Z;Set %server_day% 01
        If %server_date% contains _02Z;Set %server_day% 02
        If %server_date% contains _03Z;Set %server_day% 03
        If %server_date% contains _04Z;Set %server_day% 04
        If %server_date% contains _05Z;Set %server_day% 05
        If %server_date% contains _06Z;Set %server_day% 06
        If %server_date% contains _07Z;Set %server_day% 07
        If %server_date% contains _08Z;Set %server_day% 08
        If %server_date% contains _09Z;Set %server_day% 09
        If %server_date% contains _10Z;Set %server_day% 10
        If %server_date% contains _11Z;Set %server_day% 11
        If %server_date% contains _12Z;Set %server_day% 12
        If %server_date% contains _13Z;Set %server_day% 13
        If %server_date% contains _14Z;Set %server_day% 14
        If %server_date% contains _15Z;Set %server_day% 15
        If %server_date% contains _16Z;Set %server_day% 16
        If %server_date% contains _17Z;Set %server_day% 17
        If %server_date% contains _18Z;Set %server_day% 18
        If %server_date% contains _19Z;Set %server_day% 19
        If %server_date% contains _20Z;Set %server_day% 20
        If %server_date% contains _21Z;Set %server_day% 21
        If %server_date% contains _22Z;Set %server_day% 22
        If %server_date% contains _23Z;Set %server_day% 23
        If %server_date% contains _24Z;Set %server_day% 24
        If %server_date% contains _25Z;Set %server_day% 25
        If %server_date% contains _26Z;Set %server_day% 26
        If %server_date% contains _27Z;Set %server_day% 27
        If %server_date% contains _28Z;Set %server_day% 28
        If %server_date% contains _29Z;Set %server_day% 29
        If %server_date% contains _30Z;Set %server_day% 30
        If %server_date% contains _31Z;Set %server_day% 31
    Then, I've added your 2 code-lines below our knife-announcer rule.
    This is how it looks now:

    Code:
    #             ADMIN GOT KNIFED ANNOUNCER
    
    
    On Kill;Weapon Melee;If %server_admins% contains %v%;Exec reservedSlotsList.add %p%;Set %ini_PremiumSlots_[%p%]% Player: %p% - Admin: %v% - Date: %ymd%;Say %p% has knifed an admin! 1 month Premium Slot for you!
    If %pcountrykey% == de;PlayerYell %p%, du hast soeben einen Admin gemessert! Du hast einen Premium Slot fuer einen Monat erhalten!
    If %pcountrykey% != de; PlayerYell %p%, you have knifed an Admin! 1 month Premium Slot for you!
    If %ini_dsday_day% != %server_day%;Set %ini_dsday_day% %server_day%;incr %ini_dsweek_day%
       If %ini_dsweek_day% >= 31;Set %ini_dsweek_day% 1
    So there is still missing a bit, we tried to figure it out, but we couldn't find the solution :P
    So far, the 2 lines are synchronising %ini_dsday_day% with %server_day%.
    If %ini_dsweek_day% passed 31 days, it will get reset to 1 again.
    Right?
    So how do we manage it, that the player we've added to the Reserved-Slot-List, will get removed after those 31 days?


    And something else:
    With the current code, everytime an admin gets knifed, the message "%p% has knifed an admin! 1 month Premium Slot for you!" flashes 3 times in the chat, instead of 1 time O.o
    Also, if the player has been added to the Reserved Slot List and we klick the green arrows (refresh), the name dissapears from the list again. (Before we refresh, the Server handles the player as a Reserved-Slot-Member)

    Any ideas why this is happening?

    Thank you very much!

    Greetings
    spampostingYT

    ____
    I'm really tired after these many hours trying to get everything right. So sorry for any faults I made while writing this
    Last edited by spampostingYT; 19-07-2014 at 02:43.

 

 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •