Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --// \\
- --|| Project: MTA - German LSR Reallife Gamemode ||
- --|| Developers: Lorenzo ||
- --|| Version: 3.6 ||
- --|| URL: Reallife-SA.de ||
- --\\ //
- local HouseN_GUI={Window={},Button={},Gridlist={},GridlistColumn={},Label={},Edit={},Image={},Tabpanel={},Tab={},}
- loadstring(exports.dgs:dgsImportFunction())()-- load functions
- function openHouseOwnerGUI()
- if not isPedInVehicle(lp)then
- if getElementData(lp,"ElementClicked")==false then
- showCursor(true)
- setElementData(lp,"ElementClicked",true)
- HouseN_GUI.Window[1]=dgsCreateWindow(0,GLOBALscreenY/2-250/2,300,250,"Hausmenü",false,tocolor(255,255,255),nil,nil,nil,nil,nil,true)
- dgsMoveTo(HouseN_GUI.Window[1],GLOBALscreenX/2-300/2,GLOBALscreenY/2-250/2,false,false,"OutQuad",1500)
- dgsWindowSetSizable(HouseN_GUI.Window[1],false)
- dgsWindowSetMovable(HouseN_GUI.Window[1],false)
- HouseN_GUI.Button[1]=dgsCreateButton(274,-25,26,25,"×",false,HouseN_GUI.Window[1],_,_,_,_,_,_,tocolor(200,50,50,255),tocolor(250,20,20,255),tocolor(150,50,50,255),true)
- local house=getElementData(lp,"house")
- --preis=getElementData(house,"preis")
- rent=getElementData(house,"miete")
- HouseN_GUI.Label[1]=dgsCreateLabel(10,10,200,40,"Preis: ",false,HouseN_GUI.Window[1])
- HouseN_GUI.Label[2]=dgsCreateLabel(10,25,200,40,"Mindestspielzeit: 3 Stunden",false,HouseN_GUI.Window[1])
- HouseN_GUI.Button[2]=dgsCreateButton(10,140,280,30,"Bezahlen [Bar]",false,HouseN_GUI.Window[1],_,_,_,_,_,_,tocolor(50,50,50,255),tocolor(90,90,90,255),tocolor(10,10,10,255),true)
- HouseN_GUI.Button[3]=dgsCreateButton(10,180,280,30,"Bezahlen [Bank]",false,HouseN_GUI.Window[1],_,_,_,_,_,_,tocolor(50,50,50,255),tocolor(90,90,90,255),tocolor(10,10,10,255),true)
- --dgsSetText(HouseN_GUI.Label[1],"Preis: "..preis..""..waehrung.."")
- addEventHandler("onDgsMouseClick",HouseN_GUI.Button[3],
- function(btn,state)
- if btn=="left" and state=="up" then
- dgsCloseWindow(HouseN_GUI.Window[1])
- showCursor(false)
- setElementData(lp,"ElementClicked",false)
- triggerServerEvent("onHouseBuyGUI",lp,lp,"bank")
- end
- end,
- false)
- addEventHandler("onDgsMouseClick",HouseN_GUI.Button[2],
- function(btn,state)
- if btn=="left" and state=="up" then
- dgsCloseWindow(HouseN_GUI.Window[1])
- showCursor(false)
- setElementData(lp,"ElementClicked",false)
- triggerServerEvent("onHouseBuyGUI",lp,lp,"bar")
- end
- end,
- false)
- addEventHandler("onDgsMouseClick",HouseN_GUI.Button[1],
- function(btn,state)
- if btn=="left" and state=="up" then
- dgsCloseWindow(HouseN_GUI.Window[1])
- showCursor(false)
- setElementData(lp,"ElementClicked",false)
- end
- end,
- false)
- end
- end
- end
- addEvent("onCreateNewHouseGUI",true)
- addEventHandler("onCreateNewHouseGUI",lp,openHouseOwnerGUI)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement