Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Senior Member
    Join Date
    Oct 2015
    Location
    Germany
    Posts
    285

    Post BF4 Proconrulz - Feature for server admins - who started my server? (working code)

    hi guys
    here is a working code for server admins. this code makes a ranking list of the players that have "started" the server (joined on the empty server and played the first round). the players get points for each "server start". you can check the stats with commands at any time.

    for exemple: your server is empty. the round is not started because no player is on your server. a few hours later your server is running with many players. with this code and the command !server you can see the playernames that have "started" the server (the first 8 players). this is a nice feature for admins and clans.


    HOW TO USE:
    it detect automatically when the first server round is starting (every time until 8 players). in this case the current playernames will be stored externally with a ranking score (1 point for each "server start"). you can check the stats (player points) with commands at any time.


    COMMANDS:
    !server - shows the playernames that have "started" the server
    !points - shows the ranking score (points) from current player
    !points <playername> - shows the ranking score (points) from target player
    !resetplayerpoints - clean/reset all points form all players (only for admins)


    CODE FOR PROCONRULZ - part 1
    Code:
    ####       SERVER FIRST ROUND PLAYER COUNTER   -   Part 1   -   by maxdralle        #######################################################
    # This code makes a ranking list of the players that have "started" the server (joined on the empty server and played the first round). they get points for each "server start"
    # COMMANDS: !server, !points, !points <playername>, !resetplayerpoints (only for admins)
    
    On Kill; if %score% > 1; if %ts1% + %ts2% < 8; PlayerFirst; if %server_global_53[%reasytosetpoints%]% <> 1; if %server_global_53[%reasytosetpoints%]% <> 2; Set %server_global_53[%reasytosetpoints%]% 1;Log SERVER FIRST ROUND COUNTER: Round started until 8 players. Ready to set VIP points...
    On Kill; if %score% > 1;if %ts1% + %ts2% > 8;PlayerFirst; if %server_global_53[%reasytosetpoints%]% <> 1; if %server_global_53[%reasytosetpoints%]% <> 2; Set %server_global_53[%reasytosetpoints%]% 2
    On Spawn; if %server_global_53[%reasytosetpoints%]% == 1; if %tmpRankReg% <> 1; 
        if %server_global_58[%tmproundstarted%]% <> 1; Set %ini_firstroundcounter% 0; Set %ini_firstroundcounter_datetime% %ymd%__%hms%; Set %server_global_58[%tmproundstarted%]% 1
        if %tmpRankReg% <> 1;if %ini_firstroundcounter_player1% == 0; Set %tmpRankReg% 1 ;Set %ini_firstroundcounter_player1% %p%;Set %ini_ranking_%p%% 1+ %ini_ranking_%p%%; PlayerSay %p% thank you for playing the first round! (VIP points: %tmpVIPScore%/10)
        if %tmpRankReg% <> 1;if %ini_firstroundcounter_player2% == 0; Set %tmpRankReg% 1 ;Set %ini_firstroundcounter_player2% %p%;Set %ini_ranking_%p%% 1+ %ini_ranking_%p%%; PlayerSay %p% thank you for playing the first round! (VIP points: %tmpVIPScore%/10)
        if %tmpRankReg% <> 1;if %ini_firstroundcounter_player3% == 0; Set %tmpRankReg% 1 ;Set %ini_firstroundcounter_player3% %p%;Set %ini_ranking_%p%% 1+ %ini_ranking_%p%%; PlayerSay %p% thank you for playing the first round! (VIP points: %tmpVIPScore%/10)
        if %tmpRankReg% <> 1;if %ini_firstroundcounter_player4% == 0; Set %tmpRankReg% 1 ;Set %ini_firstroundcounter_player4% %p%;Set %ini_ranking_%p%% 1+ %ini_ranking_%p%%; PlayerSay %p% thank you for playing the first round! (VIP points: %tmpVIPScore%/10)
        if %tmpRankReg% <> 1;if %ini_firstroundcounter_player5% == 0; Set %tmpRankReg% 1 ;Set %ini_firstroundcounter_player5% %p%;Set %ini_ranking_%p%% 1+ %ini_ranking_%p%%; PlayerSay %p% thank you for playing the first round! (VIP points: %tmpVIPScore%/10)
        if %tmpRankReg% <> 1;if %ini_firstroundcounter_player6% == 0; Set %tmpRankReg% 1 ;Set %ini_firstroundcounter_player6% %p%;Set %ini_ranking_%p%% 1+ %ini_ranking_%p%%; PlayerSay %p% thank you for playing the first round! (VIP points: %tmpVIPScore%/10)
        if %tmpRankReg% <> 1;if %ini_firstroundcounter_player7% == 0; Set %tmpRankReg% 1 ;Set %ini_firstroundcounter_player7% %p%;Set %ini_ranking_%p%% 1+ %ini_ranking_%p%%; PlayerSay %p% thank you for playing the first round! (VIP points: %tmpVIPScore%/10)
        if %tmpRankReg% <> 1;if %ini_firstroundcounter_player8% == 0; Set %tmpRankReg% 1 ;Set %ini_firstroundcounter_player8% %p%;Set %ini_ranking_%p%% 1+ %ini_ranking_%p%%; PlayerSay %p% thank you for playing the first round! (VIP points: %tmpVIPScore%/10)
        if %ini_firstroundcounter_player8% <> 0; Set %server_global_53[%reasytosetpoints%]% 2; Log SERVER FIRST ROUND: Set VIP points: %ini_firstroundcounter_player1%, %ini_firstroundcounter_player2%, %ini_firstroundcounter_player3%, %ini_firstroundcounter_player4%, %ini_firstroundcounter_player5%, %ini_firstroundcounter_player6%, %ini_firstroundcounter_player7%, %ini_firstroundcounter_player8%
    
    # IN GAME COMMANDS - !server, !points, !points <playername>
    On Say; Text !server; PlayerSay SERVER FIRST ROUND: %ini_firstroundcounter_datetime%; PlayerSay WITH PLAYERS: %ini_firstroundcounter_player1%, %ini_firstroundcounter_player2%; PlayerSay %ini_firstroundcounter_player3%, %ini_firstroundcounter_player4%, %ini_firstroundcounter_player5%; PlayerSay %ini_firstroundcounter_player6%, %ini_firstroundcounter_player7%, %ini_firstroundcounter_player8%; Set %tmpplayer% none; Set %tmpplayer% %targettext%
    On Say; Text !point;
        if %part2active% == 0; Set %part2active% ""
        if %targettext% == 0; PlayerSay FIRST ROUND COUNTER: You have %ini_ranking_%p%% vip points %part2active%
        if %targettext% <> 0; if %ini_ranking_%targettext%% <> 0; PlayerSay FIRST ROUND COUNTER: %targettext% have %ini_ranking_%targettext%% vip points
        if %targettext% <> 0; if %ini_ranking_%targettext%% == 0; PlayerSay FIRST ROUND COUNTER: Player %targettext% not found. Type !points <playername> 
    
    #CLEAN/RESET DB WITH POINTS FROM ALL PLAYERS - admin only command: !resetplayerpoints
    On Say; Admin; Text !resetplayerpoints; Set %ini_firstroundcounter% 0; Set %ini_ranking% 0; PlayerSay FIRST ROUND COUNTER: Player database with all points are reseted; Log ^1^bFIRST ROUND COUNTER:^0^n Player database with all points are reseted by %p% (admin)


    EXTRA FEATURE
    and here is a optional extra feature. i call it part 2. this optional part 2 gives players with min. 10 vip points the power to use the command !lead to take squad leader position. its a little gift
    if you want this optional feature, then put this code (part 2) under the code form part 1.


    COMMANDS:
    !lead - take squad leader position (only for players with min. 10 points, admins, players from custom list)


    CODE FOR PROCONRULZ - part 2 (optional)
    Code:
    ####       SERVER FIRST ROUND PLAYER COUNTER   -   Part 2 (optional)  -   by maxdralle        #######################################################
    # This optional part 2 gives players with min. 10 vip points the power to use the command !lead to take squad leader position. its a little gift ;-)
    # Part 2 is optional. if you want this optional feature, then put this code (part 2) under the code form part 1.
    # COMMAND: !lead  -  (only for players with min. 10 points, admins, players from custom list)
    
    # SETTINGS:
    On Spawn; PlayerFirst;
        Set %pointsneeded% 10
        Admin; Set %vipadmin% 1
        Set %CustomListForLead% "@@[email protected]@[email protected]@[email protected]@[email protected]@"
        If %CustomListForLead% contains @@%p%@@; Set %vipadmin% 1
    	Set %part2active% ". With %pointsneeded% points you can type !lead to take Squad Leader position"
        If %ini_ranking_%p%% >= %pointsneeded%; Set %tmpvip% 1; PlayerSay VIP: %p% you can type !lead to take Squad Leader position; PlayerSay VIP: %p% you have %ini_ranking_%p%% vip points!;
        If %ini_ranking_%p%% < %pointsneeded%; if %vipadmin% == 1; PlayerSay VIP: %p% you can type !lead to take Squad Leader position
        If %ts1% + %ts2% < 4; If %tmpvip% <> 1; If %vipadmin% <> 1; PlayerSay %p% tanks for joining! Please wait for more players. When the round starts you will get VIP points!; PlayerSay With %pointsneeded% points you can type !lead to take Squad Leader position (Your points %tmpVIPScore%/%pointsneeded%)
    
    # IN GAME COMMAND - !lead
    On Say; Text !lead,!squadlead;
        If %tmpvip% == 1; If %vipadmin% <> 1; PlayerSay VIP: %p% you have %ini_ranking_%p%% VIP points!; Exec squad.leader %ptk% %psk% %p%
        If %vipadmin% == 1; Exec squad.leader %ptk% %psk% %p%
        If %tmpvip% <> 1; If %vipadmin% <> 1; PlayerSay !lead to take Squad Leader position is only for VIPs; PlayerSay Join on our empty server and play the first round. After %pointsneeded% times you are a VIP (Your points %tmpVIPScore%/%pointsneeded%)
    Last edited by maxdralle; 11-02-2016 at 12:16.

  2. #2
    Awesome idea, bro It's always a nice reward for first players on the server.
    I've small question for you - maybe you know, maybe not - I'm writing ASDL (Advanced Sniper/DMR Limit) and I would like to integrate your code into mine. Without stealing it, without coping it I would like to write additional lines for my code that would support your main features. For example, if server owner will run both codes - players will be able to buy sniperslot for one round using your idea. What do you think?
    Check out my plugin addons!

    ADSL - Advanced Sniper/DMR Limit
    ATKS - Advanced TeamKill'ing System

  3. #3
    Senior Member
    Join Date
    Oct 2015
    Location
    Germany
    Posts
    285
    hi brodatv,

    thanks for your feedback!

    yes, you can integrate the code in your stuff. it sounds great!


    i have also written a sniper/dmr limit. i send you a PM with the code. maybe its interesting for you...

  4. #4
    I will add some of your variables as features in my sniperlimit, so people that got point for starting the server will be rewarded. They will be able to buy sniper/dmr slot for one round. I think it should be "coded" in next 2-3 days.
    BUT, you have to code something in your code - so far it's easy to abuse. People can join and rejoin empty server to farm points. You should add some variables that are "IF-ing". For example if player will get 15 kills during normal round after starting server, something like that. Or is this code for sure anti-abuse-able? :P

    Also I've small request - can you change command !server to something else? Because it's facking up with my ASDL where all commands started by !s are used for sniperlimit. So when someone will try to check out sniperslots, it will show your !server too :-x

    So far I'm thinking that ONE point for round start would be great for one sniper/dmr slot (1 round). What do you think?

    Thanks for your sniperlimit, so far your code is looking good, but it isn't advanced
    Check out my plugin addons!

    ADSL - Advanced Sniper/DMR Limit
    ATKS - Advanced TeamKill'ing System

  5. #5
    Senior Member
    Join Date
    Oct 2015
    Location
    Germany
    Posts
    285
    Quote Originally Posted by Brodatv View Post
    ...so far it's easy to abuse. People can join and rejoin empty server to farm points. You should add some variables that are "IF-ing"...
    it is included. its not possible to farm points. a player can not get more than 1 point for 1 server start (if %tmpRankReg% <> 1).

    the code detect a "server start" when:
    - a new round starts until 8 players
    - AND a team have a real teamscore more then 1 (no score on empty server with 1P)
    - AND a new round is not started with more than 8 players

    i thinks its secure enough...



    Quote Originally Posted by Brodatv View Post
    ...Because it's facking up with my ASDL where all commands started by !s are used for sniperlimit. So when someone will try to check out sniperslots, it will show your !server too :-x...
    mhh, its possible. but what is with the command !stats ???
    maybe its better to optimize this part in your code, like:

    YOUR CURRENT CODE
    On Say;Text !s

    REPLACE WITH THIS
    On Say;Text !s; if %text% == !s

  6. #6
    Quote Originally Posted by maxdralle View Post
    YOUR CURRENT CODE
    On Say;Text !s

    REPLACE WITH THIS
    On Say;Text !s; if %text% == !s
    < facepalm > It's so easy and I'm so stupid sometimes I will add it to next update. Thanks.
    Also I will add some screens to my ADSL how it's working and how it looks. Try to do the same, your code is one of the best ideas for Procon and Proconrulz. Advertise it, for example by short link, I've bit.ly/sniperlimit If you can, try to add some kind of download-able file. For example I've ADSL in normal .txt and you can download it as file, proconrulz can read rulz from itself or from .txt files uploaded to Procon server. Files are much easier, because long codes like mine + yours can be too long for just copy-pasta.
    Check out my plugin addons!

    ADSL - Advanced Sniper/DMR Limit
    ATKS - Advanced TeamKill'ing System

  7. #7
    Hi,
    I was looking at this thread and the code you have made, here nice!
    I am not a good programmer could you please make a modified script that uses the VIP slot manager plugin?
    When a player reaches 5 points they get 1-week free VIP and the points is "destroyed"?
    That would be nice! Here is a start:
    Say /vsm-addvip %p% +7; Set %Server_population% 2;
    Thanks!

  8. #8
    Senior Member
    Join Date
    Oct 2015
    Location
    Germany
    Posts
    285
    there is newer script for insane limits. take a look:
    https://forum.myrcon.com/showthread....ver-Start-v1-0
    Developer of the VIP Slot Manager Plugin

  9. #9
    Yes, but it does not work as expected it adds vip every time

  10. #10
    If you modify your script they have to help start the server 5 times up to 8 and then they get vip for X week and the script starts over again from zero
    Last edited by Talzac; 24-02-2018 at 09:40.

 

 

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
  •