Facebook
From Edgy Human, 4 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 233
  1. if(first()) {
  2.    
  3.     ##INDSTILLINGER
  4.     Profit = 500
  5.     ##############
  6.    
  7.    
  8. setName("------------------------
  9. Gunshop
  10. By
  11. Rasmusss
  12. ------------------------")
  13.  
  14.     if(first() | ~E & E | duped() | dupefinished())
  15.     {
  16.         function number wirelink:egpButton(Idx:number,Ply:entity){
  17.         TL = This:egpPos(Idx) - This:egpSize(Idx) / 2 * (0 ? 0 : 1)
  18.         BR = This:egpPos(Idx) + This:egpSize(Idx) / (0 ? 1 : 2)
  19.         Cur = This:egpCursor(Ply) return inrange(Cur, TL, BR) exit()
  20.     }
  21.  
  22.         function number entity:wepPrice()
  23.     {
  24.         if(This:isShipment()){
  25.         return This:shipmentPrice()+Profit
  26.         }else{return 0}
  27.     }
  28.  
  29.         function string entity:wepName()
  30.     {
  31.         if(This:isShipment()){
  32.         return This:shipmentName()
  33.         }else{return "Udsolgt"}
  34.     }
  35.     }
  36.    
  37.         function wirelink:drawHome(){
  38.  
  39.      
  40.         E:egpClear()
  41.         E:egpBox(1,vec2(256,256),vec2(512,512)) E:egpColor(1,44,62,80,75)
  42.         E:egpBox(2,vec2(256,25),vec2(512,50)) E:egpAlign(2,1,1) E:egpColor(2,127,140,141,75)
  43.         E:egpBox(3,vec2(256,47),vec2(512,5)) E:egpAlign(3,1,1)
  44.         E:egpText(4,"Velkommen!",vec2(256,25)) E:egpAlign(4,1,1) E:egpFont(4,"Courier New") E:egpSize(4,35)
  45.         E:egpText(5,"apology",vec2(256,256)) E:egpAlign(5,1,1) E:egpFont(5,"Courier New") E:egpSize(5,35)
  46.         E:egpBox(6,vec2(256,276),vec2(150,3))
  47.         E:egpBox(7,vec2(256,492),vec2(512,40)) E:egpColor(7,127,140,141,75)
  48.         E:egpBox(8,vec2(256,470),vec2(512,5)) E:egpAlign(8,1,1)
  49.         E:egpText(9,"Login",vec2(256,492)) E:egpAlign(9,1,1) E:egpFont(9,"Courier New") E:egpSize(9,35)
  50.  
  51.         S = 1
  52. }
  53.         function wirelink:drawLogin(){
  54.        
  55.         E:egpClear()
  56.         E:egpBox(1,vec2(256,256),vec2(512,512)) E:egpColor(1,44,62,80,75)
  57.         E:egpText(2,"Velkommen!",vec2(256,25)) E:egpAlign(2,1,1) E:egpFont(2,"Courier New") E:egpSize(2,35)
  58.         E:egpText(3,"Her ser du vores udvalg",vec2(256,70)) E:egpAlign(3,1,1) E:egpFont(3,"Courier New") E:egpSize(3,30)
  59.         E:egpBox(4,vec2(256,140),vec2(300,30))
  60.         E:egpBox(5,vec2(256,190),vec2(300,30))
  61.         E:egpBox(6,vec2(256,240),vec2(300,30))
  62.         E:egpBox(7,vec2(256,290),vec2(300,30))
  63.         E:egpBox(8,vec2(256,340),vec2(300,30))
  64.         E:egpBox(9,vec2(256,390),vec2(300,30))
  65.         E:egpBox(10,vec2(256,492),vec2(512,40)) E:egpColor(10,127,140,141,75)
  66.         E:egpBox(11,vec2(256,470),vec2(512,5)) E:egpAlign(11,1,1)
  67.         E:egpText(12,"Logud",vec2(256,492)) E:egpAlign(12,1,1) E:egpFont(12,"Courier New") E:egpSize(12,35)
  68.         E:egpText(13,R1:wepName():sub(0,8)+" - "+R1:wepPrice()+",-",vec2(256,140)) E:egpAlign(13,1,1) E:egpFont(13,"Courier New") E:egpSize(13,30) E:egpColor(13,41,128,185,150)
  69.         E:egpText(14,R2:wepName():sub(0,8)+" - "+R2:wepPrice()+",-",vec2(256,190)) E:egpAlign(14,1,1) E:egpFont(14,"Courier New") E:egpSize(14,30) E:egpColor(14,41,128,185,150)
  70.         E:egpText(15,R3:wepName():sub(0,8)+" - "+R3:wepPrice()+",-",vec2(256,240)) E:egpAlign(15,1,1) E:egpFont(15,"Courier New") E:egpSize(15,30) E:egpColor(15,41,128,185,150)
  71.         E:egpText(16,R4:wepName():sub(0,8)+" - "+R4:wepPrice()+",-",vec2(256,290)) E:egpAlign(16,1,1) E:egpFont(16,"Courier New") E:egpSize(16,30) E:egpColor(16,41,128,185,150)
  72.         E:egpText(17,R5:wepName():sub(0,8)+" - "+R5:wepPrice()+",-",vec2(256,340)) E:egpAlign(17,1,1) E:egpFont(17,"Courier New") E:egpSize(17,30) E:egpColor(17,41,128,185,150)
  73.         E:egpText(18,R6:wepName():sub(0,8)+" - "+R6:wepPrice()+",-",vec2(256,390)) E:egpAlign(18,1,1) E:egpFont(18,"Courier New") E:egpSize(18,30) E:egpColor(18,41,128,185,150)
  74.                
  75.     S = 2        
  76.     }
  77.  
  78.         E:drawHome()
  79.     }
  80.  
  81.  
  82.  
  83.         function number wirelink:egpButton(Index:number,Player:entity){
  84.         Pos=This:egpPos(Index)
  85.         Size=This:egpSize(Index)/2
  86.         return inrange(This:egpCursor(Player),Pos-Size,Pos+Size)
  87.    
  88.    
  89.    
  90.     }
  91.         if(S == 1 & ops() < 150){
  92.         if(E:egpButton(7,U)){E:drawLogin()}
  93.     }
  94.  
  95.         elseif(S == 2 & ops() < 150){
  96.         if(E:egpButton(10,U)){E:drawHome()}
  97.     }
  98.  
  99.  
  100.         if(S == 2) {
  101.         if(egpButton(4,U)){moneyRequest(U,R1:wepPrice())
  102.     }  
  103.    
  104.     }