1. Hey there Guest,

    The game servers have moved to semi-dedicated hardware and IPs have changed. Please see front page server widget for up-to-date game server information.

Force player weapon slot

Discussion in 'Mapping Questions & Discussion' started by Avaray, Jan 3, 2014.

  1. Avaray

    Avaray L2: Junior Member

    Messages:
    73
    Positive Ratings:
    3
    Is any way to automaticaly change player weapon slot with trigger or something?
     
  2. Exactol

    aa Exactol Certified Hammer Hacker

    Messages:
    401
    Positive Ratings:
    472
    Like melee only? You could strip the weapons off of them except for that slot
     
  3. Avaray

    Avaray L2: Junior Member

    Messages:
    73
    Positive Ratings:
    3
    Yes, I know how to strip weapons.
    If player have selected wepon slot1 and trigger_multiple will Kill that weapon, player will see empty hands without weapon.
    I want to strip all weapons from slot1, slot3, slot4 and force player to pick slot2.
     
    Last edited: Jan 3, 2014
  4. Freyja

    aa Freyja ¯\_(ツ)_/¯

    Messages:
    2,884
    Positive Ratings:
    5,127
    The only way I could think of doing it is sending a command to their client using a point_clientcommand and a trigger_multiple. I forget the exact command to do it (sure you can find it easy on the wiki or something) but the only issue is it may require the server to have cheats (I don't think so? but maybe) on.
     
    • Thanks Thanks x 1
  5. Avaray

    Avaray L2: Junior Member

    Messages:
    73
    Positive Ratings:
    3
    Great! It works without sv_cheats!

    Thanks!
     
    Last edited: Jan 3, 2014
  6. UKCS-Alias

    aa UKCS-Alias Mann vs Machine... or... Mapper vs Meta?

    Messages:
    1,264
    Positive Ratings:
    795
    I see an issue however and that is that people are able to change the way some commands word. They for example could rebind the change weapon command to do nothing.

    Its the same way as some scripts block pinion. And they might exploit that.
     
  7. Beetle

    Beetle L9: Fashionable Member

    Messages:
    627
    Positive Ratings:
    174
    well if he's doing it for the sake of melee-only, then it's just something that'll have to happen. It's at least better than having a bunch of civs running around by default.
     
  8. Avaray

    Avaray L2: Junior Member

    Messages:
    73
    Positive Ratings:
    3
    Im creating map for mp_tournament (with custom tournament whitelist) with only one weapon allowed (for slot2).
    So then player can use only stock weapons for weapon slots 1,3,4 - but weapons are killed by trigger_multiple.
    Everything is working perfect, but when player lost connection to TF2 item server then his weapon will be switched to stock weapon on slot2.
    I think only way to exploit this system is to block IP of TF2 item server in frewall or something like that.

    Edit: I was wrong. I was using entity tf_weapon shotgun - and that was my bad. I should use tf_weapon_shotgun_pyro - because this is only class allowed. So players CANT exploit this :)

    Too bad - From what I know thats impossible to Equip specific weapon on player in TF2 (with game_player_equip).
     
    Last edited: Jan 6, 2014