Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @name Autogunshop - Forum
- @inputs EGP:wirelink User:entity [R1,R2,R3,R4,R5,R6,R7,R8]:entity
- @outputs [U1,U2,U3,U4,U5,U6,U7,U8]:normal I1 I2 I3 I4
- @persist [Pris,Cbox1,Cbox2,Cbox3,Cbox4,Cbox5,Cbox6,Cbox7,Cbox8,Profit,Ready,Login,SCount,S]:number LoginPlayer:entity
- runOnChat(1)
- if(chatClk() & !chatClk(owner())){exit()}
- Said = owner():lastSaid():lower():explode(" ")
- if(Said[1,string]=="!profit"){Profit = Said[2,string]:toNumber()}
- if(Said[1,string]=="!sold" & chatClk(owner())){print("Du har solgt "+SCount+" v"+aa()+"ben")}
- if(Said[1,string]=="!close"){
- EGP:egpClear()
- EGP:egpBox(1,vec2(256,256),vec2(512,512))
- EGP:egpMaterial(1,"console/background02")
- EGP:egpText(4,"AUTOGUNSHOP",vec2(250,10)) EGP:egpAlign(4,1) EGP:egpSize(4,50) EGP:egpFont(4,"Marlett") EGP:egpColor(4,vec(0,0,0))
- EGP:egpText(2,"Gunshoppen er lukket",vec2(250,100)) EGP:egpAlign(2,1) EGP:egpSize(2,50) EGP:egpColor(2,vec(0,0,0))
- EGP:egpText(3,"Kom tilbage senere",vec2(250,150)) EGP:egpAlign(3,1) EGP:egpSize(3,50) EGP:egpColor(3,vec(0,0,0))
- S = 0
- }
- if(Said[1,string]=="!opfyldning"){
- EGP:egpClear()
- EGP:egpBox(1,vec2(256,256),vec2(512,512))
- EGP:egpMaterial(1,"console/background02")
- EGP:egpText(4,"AUTOGUNSHOP",vec2(250,10)) EGP:egpAlign(4,1) EGP:egpSize(4,50) EGP:egpFont(4,"Marlett") EGP:egpColor(4,vec(0,0,0))
- EGP:egpText(2,"Gunshoppen er lukket",vec2(250,100)) EGP:egpAlign(2,1) EGP:egpSize(2,50) EGP:egpColor(2,vec(0,0,0))
- EGP:egpText(3,"Vi fylder v"+aa()+"ben op",vec2(250,150)) EGP:egpAlign(3,1) EGP:egpSize(3,50) EGP:egpColor(3,vec(0,0,0))
- S = 0
- }
- if(first()){
- function number egpClick(CursorPos:vector2,ObjId){
- EPos = EGP:egpPos(ObjId)
- ESize = EGP:egpSize(ObjId)
- if(inrange(CursorPos, (EPos - ESize/2), (EPos + ESize/2))){
- return 1
- }
- return 0
- }
- function string entity:wepName(){
- if(This:isShipment()){
- return This:shipmentName()
- }else{return "Udsolgt"}}
- function number entity:wepPrice(){
- if(This:isShipment()){
- return This:shipmentPrice()+Profit
- }else{return 0}
- }
- Font = "Marlett"
- timer("startUp",250)
- Profit = 200
- S = 1
- function void loggedin(){
- EGP:egpClear()
- EGP:egpBox(1,vec2(256,256),vec2(512,512))
- EGP:egpMaterial(1,"console/background02")
- EGP:egpText(2,"AUTOGUNSHOP",vec2(250,10)) EGP:egpAlign(2,1) EGP:egpSize(2,50) EGP:egpFont(2,Font) EGP:egpColor(2,vec4(0,0,0,255))
- EGP:egpBox(3,vec2(250,65),vec2(400,10)) EGP:egpColor(3,vec4(0,0,0,255))
- EGP:egpBox(4,vec2(250,450),vec2(400,100)) EGP:egpColor(4,vec4(0,0,0,200))
- EGP:egpText(5,"INGEN V"+aaL()+"BEN VALGT",vec2(250,430)) EGP:egpAlign(5,1) EGP:egpSize(5,40) EGP:egpFont(5,Font)
- EGP:egpText(50,"Kopiert af:"+owner():name()+" | Lavet af: CasperDK | Offentliggjort p"+aa()+" forum",vec2(250,0)) EGP:egpSize(50,10) EGP:egpAlign(50,1)
- for(I=1, 8){EGP:egpBox(5+I,vec2(250,53+(I*40)),vec2(400,35)) EGP:egpColor(5+I,vec4(175,50,50,235))}
- }
- function void login(){
- EGP:egpClear()
- EGP:egpBox(1,vec2(256,256),vec2(512,512)) EGP:egpMaterial(1,"console/background02")
- EGP:egpBox(3,vec2(250,350),vec2(300,100)) EGP:egpColor(3,vec4(200,50,50,135))
- EGP:egpText(2,"AUTOGUNSHOP",vec2(250,10)) EGP:egpAlign(2,1) EGP:egpSize(2,50) EGP:egpFont(2,Font) EGP:egpColor(2,vec4(0,0,0,255))
- EGP:egpText(4,"LOGIN",vec2(250,325)) EGP:egpAlign(4,1) EGP:egpSize(4,50) EGP:egpFont(4,Font)
- LoginPlayer = noentity()
- Ready = 1
- I1 = 0 I2 = 0 I3 = 0 I4 = 0
- }
- }
- if(Said[1,string]=="!open" & chatClk(owner())){login()}
- if(~User & User:keyUse() & LoginPlayer == User & ops()< 100 & Login==1 & !S==0){
- Cursor = EGP:egpCursor(User)
- if(egpClick(Cursor,6)&R1:isShipment()){
- if(Cbox1==0){
- Pris += R1:wepPrice() Cbox1 = 1
- EGP:egpColor(6,vec4(50,175,50,235))
- }else{
- Pris -= R1:wepPrice() Cbox1 = 0 EGP:egpColor(6,vec4(175,50,50,235))}
- exit()
- }elseif(egpClick(Cursor,7)&R2:isShipment()){
- if(Cbox2==0){
- Pris += R2:wepPrice() Cbox2 = 1
- EGP:egpColor(7,vec4(50,175,50,235))
- }else{
- Pris -= R2:wepPrice() Cbox2 = 0
- EGP:egpColor(7,vec4(175,50,50,235))
- }
- exit()
- }elseif(egpClick(Cursor,8)&R3:isShipment()){
- if(Cbox3==0){
- Pris += R3:wepPrice() Cbox3 = 1
- EGP:egpColor(8,vec4(50,175,50,235))
- }else{
- Pris -= R3:wepPrice() Cbox3 = 0
- EGP:egpColor(8,vec4(175,50,50,235))
- }
- exit()
- }elseif(egpClick(Cursor,9)&R4:isShipment()){
- if(Cbox4==0){
- Pris += R4:wepPrice() Cbox4 = 1
- EGP:egpColor(9,vec4(50,175,50,235))
- }else{
- Pris -= R4:wepPrice() Cbox4 = 0
- EGP:egpColor(9,vec4(175,50,50,235))
- }
- exit()
- }elseif(egpClick(Cursor,10)&R5:isShipment()){
- if(Cbox5==0){
- Pris += R5:wepPrice() Cbox5 = 1
- EGP:egpColor(10,vec4(50,175,50,235))
- }else{
- Pris -= R5:wepPrice() Cbox5 = 0
- EGP:egpColor(10,vec4(175,50,50,235))
- }
- exit()
- }elseif(egpClick(Cursor,11)&R6:isShipment()){
- if(Cbox6==0){
- Pris += R6:wepPrice() Cbox6 = 1
- EGP:egpColor(11,vec4(50,175,50,235))
- }else{
- Pris -= R6:wepPrice() Cbox6 = 0
- EGP:egpColor(11,vec4(175,50,50,235))
- }
- exit()
- }elseif(egpClick(Cursor,12)&R7:isShipment()){
- if(Cbox7==0){
- Pris += R7:wepPrice() Cbox7 = 1
- EGP:egpColor(12,vec4(50,175,50,235))
- }else{
- Pris -= R7:wepPrice() Cbox7 = 0
- EGP:egpColor(12,vec4(175,50,50,235))
- }
- exit()
- }elseif(egpClick(Cursor,13)&R8:isShipment()){
- if(Cbox8==0){
- Pris += R8:wepPrice() Cbox8 = 1
- EGP:egpColor(13,vec4(50,175,50,235))
- }else{
- Pris -= R8:wepPrice() Cbox8 = 0
- EGP:egpColor(13,vec4(175,50,50,235))
- }
- exit()
- }
- if(egpClick(Cursor,4)){
- moneyRequest(LoginPlayer,Pris,"K"+oeL()+"B")
- }
- if(egpClick(Cursor,110)&Login==1){timer("reset",50)}
- }
- if(clk("startUp")){login()}
- if(clk("reset")){login() stopAllTimers()}
- if(clk("rest")){
- EGP:egpText(15,R1:wepName()+" ~ "+R1:wepPrice()+"kr.",vec2(250,75))
- EGP:egpText(16,R2:wepName()+" ~ "+R2:wepPrice()+"kr.",vec2(250,117))
- EGP:egpText(17,R3:wepName()+" ~ "+R3:wepPrice()+"kr.",vec2(250,157))
- EGP:egpText(18,R4:wepName()+" ~ "+R4:wepPrice()+"kr.",vec2(250,197))
- EGP:egpText(19,R5:wepName()+" ~ "+R5:wepPrice()+"kr.",vec2(250,237))
- EGP:egpText(20,R6:wepName()+" ~ "+R6:wepPrice()+"kr.",vec2(250,277))
- EGP:egpText(21,R7:wepName()+" ~ "+R7:wepPrice()+"kr.",vec2(250,317))
- EGP:egpText(22,R8:wepName()+" ~ "+R8:wepPrice()+"kr.",vec2(250,357))
- for(I=1,8){EGP:egpAlign(14+I,1) EGP:egpFont(14+I,Font) EGP:egpSize(14+I,30)}
- EGP:egpBox(110,vec2(22,22),vec2(35,35)) EGP:egpMaterial(110,"gui/close_32") EGP:egpColor(110,vec4(150,50,50,200))
- Cbox1 = 0 Cbox2 = 0 Cbox3 = 0 Cbox4 = 0 Cbox5 = 0 Cbox6 = 0 Cbox7 = 0 Cbox8 = 0 Pris = 0 Login = 1
- timer("update",5000)
- }
- if(~User & User:keyUse() & ops()<150 & Ready == 1 & !S==0){
- Cursor = EGP:egpCursor(User)
- if(egpClick(Cursor,3)){
- loggedin()
- timer("rest",400)
- LoginPlayer = User
- }
- }
- if (clk("update")){
- if (round(((entity():pos() - LoginPlayer:pos()):length()))>150){timer("reset",500)}
- timer("update",5000)
- }
- if(moneyClk("K"+oeL()+"B")){
- EGP:egpText(51,"TAK",vec2(250,250)) EGP:egpAlign(51,1) EGP:egpFont(51,Font) EGP:egpSize(51,100) EGP:egpColor(51,vec4(200,50,50,255))
- if(Cbox1 == 1){U1 = 1 SCount++}
- if(Cbox2 == 1){U2 = 1 SCount++}
- if(Cbox3 == 1){U3 = 1 SCount++}
- if(Cbox4 == 1){U4 = 1 SCount++}
- if(Cbox5 == 1){U5 = 1 SCount++}
- if(Cbox6 == 1){U6 = 1 SCount++}
- if(Cbox7 == 1){U7 = 1 SCount++}
- if(Cbox8 == 1){U8 = 1 SCount++}
- timer("T",1000)
- timer("reset",2000)
- timer("Blink",100)
- }
- if(clk("Blink")){I1 = 1 I2 = 1 I3 = 1 I4 = 1 timer("stopBlink",100)}
- if(clk("stopBlink")){I1 = 0 I2 = 0 I3 = 0 I4 = 0 timer("Blink",100)}
- if(clk("T")){U1 = 0 U2 = 0 U3 = 0 U4 = 0 U5 = 0 U6 = 0 U7 = 0 U8 = 0}
- if(Cbox1 | Cbox2 | Cbox3 | Cbox4 | Cbox5 | Cbox6 | Cbox7 | Cbox8 == 1){EGP:egpSetText(5,"Pris: "+Pris+"kr.")}else{EGP:egpSetText(5,"INGEN V"+aaL()+"BEN VALGT")}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement