Thread: AdminFuckeryBase

Page 1 of 2 12 LastLast
Results 1 to 25 of 45
  1. #1
    Game tester  
    Programmer
    Join Date
    Oct 2009
    Location
    Finland
    Posts
    198

    AdminFuckeryBase

    AFB is based on AdminFuckery2 -- most of the commands have been ported over.
    This plugin allows server owners to easily setup access flags for admins & install expansions to the plugin, it also allows for scripters to make more commands really fast.

    === FOR SERVER OWNERS ===

    1. grab the files from github
    2. extract to /svencoop_addons/ or /svencoop/ folder
    (if you extracted to svencoop_addons): move contents from svencoop_addons/scripts/plugins/store/ to svencoop/scripts/plugins/store/)
    3. insert this into default_plugins.txt:
    PHP Code:
        "plugin"
        
    {
            
    "name" "AFBase"
            "script" "AFBase"
        

    4. Open up /svencoop/scripts/plugins/store/AFBaseAccess.txt
    A)
    5. add your steamid with the flag B or alternatively give yourself all the flags
    6. as_reloadplugins & changelevel
    7. (optional): if you didint give yourself all the flags in step 5, run this command: .afb_access @me "+cdefghijklmnopqrstuvwyx"
    8. done!
    B)
    5. connect to your server
    6. in your svends server console, run: as_command .s_afb_access "NICKNAME OR STEAMID HERE" "+bcdefghijklmnopqrstuvwyx"
    7. done!

    use ".afb_help" to view all available commands!

    these commands are always available to everyone:
    .afb_help
    .afb_who (wont show ip unless user has any flag from A to Y)
    .afb_info
    .afb_listextensions

    == FOR SCRIPTERS ==
    you can read the "documentation" here
    most of this stuff was written during 4-6 am so it might not be really that easy to understand, if you have any questions just contact me

    == FOR USERS ==
    (new in 1.5.0) wildcarding works now from start, and both ways. You can use *mpleUser, *mple* or Example* to target "ExampleUser". Wildcards that result in multiple players wont be executed anymore.

    random values in keyvalue fields: you can use r#A-B to select a random value, for example: .player_keyvalue @me health r#30-60 would set your health to a random value between 30 and 60.

    svends server console can now issue AFB commands, syntax: as_command .s_(command), example: as_command .s_afb_help (prefix is needed due to AS implementation not allowing client/server command to exist with the same name, it is automatically added to any server command registered)

    (new in 1.5.0) cvar to bypass access file for those who want the system to behave in a binary way (is admin, or isnt admin): .afb_access_ignore 0/1, by default this value is 0 and AFB will use the access file.

    Keep an eye in this space, i might have forgotten something and might update this later

    ===================
    heres the full list of commands for anyone wondering what comes as stock
    Code:
    ] .afb_help
    ----AdminFuckeryBase help: Command list-----------------------------------------
    Quick quide: (arg) required parameter, <arg> optional parameter. Targets: @all, @admins, @noadmins, @alive
     @dead, @aim, @random, @last, @me, "nickname" (supports * wildcard), "STEAM_0:1:ID"
    --------------------------------------------------------------------------------
     1: admin_ban ("steamid") <"reason"> <duration in minutes, 0 for infinite> <0/1 ban ip instead of steamid> - ban target
     2: admin_banlate ("steamid/ip") <"reason"> <duration in minutes, 0 for infinite> - late ban target, basically adds to ban list. Doesn't validate player like admin_ban does.
     3: admin_blockdecals (target) (0/1 unban/ban) - Ban target from spraying
     4: admin_changelevel (level) - change level
     5: admin_gag (targets) (mode a/c/v) - gag player, a = all, c = chat, v = voice
     6: admin_kick (target) <"reason"> - kicks target with reason
     7: admin_rcon (command) - remote console
     8: admin_say (0/1 showname) (0/1/2 chat/hud/middle) ("text") <holdtime> <target> <r> <g> <b> <x> <y> - say text
     9: admin_slap (target) <damage> - slap target(s)
     10: admin_slay (target) - slay target(s)
     11: admin_trackdecals <0/1 mode> - track player sprays, don't define mode to toggle
     12: admin_unban ("steamid or ip") - unban target
     13: admin_ungag (targets) - ungag player
     14: afb_access (target) <accessflags> - get/set accessflags, add + or - before flags to add or remove
     15: afb_disconnected <0/1 don't shorten nicks> - Show recently disconnected client information
     16: afb_expansion_list - List expansions
     17: afb_expansion_start ("expansion SID") - start expansion
     18: afb_expansion_stop ("expansion SID") - stop expansion
     19: afb_help <page> <0/1 show expansion> - List available commands
     20: afb_info - Show info
     21: afb_last <0/1 don't shorten nicks> - (alias for afb_disconnected) Show recently disconnected client information
     22: afb_menu - pop open a simple command menu
     23: afb_peek (targets) - peeks into internal AFB info
     24: afb_setlast (target) - sets last target, use if you only want to select somebody without running a command on them
     25: afb_who <0/1 don't shorten nicks> - Show client information
     26: ent_create (classname) <"key:value:key:value:key:value" etc> - create entity, default position at your origin
     27: ent_damage <damage> <targetname> - damage entity, if no targetname given it will attempt to trace forwards
     28: ent_drop - Drop entity that you are aiming at to ground
     29: ent_dumpinfo <dirty 0/1> <targetname> - dump entity keyvalues into console, if no targetname given it will attempt to trace forwards
     30: ent_item (weapon_/ammo_/item_ name) - Spawn weapon/ammo/item at your location
     31: ent_keyvalue (key) <value> <value> <value> - get/set keyvalue of entity you are aiming at, use "!null!" to set keyvalue as empty
     32: ent_keyvaluename (targetname) (key) <value> <value> <value> - get/set keyvalue of entity based on targetname, use "!null!" to set keyvalue as empty
     33: ent_keyvaluerange (classname) (range) (key) <value> <value><value> - get/set keyvalue of entity based on classname and range, use "!null!" to set keyvalue as empty
     34: ent_kill <targetname> - removes entity, if no targetname given it will attempt to trace forwards
     35: ent_move - Use without argument to see usage/alias - Grab entity and move it relative to you
     36: ent_movecopy - Use without argument to see usage/alias - Copy & grab (copied) entity and move it relative to you
     37: ent_movename (targetname) - absolute move, entity is placed to your origin
     38: ent_mover <0/1 mode> - weapon_entmover, don't define mode to toggle
     39: ent_rotate (x) (y) (z) <targetname> - rotate entity, if no targetname given it will attempt to trace forwards. For best results use 15 increments
     40: ent_rotateabsolute (x) (y) (z) <targetname> - set entity rotation, if no targetname given it will attempt to trace forwards
     41: ent_trigger <targetname> - trigger entity, if no targetname given it will attempt to trace forwards
     42: ent_triggerrange (classname) (range) - trigger entity based on classname and range
     43: ent_worldcopy (speed) <angle vector> <0/1 reverse> <0/1 xaxis> <0/1 yaxis> - Create worldcopy
     44: ent_worldremove - Remove all worldcopies
     45: fun_fade (targets) <r> <g> <b> <fadetime> <holdtime> <alpha> <flags> - fade target(s) screens!
     46: fun_gibhead (targets) - GIBS!!! Spawns head gib on target(s)!
     47: fun_gibrand (targets) <amount> - GIBS!!! Spawns random gibs on target(s)!
     48: fun_maplight (character from A (darkest) to Z (brightest), M returns to normal) - set map lighting!
     49: fun_shake <amplitude> <frequency> <duration> - shake everyone's screen!
     50: fun_shootgrenade <velocitymultipier> <time> - shoot grenades!
     51: fun_shootportal <damage> <radius> <velocity> - shoot portals!
     52: fun_shootrocket <velocity> - shoot normal RPG rockets!
     53: player_disarm (targets) - disarm target(s)
     54: player_dumpinfo (targets) <dirty 0/1> - dump player keyvalues into console
     55: player_exec (targets) ("command") - execute command on client console
     56: player_freeze (targets) <0/1 mode> - freeze/unfreeze target(s), don't define mode to toggle
     57: player_getmodel (targets) - return target(s) playermodel
     58: player_give (targets) (weapon/ammo/item) - give target(s) stuff
     59: player_giveall (targets) - give target(s) all stock weapons
     60: player_giveammo (targets) - give target(s) ammo
     61: player_givemapcfg (targets) - apply map cfg to target(s)
     62: player_god (targets) <0/1 mode> - set target(s) godmode, don't define mode to toggle
     63: player_ignite (targets) - ignite target(s)
     64: player_keyvalue (targets) (key) <value> <value> <value> - get/set target(s) keyvalue
     65: player_noclip (targets) <0/1 mode> - set target(s) noclip mode, don't define mode to toggle
     66: player_nosolid (targets) <0/1 mode> - set target(s) solidity, don't define mode to toggle
     67: player_notarget (targets) <0/1 mode> - set target(s) notarget, don't define mode to toggle
     68: player_position (target) - returns target position,
     69: player_resurrect (targets) <0/1 no respawn> - resurrect target(s)
     70: player_setmaxspeed (targets) (speed) - set target(s) max speed
     71: player_tag <targets> <tag> - tag target, visible only for admins. Run without arguments to view list
     72: player_tagfix - refresh tags on your view, in case something fucks up
     73: player_teleportaim (targets) - teleport target(s) to where you are aiming at
     74: player_teleportmeto (target) - teleport you to target
     75: player_teleportpos (targets) (vector) - teleport target(s) to position
     76: player_teleporttome (targets) - teleport target(s) to you
     77: player_viewmode (targets) (0/1 firstperson/thirdperson) - set target(s) viewmode
     78: say !freeze (targets) <0/1 mode> - freeze/unfreeze target(s), don't define mode to toggle
     79: say !give (targets) (weapon/ammo/item) - give target(s) stuff
     80: say !giveammo (targets) - give target(s) ammo
     81: say !nosolid (targets) <0/1 mode> - set target(s) nosolid mode, don't define mode to toggle
     82: say !resurrect (targets) <0/1 no respawn> - resurrect target(s)
     83: say !tag <targets> <tag> - tag target, visible only for admins. Run without arguments to view list
     84: say !tagfix - refresh tags on your view, in case something fucks up
     85: say !tpaim (targets) - teleport target(s) to where you are aiming at
     86: say !tpmeto (target) - teleport you to target
     87: say !tptome (targets) - teleport target(s) to you
    --------------------------------------------------------------------------------
    [AFB] showing page 9 of 9.
    Last edited by Zode; 26-01-2019 at 10:10 AM. Reason: updated

  2. #2
    incognico nico's Avatar
    Join Date
    Aug 2015
    Posts
    442

    Re: AdminFuckeryBase

    Does this use sloppy player name matching like SvenAdmin? Eg. when the name is "ZodeMon" will this work: !tpmeto odemo / .admin_slay Zode

    * wildcard works as Zode* -> ZodeMon & ZodeBot ...?

    The lazy matching is quite important to me when dealing with players who whave weird chars in their name or when the name is pretty long.

  3. #3
    Game tester  
    Programmer
    Join Date
    Oct 2009
    Location
    Finland
    Posts
    198

    Re: AdminFuckeryBase

    Since the playertargeting still uses AF2 code the wildcarding only matches the first letters before the star, it also compares it against every player and will select both for the command. so yes if you would run .admin_slay zode* it would select both Zodemon and Zodebot, i can fix it to only choose the first one it finds if you wish

  4. #4
    Game tester  
    Programmer
    Join Date
    Oct 2009
    Location
    Finland
    Posts
    198

    Re: AdminFuckeryBase

    Updated main post file from afb1.1.0 to afb1.2.0
    Changenotes:
    Code:
    Performance should be better & selectors shouldn't fuck up anymore
    Changed oldass AF2 system of identifying players thru steamids to identifying players thru entindexes
    AFBasePlayerClass now holds ".sSteam" (string, contains steamid)
    Nickname wildcarding stops after finding one target, it will no longer select multiple targets
    Admins/players will now get proper accessflags instead of getting "You do not have access to this command" (caused by failure of the af2 steamid identifier -- it wasnt "initializing" players)
    Probably bunch of other stuff but i forgot
    edit: updated documentation too to reflect changes in 1.2.0
    Last edited by Zode; 18-04-2017 at 07:47 PM.

  5. #5
    Game tester  
    Programmer
    Join Date
    Oct 2009
    Location
    Finland
    Posts
    198

    Re: AdminFuckeryBase

    Updated main post file from afb1.2.0 to afb1.2.1
    you can also grab it from here (1.2.1)
    Changenotes:
    Code:
    fixed a bug with observer mode where player solidstate would be set to "solid" or "trigger" which allowed people to exploit the map and skip parts.

  6. #6
    Game tester  
    Programmer
    Join Date
    Oct 2009
    Location
    Finland
    Posts
    198

    Re: AdminFuckeryBase

    Updated main post file from afb1.2.1 to afb1.2.2
    Updated docs file from 1.2.0/1.2.1 to 1.2.2
    you can also grab the plugin from here (1.2.2) and the "docs" for scripting here (for 1.2.2 ->)
    Changenotes:
    Code:
    fixed help formating (it was showing extra "invalid" page if command count was dividable by 10)
    fixed afb_who formating (missing whitespace on ids larger than 19)
    fixed typo in af2player "!tpmeto" command help
    removed extra whitespace in code (yes it was that important :V)
    new commands: fun_maplight, player_viewmode, admin_blockdecals
    Last edited by Zode; 13-06-2017 at 11:34 AM.

  7. #7
    Game tester  
    Programmer
    Join Date
    Oct 2009
    Location
    Finland
    Posts
    198

    Re: AdminFuckeryBase

    Updated main post file from afb1.2.2 to 1.2.3
    you can also grab it from here (1.2.3)
    Changenotes:
    Code:
    checks against null players, should make it bit more stable as 1.2.2 had some trouble with them after introducing spray ban checking
    changed chat command printing a bit (removed space and \n) -- should look nicer now / doesnt destroy chat visually

  8. #8
    Registered User Joce's Avatar
    Join Date
    Feb 2016
    Location
    Paris
    Posts
    100

    Re: AdminFuckeryBase

    Link not working.

  9. #9
    Game tester  
    Programmer
    Join Date
    Oct 2009
    Location
    Finland
    Posts
    198

    Re: AdminFuckeryBase

    afbase123-public.rar here. Seems like mediafire is having some problems with my files

  10. #10
    Game tester  
    Programmer
    Join Date
    Oct 2009
    Location
    Finland
    Posts
    198

    Re: AdminFuckeryBase

    ver 1.2.4 is now available :>
    download it from github
    Changenotes:
    Code:
    even more null player checks lel
    worldcopy now has decal drawing disabled so people wont crash when you use the command

  11. #11
    Game tester  
    Programmer
    Join Date
    Oct 2009
    Location
    Finland
    Posts
    198

    Re: AdminFuckeryBase

    ver 1.2.5 is now available -- download it from github
    Changenotes:
    Code:
    fixed 1 character offset in afb_who when more than 9 players are currently in the server
    fixed a problem where AFBaseArguments RawArgs was returning null constantly

  12. #12
    Registered User
    Join Date
    Mar 2012
    Posts
    522

    Re: AdminFuckeryBase

    Would it be possible to add the command ".ent_classname" to function like Entmod's e_classname? It would basically make it so you could do things like changing func_door into func_train, trigger_hurt, etc.

    While you can do quite a bit with point based entities using AFB, brush based entity support is pretty limited without being able to change the classname. The AMXX plugin which can do similar things to AFB can't do this either.

  13. #13
    Game tester  
    Programmer
    Join Date
    Oct 2009
    Location
    Finland
    Posts
    198

    Re: AdminFuckeryBase

    hmm, have you tried using .ent_keyvalue classname func_whatever?

  14. #14
    Registered User
    Join Date
    Mar 2012
    Posts
    522

    Re: AdminFuckeryBase

    I just tried that and it doesn't work. There's probably something more Entmod is doing to make it work.

  15. #15
    Registered User
    Join Date
    Mar 2012
    Posts
    522

    Re: AdminFuckeryBase

    I found a couple of bugs:

    1) ".ent_create" always requires a keyvalue after the entity, even if the entity requires none (eg. monster_zombie), and key:value pairs are ignored (bug #2)

    2) ".ent_create" completely ignores key:value pairs after the entity name, making it impossible to create certain types of entities like squadmakers. If you try to make this entity, the game will crash from the squadmaker trying to spawn a null entity.

    3) If you copy an NPC more than once, the game will crash.

  16. #16
    Game tester  
    Programmer
    Join Date
    Oct 2009
    Location
    Finland
    Posts
    198

    Re: AdminFuckeryBase

    Quote Originally Posted by GiGaBiTe View Post
    I found a couple of bugs:

    1) ".ent_create" always requires a keyvalue after the entity, even if the entity requires none (eg. monster_zombie), and key:value pairs are ignored (bug #2)
    Whoops, accidentally left out some info on the command, it should be .ent_create (classname) (targetname) <key:value:etc> instead of .ent_create (classname) <key:value:etc>
    so basically it always requires classname and targetname, and keyvalues come after that.

    Quote Originally Posted by GiGaBiTe View Post
    2) ".ent_create" completely ignores key:value pairs after the entity name, making it impossible to create certain types of entities like squadmakers. If you try to make this entity, the game will crash from the squadmaker trying to spawn a null entity.
    see previous.

    Quote Originally Posted by GiGaBiTe View Post
    3) If you copy an NPC more than once, the game will crash.
    hmm thats weird, can you give me some steps to reproduce that? since im pretty sure i've cloned the same monster multiple times before

  17. #17
    Registered User
    Join Date
    Mar 2012
    Posts
    522

    Re: AdminFuckeryBase

    Quote Originally Posted by Zodemon View Post
    Whoops, accidentally left out some info on the command, it should be .ent_create (classname) (targetname) <key:value:etc> instead of .ent_create (classname) <key:value:etc>
    so basically it always requires classname and targetname, and keyvalues come after that.
    Tried the new format, still doesn't work. The keyvalues are ignored.

  18. #18
    Game tester  
    Programmer
    Join Date
    Oct 2009
    Location
    Finland
    Posts
    198

    Re: AdminFuckeryBase

    did you wrap it with quotes?
    example: .ent_create monster_zombie zomby "displayname:horrible monster:health:1337:scale:2"

  19. #19
    Registered User
    Join Date
    Mar 2012
    Posts
    522

    Re: AdminFuckeryBase

    Just tried it again with quotes and it still doesn't work. I didn't need quotes in my use case regardless because I didn't have spaces in the keys.

    Could you remove the requirement for a name? Because you can already set the keyvalue "targetname" to do the same thing.

  20. #20
    Game tester  
    Programmer
    Join Date
    Oct 2009
    Location
    Finland
    Posts
    198

    Re: AdminFuckeryBase

    oh herapderpa its WAS .ent_create (classname) "keyvalues" instead of .ent_create classname targetname keyvalues, was remembering stuff from AF2
    anyways it requires quotes since sven console doesnt really like the : character and it tends to cut stuff short

  21. #21
    Registered User
    Join Date
    Mar 2012
    Posts
    522

    Re: AdminFuckeryBase

    Using quotes seems to work, but there's still a crashing issue when copying monsters.

    I created a monster_human_grunt and tried to copy it. The server instantly crashed with the error "FATAL ERROR (Shutting Down): Mod_Extradata: caching failed on model *106."

    Other times I'll just get a segmentation fault.

    I wonder if it has something to do with the fact that the copy ent command doesn't also copy the key:value pairs properly. If I copy a world brush which has been altered (like angle or render mode), the resulting copy will revert to the original state of the brush.

  22. #22
    Game tester  
    Programmer
    Join Date
    Oct 2009
    Location
    Finland
    Posts
    198

    Re: AdminFuckeryBase

    that crash is still mysterious to me, havent seen it before

    as for the brushes -- yeah well thats kinda expected (the whole method for reading keyvalues is bit hacky :P)

  23. #23
    Registered User
    Join Date
    Mar 2012
    Posts
    522

    Re: AdminFuckeryBase

    That would explain why reading entity keyvalues from certain states of entities (like AI during a scripted sequences) fails and it just returns blank data.

    It could explain the crashes too, if the entity is getting fed garbage key:value data during duplication, it wouldn't be happy.

    I was really hoping that I could get AFB to work as a replacement to Entmod because Entmod causes SC5 to crash on dozens of maps, even maps which worked fine in 4.8.

  24. #24
    Game tester  
    Programmer
    Join Date
    Oct 2009
    Location
    Finland
    Posts
    198

    Re: AdminFuckeryBase

    eh pushed 1.2.6 to github, doesnt really fix anything but adds in a way to enter random value: inserting r#X-Y instead of value makes it spit out a random value between X and Y, example: ".player_keyvalue @me health r#100-500"

  25. #25
    Game tester  
    Programmer
    Join Date
    Oct 2009
    Location
    Finland
    Posts
    198

    Re: AdminFuckeryBase

    suddenly 1.2.8, adds in these things:
    - player_notarget
    - player_getmodel is now access_z (aka public command)
    - ent_create now accepts these & dynamically replaces them:
    origin:aim <- basically spawn where you are aiming at
    angles:self <- clone your angles to the entity
    angles:self180 <- clone your angles to the entity and make it face you

Page 1 of 2 12 LastLast

Posting Permissions

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