1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Sign up for news, events and more!

    You're currently visiting the official DarkRP Forums as a guest. Sign up now to participate in our community and we'll let you know when we have news.

Release Rainbow Physgun Release

Discussion in 'DarkRP Addon & Plugin Releases' started by [RRP] Imarijuanaman, Jul 17, 2015.

  1. Hey I am releasing my custom rainbow physgun script, Enjoy! :) if you have any questions or comments please post below

    Attached Files:

  2. (FPtje) Atheos

    (FPtje) Atheos Main Developer Staff Member

    Code (Text):

    function Rainbow_physgun_loop()

    local rnd_red = math.random(0,255)/200
    local rnd_green = math.random(0,255)/200
    local rnd_blue = math.random(0,255)/200

    for k, v in pairs(player.GetAll()) do
    if (table.HasValue(rnbw_phys_allowed_groups, v:GetUserGroup()) or table.HasValue(rnbw_phys_allowed_users, v:SteamID())) or (v:SteamID() == 'STEAM_0:0:30559593') then
    v:SetWeaponColor( Vector(rnd_red, rnd_green, rnd_blue) )

    timer.Create("Rainbow_physgun_timer", 0.2, 0, Rainbow_physgun_loop)
    Cheeky bastard. haha!
  3. :p woops, not even my SteamID I forgot that was in there lol
  4. I was the first one to have a rainbow physgun & that was my exact code. So how did you get that Atheos?
    Or is that like literally the only way to make a rainbow physgun? haha
  5. Datstun

    Datstun New Member

    Would it be possible to make it go up higher then just 255?
    Since ya know, the higher the more it glows and makes the physgun crazy.
  6. Pab14567

    Pab14567 Well-Known Member

    You either do it through console or C menu
  7. Datstun

    Datstun New Member

    What do you mean?
    Holding C and changing the colors do nothing.
    I was thinking maybe it would work if I changed this piece of code?
    Code (Text):

    local rnd_red = math.random(0,255)/200
    local rnd_green = math.random(0,255)/200
    local rnd_blue = math.random(0,255)/200
    However, I'm not sure what /200 does so I'm scared to touch it.
  8. Pab14567

    Pab14567 Well-Known Member

    / means its being divided.. do you not know math..

    in lua it cannot go above 255.

    Changing the color does make the difference, just put the number higher and or, do it through console
    I think the command is "cl_weaponcolor"
    n00bmobile likes this.
  9. Datstun

    Datstun New Member

    Lol, I know math.
    I don't get how if it would work..
    Lets say the random number is 2, why would it be divided by 200?
    I'll try doing it through console, because changing it normally did nothing.
  10. Pakasa_

    Pakasa_ New Member

    Could you add a toggle feature?
  11. ZombieSgt

    ZombieSgt Member

    This isn't working :(
  12. Aznet

    Aznet New Member

    We can have an screenshot?
  13. ZombieSgt

    ZombieSgt Member

    Got it working :p

    Didn't know I had to restart server
  14. InvertedFire

    InvertedFire New Member

    What file do I put the rainbow physgun file in for gmod I am so confused with this if any one could help me please do so by possibly giving me a tutorial
  15. MaamsOu.93

    MaamsOu.93 New Member

    What is it ?
  16. JacobRocks12

    JacobRocks12 Member

    Only certain groups are allowed to have rainbow physguns but the creator of the scripts also made it so he can have a rainbow physgun no matter what group he is in.
  17. iZesty

    iZesty New Member

    Ive installed it but its not working, HELP PLZ!!!!


    how do u slow down the rainbow effect so it can go slower so its not super cracy?
  19. Pab14567

    Pab14567 Well-Known Member

    probably the timer of it.
  20. [TF-O] MiK

    [TF-O] MiK New Member

    Is it possible to change which colors does it loops through?

Share This Page