Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @name Targetting System
- @inputs E:wirelink Shipname:string
- @outputs V:vector
- @persist Flash:string LastSaid:string Player:entity
- @persist Target:string Health PlayerCenter:vector
- if(first() | duped()){
- runOnTick(1)
- interval(1000) # makes the e2 run every 1000 ms (1sec)
- }
- H=owner():lastSaid():explode(" ")
- if(chatClk(owner()) | first()) { # If the owner talk in the chat then ...
- if(H:string(1)=="!t" ) {
- TempPlayer=findPlayerByName(H:string(2))
- if(TempPlayer:isPlayer()) {
- Player=TempPlayer
- Target=Player:name()
- hideChat(1)
- timer("StopHide",10) # it have to set hideChat(0) back :p
- }
- }
- if(first()) { # It'll start by targetting the owner
- Player = owner()
- Target = owner():name()
- }
- Health=Player:health()
- if(Player:inNoclip()) {Noclip="Yes"}
- else {Noclip="No"}
- TeamName=Player:team():teamName()
- LastSaid=Player:lastSaid()
- Distance=floor(((entity():pos():distance(Player:pos()))/97)*3.280)
- SteamID=Player:steamID()
- }
- if(first()) { #if it is the first execution ... then it'll create all the objects
- runOnChat(1) # someone wrote something in the chat
- runOnTick(1)
- E:egpText(8, "Target: " + Target, vec2(32,65))
- E:egpText(9, "Health: " + Health, vec2(0,14))
- E:egpText(10, "Noclipping?: " + Noclip, vec2(0,98))
- E:egpText(11, "Distance (ft): " + Distance, vec2(0,140))
- E:egpText(12, "Last Said: " + LastSaid, vec2(0,154))
- E:egpText(13, "Team: " + TeamName, vec2(0,170))
- E:egpText(14, "SteamID: " + SteamID, vec2(0,182))
- E:egpColor(8,vec4(0,0,0,255))
- E:egpColor(9,vec4(0,0,0,255))
- E:egpColor(10,vec4(0,0,0,255))
- E:egpColor(11,vec4(0,0,0,255))
- E:egpColor(12,vec4(0,0,0,255))
- E:egpColor(13,vec4(0,0,0,255))
- E:egpColor(14,vec4(0,0,0,255))
- }
- if(clk("StopHide")) {
- hideChat(0)
- }
- if(tickClk()) {
- PlayerCenter=Player:toWorld(Player:boxCenter())
- V = PlayerCenter
- }
- if(first() | duped()){
- E:egpBox(1,vec2(256,256),vec2(512,512))
- E:egpColor(1,vec4(0,0,0,255))
- E:egpRoundedBox(2,vec2(256,256),vec2(490,490))
- E:egpColor(2,vec4(255,255,255,255))
- E:egpRoundedBox(3,vec2(256,23),vec2(460,40))
- E:egpColor(3,vec4(50,150,0,255))
- E:egpText(4,"Targetting Console",vec2(140,5))
- E:egpColor(4,vec4(0,0,0,255))
- E:egpFont(4, "CoolVetica", 35 )
- E:egpText(5,Shipname,vec2(30,44))
- E:egpColor(5,vec4(0,0,0,255))
- E:egpFont(5,"Arial",18)
- E:egpText(6,"Made by DeadMeerkat",vec2(20,485))
- E:egpColor(6,vec4(0,0,0,0))
- E:egpFont(6, "Arial", 20 )
- E:egpBoxOutline(7,vec2(128,75),vec2(220,25))
- E:egpColor(7,vec4(0,0,0,255))
- }
Add Comment
Please, Sign In to add comment