September 23, 2019, 05:42 am

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - andreblue

Pages: [1] 2 3 4
1
Wire / E2 / Chat Calc
« on: May 21, 2017, 01:45 am »
So i got bored with doing math. I made a e2 do it for me.
You need to get a wolfram alpha api at https://products.wolframalpha.com/api/
You sign up or sign in and then create an app.
From the page that looks like this http://i.imgur.com/KAgmEBP.png
You copy the APPID and paste it in the code.
Anything that starts with = before it will run
It only works with simple math atm.
Code: [Select]
@name Chat Calc
@inputs
@outputs
@persist Owner:entity LastResult:string LastExperssion:string WebRequest:table WebKey:string
@trigger

if( first() ){
    function number mathFromString(MathStatment:string){
        if( MathStatment != "" ){
            URL = "http://api.wolframalpha.com/v2/query?input=" + httpUrlEncode(MathStatment) + "&appid=" + httpUrlEncode(WebKey) + "&format=plaintext&output=json"
            httpRequest(URL)
        }
    }
    Owner = owner()
    LastResult = "5"
    LastExperssion= "5+5"
    runOnChat(1)
    runOnHTTP(1)
   
    ##SET THIS FOR IT TO WORK!!!!
    WebKey = "" #Place Key Here
   
    ##Testing
    mathFromString(LastExperssion)
}

if( httpClk() & httpData() ){
    WebRequest = jsonDecode(httpData())
    WebRequest = WebRequest["queryresult",table]["pods", table]
    for(I = 1, WebRequest:count()){
        local Data = WebRequest[I, table]
        if( Data["title", string] == "Result" & Data["scanner", string] == "Simplification" ){
            LastResult = Data["subpods", table][1, table]["plaintext", string]
            printColor(vec(255,0,0),"[Math Result] ", vec(255,255,255), LastExperssion + " = " + LastResult)
        }
    }
}
if( chatClk(Owner) ){
    LS = Owner:lastSaid()
    if( LS:left(1) == "=" ){
        LS = LS:sub(2)
        LastExperssion = LS
        mathFromString(LS)
        hideChat(1)
    }
}

2
Wire / E2 / [E2][Release] Andre's Auto Door v1.0.0
« on: August 28, 2016, 01:39 am »
So i needed a new auto door since i lost my old one, and i added some nice features to it that i think most lack
Features
  • Add via Name
  • Add via SteamID
  • ID to Name of those online
  • List Allowed chat command
  • Distance Set Command

Chat Commands(Do as the name states):
  • !add <player name | steam ID>
  • !remove<player name | steam ID>
  • !list
  • !dis <number in units>
  • !distance <number in units>

Simply reply if you run into issues.
Standard wiring of Fade to your fading door.

Code: [Select]
@name Auto Door
@inputs
@outputs Fade
@persist AllowedPlayers:table Distance
#Internal Vars
@persist [Owner Chip]:entity
@trigger

interval(250)

if(first() | dupefinished())
{
    function string string:steamID2Name()
    {
        local Plys = players()
        for(I=1, Plys:count())
        {
            if( This == Plys[I,entity]:steamID())
            {
                return Plys[I,entity]:name()
            }
        }
       
        return "Disconnected Player"
    }
    Owner = owner()
    Chip = entity()
    AllowedPlayers = table()
    AllowedPlayers[Owner:steamID(), number] = 1
    Distance = 50
    runOnChat(1)
}
if(clk())
{
    findInSphere(Chip:pos(), Distance)
    findClipToClass("player")
    findSortByDistance(Chip:pos())
    Found = findToArray()[1,entity]
    if(AllowedPlayers[Found:steamID(), number] == 1)
    {
        Fade = 1
    }
    else
    {
        Fade = 0
    }
}
if(chatClk(Owner))
{
    LS = Owner:lastSaid():lower():explode(" ")
    local ChatCmdDone = 0
    if(LS[1,string] == "!add" & LS[2,string])
    {
        if(LS[2,string]:upper():find("STEAM_"))
        {
            local ID = LS[2,string]:upper()
            if(!AllowedPlayers[ID, number] == 1)
            {
                AllowedPlayers[ID, number] = 1
                printColor(vec(0,128,128), "[E2 Door] ", vec(0,128,0), "Added ", vec(192,192,192), ID:steamID2Name()+"[", vec(256,256,256), ID, vec(128,128,128), "]")
            }
        }
        else
        {
            local Ply = findPlayerByName(LS[2,string])
            if(Ply:isValid() & Ply:isPlayer())
            {
                if(!AllowedPlayers[Ply:steamID(), number] == 1)
                {
                    AllowedPlayers[Ply:steamID(), number] = 1
                    printColor(vec(0,128,128), "[E2 Door] ", vec(0,128,0), "Added ", vec(192,192,192), Ply:name()+"[", vec(256,256,256), Ply:steamID(), vec(128,128,128), "]")
                }
            }
        }
        ChatCmdDone = 1
   
    }
    elseif(LS[1,string] == "!remove" & LS[2,string])
    {
        if(LS[2,string]:upper():find("STEAM_"))
        {
            local ID = LS[2,string]:upper()
            if(AllowedPlayers[ID, number] == 1)
            {
                AllowedPlayers[ID, number] = 0
                printColor(vec(0,128,128), "[E2 Door] ", vec(0,128,0), "Removed ", vec(192,192,192), ID:steamID2Name()+"[", vec(256,256,256), ID, vec(128,128,128), "]")
            }
            else
            {
                printColor(vec(0,128,128), "[E2 Door] ", vec(0,128,0), "This person is not on the door.")
            }
        }
        else
        {
            local Ply = findPlayerByName(LS[2,string])
            if(AllowedPlayers[Ply:steamID(), number] == 1)
            {
                AllowedPlayers[Ply:steamID(), number] = 0
                printColor(vec(0,128,128), "[E2 Door] ", vec(0,128,0), "Removed ", vec(192,192,192), Ply:name()+"[", vec(256,256,256), Ply:steamID(), vec(128,128,128), "]")
            }
            else
            {
                printColor(vec(0,128,128), "[E2 Door] ", vec(0,128,0), "This person is not on the door.")
            }
        }
        ChatCmdDone = 1
    }
    elseif(LS[1,string] == "!list")
    {
        foreach(ID, Allowed:number=AllowedPlayers)
        {
            printColor(vec(0,128,128), "[E2 Door] ", vec(192,192,192), "Listing Currently Allowed Players")
            if(Allowed)
            {
                printColor(vec(0,128,128), "[E2 Door] ", vec(192,192,192), ID:steamID2Name()+"[", vec(256,256,256), ID, vec(128,128,128), "]")
            }
        }
        ChatCmdDone = 1
    }
    elseif(LS[1,string] == "!distance" | LS[1,string] == "!dis" )
    {
        if(LS[2,string] & LS[2,string]:toNumber() != 0)
        {
            Distance = LS[2,string]:toNumber()
            printColor(vec(0,128,128), "[E2 Door] ", vec(0,128,0), "Set distance to ", vec(256,256,256), Distance)
        }
        ChatCmdDone = 1
    }
   
    if ( ChatCmdDone ){ hideChat(1) }
   
}



3
Tech Help / Nivdia drivers lock up computer
« on: June 20, 2014, 11:47 pm »
Has anyone seen the nivdia drivers lock up a computer? Mine does it at random.
Card: Evga GT 640
Proc: Amd fx 6100
MB: asus m97 r2.0
It is a fresh install of windows 7 prem. Install drivers and after a tad it would freeze. Did a roll back with sytem restore and it still does it with older vers of the drivers. When using the basic VGA driver windows ships it is fine

4
Suggestions and Questions / Force Spray Concerns
« on: March 23, 2014, 02:00 am »
So i saw in the change log admins can now force a user to spray. And then again tis not the sexual kind.

Now lets say you think it is this player Xia who did the spray. The spray in question is a nice young lady getting rammed by a loving father. Now Xia has a spray but it is of nice magic pony with a crazed fan doing something that should be left in the barns down in the southern United States. Now that Xia's spray is sprayed, Player Tis goes and reports the player on the ticket service up top. Now Xia is getting punished for something pushed on him. Is there any though in how well we do indicate the logging of the force to prevent such a problem as I myself have a non ByB friendly spray but simply do not use it on the servers?

5
Wire / E2 / [Release]Multi Count Entity Chip[MCEC]
« on: December 16, 2013, 09:08 pm »
Simple chip that will go ahead and tell you the count of your props, wiremod parts, SENTS or keypads.
Code is here: http://andreblue.com/e2/public_chips/prop_count.php

PicTures:

Prop Count

Wiremod parts

Sents, with missing one due to it being out of shot

Key Pads

6
General Chat / Free games
« on: November 02, 2013, 02:40 am »
First come first serve.
DHA2-QLX7-PG73-LXA8-F6SS for Command & Conquer: Red Alert 3 - Uprising Origin Key
FQ7P-DA49-72NB-VLWB-X9N9 for Populous Origin Key


4YNE-K53J-EV9C-Z2VJ-KD7S for The Sims 3 Key
8666-Q3FD-C6DN-9U2K-BC8X for The Sims 3 High End Loft Stuff Key
9A2S-WXEM-DPC4-BT47-8EUR for The Sims 3 Late Night Key



GYTE-X4HM-4T9X-NEMG for The Sims 3 Date Night Key

7
Wire / E2 / [Release] Global Chips
« on: October 29, 2013, 06:43 pm »
So now you can find some chips here:
http://andreblue.com/e2/public_chips/index.php

Just added:

Global Ranks:
 A global(per server) rank setting. Have a gang and want them only to have access to parts of a base but not others? Then use this to set the rank and use the door to allow them in and out!
   
    Commands:
     set or add : Add or set a user the the 3 option of rank else it defaults to 0
     del or rem : Remove a user
     list: Prints a list of ranked users


Ranked Door:
 A door that can have user ranks set to allow those who are the correct rank.
   Commands (You must look at the chip to run these):
     rank : Select the rank wanted to go thru the door.
     distance : Select the distance to open at.
     title : Use for it soon but at least sets the e2 name

Rank List:
 Lists the player rank if they are set to something other then zero
   Commands (You must look at the chip to run these):
     title : Sets the EGP screen title


All chat commands prefix can be changed. Defaults to !
All infomation on commands and the wiring is also on my site.

Pics coming soon


8
Wire / E2 / [Release]Egp Control
« on: October 11, 2013, 12:24 am »
So i decided to make a simple EGP remote updater. So i made some functions that can be transmitted over a data signal or other method for transferring tables.
Code is on my web site along with information on usage.
http://andreblue.com/e2/public_chips/remote_egp.php
Make any suggestions below.
Change Log is there also.

9
Wire / E2 / [Tut]E2 Loops
« on: September 04, 2013, 07:27 pm »
Simple uses of the main E2 loops


Table Of Contents:
  • Intro
  • For Loop
  • Foreach Loop
  • While Loop
  • Switch Loop

Intro
So what are these loops and what can they do for me? Well loops can be used to do the same thing over and over but with a different object each time. It can replace:
Code: [Select]
#Fill an array with steam ids
Array[1,entity]=players[1,entity]
Array[2,entity]=players[2,entity]
Array[3,entity]=players[3,entity]
Array[4,entity]=players[4,entity]
Array[5,entity]=players[5,entity]
Array[6,entity]=players[6,entity]
Array[7,entity]=players[7,entity]
Those 7 lines can be cut down and also only run as many as needed and not do more then we need. From 7 lines to about 4 lines and you would be able to only do the players that are really there.
Now loops are mainly used for to use arrays and tables. The for loop is good for numeric arrays while for tables you need to use a foreach loop. The while loop can be used to create a loop while a condition is present, such as a key being held down. The switch is a simple loop that can be used to replace long if, else if statements but is buggy as of this release.


For Loop
The for loop is used most of the time to go thru an array with numeric indexs. It can make it so that you can check each object for some thing.
Syntax:
Code: [Select]
for(Number=Start,NumberOfTimesToLoop){
Code here
}
This is good for things like checking if for example a player on the server is a friend.
Code: [Select]
for(Index=1,players():count()){
    if(players[Index,entity]:isSteamFriend(owner())){
    print(players[Index,entity]:name+" is friend")
}


More to come when i get time to type the rest of the partss

10
Suggestions and Questions / Jail Time
« on: July 14, 2013, 06:11 pm »
It would be nice to see in the lawyer npc, the time remaining on the jail time.

11
Suggestions and Questions / Horn Limit
« on: July 07, 2013, 04:29 pm »
The horns should have a time between uses. Today on rp5 someone was spamming it.
There should be a cool down or use limit on the thing in seconds or something.
I dont think anyone in real life is gonna go honk honk honk 50 times a minute....

12
General Chat / Payday 2
« on: May 24, 2013, 02:43 pm »
So Payday 2 is coming out in august. The 4 pack for the criminal editing is 150$ us and the single ones are 50$ each.
Are there 3 others who want to split the cost of the four pack?

Each would have to get 37.50 $.

13
Wire / E2 / Simple Tricks
« on: November 10, 2012, 04:31 am »
Got a trick for something in e2/wire? Post below!

I got one here to start:
Lets say you want a color for your Console screen. You just are not sure of what you need to set for a color code as its 1-9 instead of the 255 RGB one.

Take 9 and divide it by 255, then multiply it by the RGB value and round your number. You know have your number.
Ex.
Code: [Select]
RGB: 255000255 (purple)
9/255 = 0.0352941176470588
0.0352941176470588 * R = 9
0.0352941176470588 * G = 0
0.0352941176470588 * B = 9
909 = purple
RGB: 128220025 (Lime-ish Green)
9/255 = 0.0352941176470588
0.0352941176470588 * R = 4.517647058823529, we can round it to 5
0.0352941176470588 * G = 7.764705882352941, we can round it to 8
0.0352941176470588 * B = 0.8823529411764706, we can round to 1
581 would be a lime-ish green
A simple e2 function
Code: [Select]
function number rgbToCon(R,G,B){
    R = round((9/255)*R)
    G = round((9/255)*G)
    B = round((9/255)*B)
    Rs = R:toString()
    Gs = G:toString()
    Bs = B:toString()
    E2ColorS = (Rs+Gs+Bs)
    E2Color = E2ColorS:toNumber()
    return E2Color
}

14
Gmod Support / Admin Tools
« on: October 27, 2012, 11:02 pm »
  • Fix Keypad Cracker.
  • Add a print_owner to the d/c props. As such we can tell who spammed them.
  • Print_owner for shipments
  • Halo around the players when AOD as to tell if someone is sitting under the main area of the map printer farming. Kinda like some sort of radar.
  • A Freeze SWEP would be nice. That way we can just shoot someone with it and they would freeze.
  • Print_owner for becki's barrels
Anyone else have more ideas?

Spoiler
If someone could move this to suggestions that would be great. I had too many tabs open XD

15
Suggestions and Questions / E2 Allowed or not?
« on: September 05, 2012, 10:40 am »
So i have this following E2, shaped as a rollermine, to use as a cop. Its nocollided as to not prop push cars when its after them. Solely for looks. Just chases after them. Plays a sound when they get close, as if attaching to the car.

Pages: [1] 2 3 4