Results 1 to 9 of 9

Thread: Force player action

  1. #1
    ... connecting
    Join Date
    Aug 2018
    Posts
    7
    Thanks
    0
    Thanked 1 Time in 1 Post

    Force player action

    Hey,

    another question.

    I would like to force the player to perform an action.
    If possible any of the actions the player can call himself through the console.
    Like +attack, disconnect and so on

    I know about the way through a menu which uses vstr and a cvar which was set with setClientDvar()
    But i would like to get rid of this and make a nice and clean way through a fuction in libcod.

    setStance for example makes use of an BGEvent, which is a bit different but quite similar.
    Maybe you guys have an idea how to achieve this.

    Cheers
    Viking

  2. The Following User Says Thank You to Viking For This Useful Post:

    kung foo man (20th March 2019)

  3. #2
    Private First Class voron00's Avatar
    Join Date
    Nov 2014
    Posts
    234
    Thanks
    62
    Thanked 198 Times in 106 Posts
    You can run some events on a player with G_AddPredictableEvent like stance, shoot, melee etc. but for other than that you have to use clientcmd menu: https://killtube.org/showthread.php?...ull=1#post4850
    sudo apt-get rekt

  4. The Following User Says Thank You to voron00 For This Useful Post:

    kung foo man (20th March 2019)

  5. #3
    ... connecting
    Join Date
    Aug 2018
    Posts
    7
    Thanks
    0
    Thanked 1 Time in 1 Post
    Oh great, do you have a list of the working commands maybe?

  6. #4
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,000
    Thanks
    439
    Thanked 166 Times in 128 Posts
    All playercommands work that you cN perform on yourself using console

  7. #5
    ... connecting
    Join Date
    Aug 2018
    Posts
    7
    Thanks
    0
    Thanked 1 Time in 1 Post
    And how do i call them?
    Where do I find the BGevent names?

    Remember that i dont want to do it through the ClientCmd menu.

  8. #6
    Sergeant maxdamage99's Avatar
    Join Date
    Aug 2014
    Location
    Russia
    Posts
    394
    Thanks
    74
    Thanked 91 Times in 77 Posts
    Report a specific task
    p.s: you talk about things in general, you were informed of the general decision (events, clientcmd)
    write shit code's

  9. #7
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,588
    Thanks
    17
    Thanked 932 Times in 581 Posts
    Shooting can be added through the bot movement stuff, although it will look laggy to the player himself.
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

    Sending me a private message makes me want to help you LESS.

  10. #8
    Sergeant maxdamage99's Avatar
    Join Date
    Aug 2014
    Location
    Russia
    Posts
    394
    Thanks
    74
    Thanked 91 Times in 77 Posts
    Quote Originally Posted by Viking View Post
    And how do i call them?
    Where do I find the BGevent names?

    Remember that i dont want to do it through the ClientCmd menu.
    https://github.com/damage99/libcod/b...tions.hpp#L399
    or
    Code:
    typedef enum
    {
    	EV_NONE = 0,
    	EV_FOOTSTEP_RUN_DEFAULT,
    	EV_FOOTSTEP_RUN_BARK,
    	EV_FOOTSTEP_RUN_BRICK,
    	EV_FOOTSTEP_RUN_CARPET,
    	EV_FOOTSTEP_RUN_CLOTH,
    	EV_FOOTSTEP_RUN_CONCRETE,
    	EV_FOOTSTEP_RUN_DIRT,
    	EV_FOOTSTEP_RUN_FLESH,
    	EV_FOOTSTEP_RUN_FOLIAGE,
    	EV_FOOTSTEP_RUN_GLASS,
    	EV_FOOTSTEP_RUN_GRASS,
    	EV_FOOTSTEP_RUN_GRAVEL,
    	EV_FOOTSTEP_RUN_ICE,
    	EV_FOOTSTEP_RUN_METAL,
    	EV_FOOTSTEP_RUN_MUD,
    	EV_FOOTSTEP_RUN_PAPER,
    	EV_FOOTSTEP_RUN_PLASTER,
    	EV_FOOTSTEP_RUN_ROCK,
    	EV_FOOTSTEP_RUN_SAND,
    	EV_FOOTSTEP_RUN_SNOW,
    	EV_FOOTSTEP_RUN_WATER,
    	EV_FOOTSTEP_RUN_WOOD,
    	EV_FOOTSTEP_RUN_ASPHALT,
    	EV_FOOTSTEP_WALK_DEFAULT,
    	EV_FOOTSTEP_WALK_BARK,
    	EV_FOOTSTEP_WALK_BRICK,
    	EV_FOOTSTEP_WALK_CARPET,
    	EV_FOOTSTEP_WALK_CLOTH,
    	EV_FOOTSTEP_WALK_CONCRETE,
    	EV_FOOTSTEP_WALK_DIRT,
    	EV_FOOTSTEP_WALK_FLESH,
    	EV_FOOTSTEP_WALK_FOLIAGE,
    	EV_FOOTSTEP_WALK_GLASS,
    	EV_FOOTSTEP_WALK_GRASS,
    	EV_FOOTSTEP_WALK_GRAVEL,
    	EV_FOOTSTEP_WALK_ICE,
    	EV_FOOTSTEP_WALK_METAL,
    	EV_FOOTSTEP_WALK_MUD,
    	EV_FOOTSTEP_WALK_PAPER,
    	EV_FOOTSTEP_WALK_PLASTER,
    	EV_FOOTSTEP_WALK_ROCK,
    	EV_FOOTSTEP_WALK_SAND,
    	EV_FOOTSTEP_WALK_SNOW,
    	EV_FOOTSTEP_WALK_WATER,
    	EV_FOOTSTEP_WALK_WOOD,
    	EV_FOOTSTEP_WALK_ASPHALT,
    	EV_FOOTSTEP_PRONE_DEFAULT,
    	EV_FOOTSTEP_PRONE_BARK,
    	EV_FOOTSTEP_PRONE_BRICK,
    	EV_FOOTSTEP_PRONE_CARPET,
    	EV_FOOTSTEP_PRONE_CLOTH,
    	EV_FOOTSTEP_PRONE_CONCRETE,
    	EV_FOOTSTEP_PRONE_DIRT,
    	EV_FOOTSTEP_PRONE_FLESH,
    	EV_FOOTSTEP_PRONE_FOLIAGE,
    	EV_FOOTSTEP_PRONE_GLASS,
    	EV_FOOTSTEP_PRONE_GRASS,
    	EV_FOOTSTEP_PRONE_GRAVEL,
    	EV_FOOTSTEP_PRONE_ICE,
    	EV_FOOTSTEP_PRONE_METAL,
    	EV_FOOTSTEP_PRONE_MUD,
    	EV_FOOTSTEP_PRONE_PAPER,
    	EV_FOOTSTEP_PRONE_PLASTER,
    	EV_FOOTSTEP_PRONE_ROCK,
    	EV_FOOTSTEP_PRONE_SAND,
    	EV_FOOTSTEP_PRONE_SNOW,
    	EV_FOOTSTEP_PRONE_WATER,
    	EV_FOOTSTEP_PRONE_WOOD,
    	EV_FOOTSTEP_PRONE_ASPHALT,
    	EV_JUMP_DEFAULT,
    	EV_JUMP_BARK,
    	EV_JUMP_BRICK,
    	EV_JUMP_CARPET,
    	EV_JUMP_CLOTH,
    	EV_JUMP_CONCRETE,
    	EV_JUMP_DIRT,
    	EV_JUMP_FLESH,
    	EV_JUMP_FOLIAGE,
    	EV_JUMP_GLASS,
    	EV_JUMP_GRASS,
    	EV_JUMP_GRAVEL,
    	EV_JUMP_ICE,
    	EV_JUMP_METAL,
    	EV_JUMP_MUD,
    	EV_JUMP_PAPER,
    	EV_JUMP_PLASTER,
    	EV_JUMP_ROCK,
    	EV_JUMP_SAND,
    	EV_JUMP_SNOW,
    	EV_JUMP_WATER,
    	EV_JUMP_WOOD,
    	EV_JUMP_ASPHALT,
    	EV_LANDING_DEFAULT,
    	EV_LANDING_BARK,
    	EV_LANDING_BRICK,
    	EV_LANDING_CARPET,
    	EV_LANDING_CLOTH,
    	EV_LANDING_CONCRETE,
    	EV_LANDING_DIRT,
    	EV_LANDING_FLESH,
    	EV_LANDING_FOLIAGE,
    	EV_LANDING_GLASS,
    	EV_LANDING_GRASS,
    	EV_LANDING_GRAVEL,
    	EV_LANDING_ICE,
    	EV_LANDING_METAL,
    	EV_LANDING_MUD,
    	EV_LANDING_PAPER,
    	EV_LANDING_PLASTER,
    	EV_LANDING_ROCK,
    	EV_LANDING_SAND,
    	EV_LANDING_SNOW,
    	EV_LANDING_WATER,
    	EV_LANDING_WOOD,
    	EV_LANDING_ASPHALT,
    	EV_LANDING_PAIN_DEFAULT,
    	EV_LANDING_PAIN_BARK,
    	EV_LANDING_PAIN_BRICK,
    	EV_LANDING_PAIN_CARPET,
    	EV_LANDING_PAIN_CLOTH,
    	EV_LANDING_PAIN_CONCRETE,
    	EV_LANDING_PAIN_DIRT,
    	EV_LANDING_PAIN_FLESH,
    	EV_LANDING_PAIN_FOLIAGE,
    	EV_LANDING_PAIN_GLASS,
    	EV_LANDING_PAIN_GRASS,
    	EV_LANDING_PAIN_GRAVEL,
    	EV_LANDING_PAIN_ICE,
    	EV_LANDING_PAIN_METAL,
    	EV_LANDING_PAIN_MUD,
    	EV_LANDING_PAIN_PAPER,
    	EV_LANDING_PAIN_PLASTER,
    	EV_LANDING_PAIN_ROCK,
    	EV_LANDING_PAIN_SAND,
    	EV_LANDING_PAIN_SNOW,
    	EV_LANDING_PAIN_WATER,
    	EV_LANDING_PAIN_WOOD,
    	EV_LANDING_PAIN_ASPHALT,
    	EV_FOLIAGE_SOUND,
    	EV_STANCE_FORCE_STAND,
    	EV_STANCE_FORCE_CROUCH,
    	EV_STANCE_FORCE_PRONE,
    	EV_STEP_VIEW,
    	EV_ITEM_PICKUP,
    	EV_AMMO_PICKUP,
    	EV_NOAMMO,
    	EV_EMPTYCLIP,
    	EV_EMPTY_OFFHAND,
    	EV_RESET_ADS,
    	EV_RELOAD,
    	EV_RELOAD_FROM_EMPTY,
    	EV_RELOAD_START,
    	EV_RELOAD_END,
    	EV_RAISE_WEAPON,
    	EV_PUTAWAY_WEAPON,
    	EV_WEAPON_ALT,
    	EV_PULLBACK_WEAPON,
    	EV_FIRE_WEAPON,
    	EV_FIRE_WEAPONB,
    	EV_FIRE_WEAPON_LASTSHOT,
    	EV_RECHAMBER_WEAPON,
    	EV_EJECT_BRASS,
    	EV_MELEE_SWIPE,
    	EV_FIRE_MELEE,
    	EV_PREP_OFFHAND,
    	EV_USE_OFFHAND,
    	EV_SWITCH_OFFHAND,
    	EV_BINOCULAR_ENTER,
    	EV_BINOCULAR_EXIT,
    	EV_BINOCULAR_FIRE,
    	EV_BINOCULAR_RELEASE,
    	EV_BINOCULAR_DROP,
    	EV_MELEE_HIT,
    	EV_MELEE_MISS,
    	EV_FIRE_WEAPON_MG42,
    	EV_FIRE_QUADBARREL_1,
    	EV_FIRE_QUADBARREL_2,
    	EV_BULLET_TRACER,
    	EV_SOUND_ALIAS,
    	EV_SOUND_ALIAS_AS_MASTER,
    	EV_BULLET_HIT_SMALL,
    	EV_BULLET_HIT_LARGE,
    	EV_SHOTGUN_HIT,
    	EV_BULLET_HIT_AP,
    	EV_BULLET_HIT_CLIENT_SMALL,
    	EV_BULLET_HIT_CLIENT_LARGE,
    	EV_GRENADE_BOUNCE,
    	EV_GRENADE_EXPLODE,
    	EV_ROCKET_EXPLODE,
    	EV_ROCKET_EXPLODE_NOMARKS,
    	EV_CUSTOM_EXPLODE,
    	EV_CUSTOM_EXPLODE_NOMARKS,
    	EV_BULLET,
    	EV_PLAY_FX,
    	EV_PLAY_FX_ON_TAG,
    	EV_EARTHQUAKE,
    	EV_GRENADE_SUICIDE,
    	EV_OBITUARY
    } entity_event_t;
    write shit code's

  11. The Following User Says Thank You to maxdamage99 For This Useful Post:

    kung foo man (22nd March 2019)

  12. #9
    ... connecting
    Join Date
    Aug 2018
    Posts
    7
    Thanks
    0
    Thanked 1 Time in 1 Post
    Great, thanks for the input guys.
    I give it a go with the events through G_AddPredictableEvent

    @iznogod
    Through the bot movement?
    Interesting, sounds like you want to fake a button press and send that to the client somehow.

Posting Permissions

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