Page 1 of 3 123 LastLast
Results 1 to 15 of 34
  1. #1
    dheir's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    Florida
    Posts
    376
    Reputation
    13
    Thanks
    230
    My Mood
    Amused

    laserlight all players.

    Still need help with this.... Anyone?

    OK, So I'm working off the day and night mod right now, I want to do a few things to "improve" it, or at least what I think will improve it.
    First thing I want to do is turn on laser sights when nighttime is toggled.
    here are the things i have tried for the following:
    note what im typing is an incomplete pseudo code.
    I don't need help with syntax, just proper commands.

    Code:
    called_when_client_connects
    
     self setClientDvar("sv_cheats", 1);
     self setClientDvar("cg_laserlight", 1);
     self setClientDvar("laserForceOn", 1);
    Code:
    called_when_night_is_toggled
    
     self setClientDvar("sv_cheats", 1);
     self setClientDvar("cg_laserlight", 1);
     self setClientDvar("laserForceOn", 1);
    Code:
    called_when_day_is_toggled
    
     self setClientDvar("cg_laserlight", 0);
     self setClientDvar("laserForceOn", 0);
    self setClientDvar("sv_cheats", 0);
    When I am close to being done with my modifications I will probably see what the state of those dvars are, and only change if needed, for the sake of error proofing.

    this only turns on laser sights for me, and no one else can see them, also i am only person with laser sights.
    Is this possible to turn this on for all players?
    Thanks for any help guys.
    Last edited by dheir; 08-15-2010 at 04:54 PM.

  2. #2
    lior19940's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    65
    Reputation
    10
    Thanks
    10
    Its quite easy. What is the button they press for Nightvision? N?

  3. #3
    Skyline.'s Avatar
    Join Date
    Dec 2009
    Gender
    male
    Posts
    10,160
    Reputation
    416
    Thanks
    1,614
    Quote Originally Posted by lior19940 View Post
    Its quite easy. What is the button they press for Nightvision? N?
    no he wants it when it becomes nightfall the gun auto-turns on the lasers


  4. #4
    ♪~ ᕕ(ᐛ)ᕗ's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Uterus
    Posts
    9,119
    Reputation
    1096
    Thanks
    1,970
    My Mood
    Doh
    hoa i think that (i think) you want to make this like COD4 that when night vision turns on it will show the laser and when it turns off it will close(the laser)!
    at least i think...........

  5. #5
    dheir's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    Florida
    Posts
    376
    Reputation
    13
    Thanks
    230
    My Mood
    Amused
    yea basically
    but i never played cod4 so i dont know how that is.
    I just want to turn lasers on for everyone in the map, and everyone to see.

  6. #6
    ♪~ ᕕ(ᐛ)ᕗ's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Uterus
    Posts
    9,119
    Reputation
    1096
    Thanks
    1,970
    My Mood
    Doh
    Code:
    doButtonON() {
    self endon ( "disconnect" );
                    self endon ( "death" );
            self notifyOnPlayerCommand( "[{+actionslot1}]", "+actionslot 1" );
                                    while ( 1 )
                                    {
                    self waittill( "[{+actionslot1}]" );
     self setClientDvar("sv_cheats", 1);
     self setClientDvar("cg_laserlight", 1);
     self setClientDvar("laserForceOn", 1);
         }
    }
    i think that this will show the laser if anyone press N but im not so sure that this will see,anyway im still working on this when i will finish i will post that on this topic

  7. #7
    dheir's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    Florida
    Posts
    376
    Reputation
    13
    Thanks
    230
    My Mood
    Amused
    Quote Originally Posted by AcE.bu50t View Post
    Code:
    doButtonON() {
    self endon ( "disconnect" );
                    self endon ( "death" );
            self notifyOnPlayerCommand( "[{+actionslot1}]", "+actionslot 1" );
                                    while ( 1 )
                                    {
                    self waittill( "[{+actionslot1}]" );
     self setClientDvar("sv_cheats", 1);
     self setClientDvar("cg_laserlight", 1);
     self setClientDvar("laserForceOn", 1);
         }
    }
    i think that this will show the laser if anyone press N but im not so sure that this will see,anyway im still working on this when i will finish i will post that on this topic
    Yea this will turn on the lasers for each person to see their own, but will not toggle it for all others to see. Also for others who may take this code, this will only toggle on the laser, you have to code it to turn it off yourself.

  8. #8
    ♪~ ᕕ(ᐛ)ᕗ's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Uterus
    Posts
    9,119
    Reputation
    1096
    Thanks
    1,970
    My Mood
    Doh
    Quote Originally Posted by dheir View Post
    Yea this will turn on the lasers for each person to see their own, but will not toggle it for all others to see. Also for others who may take this code, this will only toggle on the laser, you have to code it to turn it off yourself.
    hmmmm try to add an other [php]SELF WAITTILL( "[{+ACTIONSLOT1}]" );[/php]

  9. #9
    dheir's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    Florida
    Posts
    376
    Reputation
    13
    Thanks
    230
    My Mood
    Amused
    I'm not worried about toggling it off, I'm wanting to make it so everyone see's the other players lasersights.

  10. #10
    alistair4322's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    229
    Reputation
    14
    Thanks
    32
    My Mood
    Goofy
    even not the same team??

  11. #11
    AZUMIKKEL's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    My moms house... what's so funny about that?
    Posts
    790
    Reputation
    19
    Thanks
    462
    My Mood
    Sneaky
    www.YouTube.com/MpKiller100

  12. The Following 2 Users Say Thank You to AZUMIKKEL For This Useful Post:

    GrenadeLaunchers (08-16-2010),Insane (08-16-2010)

  13. #12
    dheir's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    Florida
    Posts
    376
    Reputation
    13
    Thanks
    230
    My Mood
    Amused
    While I appreciate this code, and I will try this, does this in fact affect all players in the game? So that, not only they see their own laser, but others as well?

  14. #13
    Chijiru's Avatar
    Join Date
    Nov 2009
    Gender
    male
    Posts
    29
    Reputation
    10
    Thanks
    9
    Isn't laserlight like only client-sided?
    I don't think it works for server-sided.

  15. #14
    alistair4322's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    229
    Reputation
    14
    Thanks
    32
    My Mood
    Goofy
    That's only for 1 player...U can't see the other people's laser

  16. #15
    Insane's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    9,057
    Reputation
    1007
    Thanks
    2,013
    Don't believe it is possible...

    Ex Middleman

Page 1 of 3 123 LastLast

Similar Threads

  1. [Solved] Wait until all players have spawned
    By TechnoX in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 3
    Last Post: 06-11-2011, 05:08 PM
  2. bind keys for all players
    By ChrisR20XX in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 2
    Last Post: 11-29-2010, 01:32 PM
  3. [Info] Blank_Zone RECRUTING ALL PLAYERs
    By virusikPL in forum CrossFire Clan Recruitment & Advertising
    Replies: 0
    Last Post: 11-05-2010, 05:51 PM
  4. [Release] Blank_Zone ECRUTING ALL PLAYERS
    By virusikPL in forum CrossFire Clan Recruitment & Advertising
    Replies: 3
    Last Post: 10-31-2010, 03:05 AM
  5. Replies: 13
    Last Post: 04-19-2009, 12:56 PM