Advertisement
Guest User

Untitled

a guest
Sep 28th, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. @name Kidnap Betal E2
  2. @inputs EGP:wirelink User:entity
  3. @outputs Door
  4. @persist
  5. @trigger
  6.  
  7.  
  8. ##################################
  9. #Lavet af smithy, aendret af xKow#
  10. ##################################
  11.  
  12.  
  13. ######Pris#####
  14. Pris = 20000
  15. ###############
  16.  
  17. ######Tid######
  18. Tid = 5000
  19. ###############
  20.  
  21. function number wirelink:egpButton(Idx:number,Ply:entity){
  22. TL = This:egpPos(Idx) - This:egpSize(Idx) / 2 * (0 ? 0 : 1)
  23. BR = This:egpPos(Idx) + This:egpSize(Idx) / (0 ? 1 : 2)
  24. Cur = This:egpCursor(Ply) return inrange(Cur, TL, BR) exit()
  25. }
  26.  
  27. EGP:egpBox(1, vec2(256,256), vec2(512,512))
  28. EGP:egpBox(2, vec2(256,256), vec2(250,100)) EGP:egpColor(2,200,0,0,150)
  29. EGP:egpText(3,"Betal", vec2(256,256)) EGP:egpAlign(3,1,1) EGP:egpSize(3,100)
  30. EGP:egpText(4,"Pris: 20000 kr", vec2(256,190)) EGP:egpAlign(4,1,1) EGP:egpSize(4,20)
  31. EGP:egpBox(1,vec2(256,256),vec2(512,512)) EGP:egpMaterial(1,"console/background06")
  32.  
  33. if(EGP:egpButton(2, User)){
  34. moneyRequest(User,Pris,"Betal for frihed")
  35. }
  36.  
  37. if(moneyClk()){
  38. Door = 1
  39. timer("",Tid)
  40. }
  41.  
  42. if(clk("")){
  43. Door = 0
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement