Results 1 to 6 of 6

Thread: Give command to team

  1. #1

    Default Give command to team

    Hello,

    I want to give 2 kills to be added to everyone of the player team who defuse or plant the bomb in objective-match gametype

    i tried this

    Code:
    self.planting_team addkills 2
    level.planting_team addkills 2
    Code:
    self.defusing_team addkills 2
    level.defusing_team addkills 2
    Code:
    local.team addkills 2
    all of them not working
    Last edited by channel; January 2nd, 2021 at 08:33 AM.

  2. #2

    Default

    .planting_team and .defusing_team are just strings, it's only text "allies" or "axis"
    and the addkills command can be used on one player at the time.

    you need to loop through all players and give kills to the players on the planting team

    something like this:


    for (local.i = 1; local.i <= $player.size; local.i++) {
    if ($player[local.i].dmteam == level.plating_team) {
    $player[local.i] addkills 2;
    }
    }


    I'm not sure if this will work with level.plating_team, maybe you need to change it to the "bomb planter" .dmteam

  3. #3

    Default

    to create new script and put this in it or in the bomb.scr to add it ?

    can you explain more please

  4. #4

    Default

    Quote Originally Posted by channel View Post
    to create new script and put this in it or in the bomb.scr to add it ?

    can you explain more please
    IDK, maybe
    open the bomb.scr with a text editor, press ctrl+f and search for "planted". That will give you an idea to where to put the code

  5. #5

    Default

    i tried to put that script at the bottom of bomb.scr script and exec it waitthread when the player planting the bomb and its not working

  6. #6
    Über Prodigy & Developer Razo[R]apiD's Avatar
    Join Date
    May 2010
    Location
    Poland, Lublin
    Posts
    3,257

    Default

    Closing the thread. See more for an explanation: https://www.x-null.net/forums/thread...ll=1#post37926

Posting Permissions

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