April 06, 2020, 11:40 pm

Author Topic: Keypad Advert  (Read 1084 times)

Offline EmekPCgame

  • ByB Rookie
  • **
  • Posts: 96
    • View Profile
Keypad Advert
« on: August 12, 2015, 03:25 pm »
Keypad Advert
By Steven Franklin

Code: [Select]
@name Keypad Advert!
@inputs Keypad1 Keypad2
interval(250)

findByClass("player")
Closest = findClosest(entity():pos())


if(changed(Keypad1)) {

    concmd("say /911 Someone raiding me at [Parker]")

  printColor(vec(255,0,0), "--"+ Closest:name() +" just hacked your first keypad")
  printColor(vec(255,0,0), "--"+ Closest:name() +" just hacked your first keypad") 
  printColor(vec(255,0,0), "--"+ Closest:name() +" just hacked your first keypad") 


}
if(changed(Keypad2)) {

    concmd("/911 Someone raiding me at [Parker]")

  printColor(vec(255,0,0), "--"+ Closest:name() +" just hacked your second keypad")
  printColor(vec(255,0,0), "--"+ Closest:name() +" just hacked your second keypad")
printColor(vec(255,0,0), "--"+ Closest:name() +" just hacked your second keypad")


}




Wiring

Keypad1>Your First Keypad
Keypad2>Your Second Keypad

For bugs/Suggestions post below VVV

Offline Sabretooth

  • Supporter
  • ByB Novice
  • *
  • Posts: 216
    • View Profile
Re: Keypad Advert
« Reply #1 on: August 12, 2015, 05:23 pm »
Keypad Advert
By Steven Franklin

Code: [Select]
@name Keypad Advert!
@inputs Keypad1 Keypad2
interval(250)

findByClass("player")
Closest = findClosest(entity():pos())


if(changed(Keypad1)) {

    concmd("say /911 Someone raiding me at [Parker]")

  printColor(vec(255,0,0), "--"+ Closest:name() +" just hacked your first keypad")
  printColor(vec(255,0,0), "--"+ Closest:name() +" just hacked your first keypad") 
  printColor(vec(255,0,0), "--"+ Closest:name() +" just hacked your first keypad") 


}
if(changed(Keypad2)) {

    concmd("/911 Someone raiding me at [Parker]")

  printColor(vec(255,0,0), "--"+ Closest:name() +" just hacked your second keypad")
  printColor(vec(255,0,0), "--"+ Closest:name() +" just hacked your second keypad")
printColor(vec(255,0,0), "--"+ Closest:name() +" just hacked your second keypad")


}




Wiring

Keypad1>Your First Keypad
Keypad2>Your Second Keypad

For bugs/Suggestions post below VVV

You've got your English incorrect sir. It should be Keypad Alarm, not 'Advert' :P

Offline Leonard Potato

  • Supporter
  • ByB Fanatic
  • *
  • Posts: 441
  • Insert clever text here!
    • View Profile
Re: Keypad Advert
« Reply #2 on: August 12, 2015, 05:45 pm »
Code is illegal,

  printColor(vec(255,0,0), "--"+ Closest:name() +" just hacked your first keypad")
  printColor(vec(255,0,0), "--"+ Closest:name() +" just hacked your first keypad") 
  printColor(vec(255,0,0), "--"+ Closest:name() +" just hacked your first keypad") 

  printColor(vec(255,0,0), "--"+ Closest:name() +" just hacked your second keypad")
  printColor(vec(255,0,0), "--"+ Closest:name() +" just hacked your second keypad")
 printColor(vec(255,0,0), "--"+ Closest:name() +" just hacked your second keypad")


Offline Sabretooth

  • Supporter
  • ByB Novice
  • *
  • Posts: 216
    • View Profile
Re: Keypad Advert
« Reply #3 on: August 12, 2015, 06:49 pm »
Code is illegal,

  printColor(vec(255,0,0), "--"+ Closest:name() +" just hacked your first keypad")
  printColor(vec(255,0,0), "--"+ Closest:name() +" just hacked your first keypad") 
  printColor(vec(255,0,0), "--"+ Closest:name() +" just hacked your first keypad") 

  printColor(vec(255,0,0), "--"+ Closest:name() +" just hacked your second keypad")
  printColor(vec(255,0,0), "--"+ Closest:name() +" just hacked your second keypad")
 printColor(vec(255,0,0), "--"+ Closest:name() +" just hacked your second keypad")

True. Another thing, remember to remove that stick that's lodged up your rectum Leo.

Offline EmekPCgame

  • ByB Rookie
  • **
  • Posts: 96
    • View Profile
Re: Keypad Advert
« Reply #4 on: August 12, 2015, 07:18 pm »
ok sorry

AutoMerge: August 12, 2015, 07:21 pm
New Version
V2

Code: [Select]
@name Keypad Alarm V2
@inputs Keypad1 Keypad2
interval(250)

if(changed(Keypad1)) {

    concmd("say /911 Someone raiding me at [Parker]")

  printColor(vec(255,0,0), "--someone just hacked your first keypad")
  printColor(vec(255,0,0), "--someone just hacked your first keypad")
  printColor(vec(255,0,0), "--someone just hacked your first keypad")


}
if(changed(Keypad2)) {

    concmd("say /911 Someone raiding me at [Parker]")

  printColor(vec(255,0,0), "--someone just hacked your second keypad")
  printColor(vec(255,0,0), "--someone just hacked your second keypad")
printColor(vec(255,0,0), "--someone just hacked your second keypad")


}


« Last Edit: August 12, 2015, 07:21 pm by EmekPCgame »