Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sx,sy = guiGetScreenSize()
- hospitalWindow = guiCreateWindow(sx/3,sy/3,0.2,0.1,"",false)
- hospitalButton = guiCreateButton(1,0.5,0.5,0.9,"Hospital ($100)",true,hospitalWindow)
- hospitalProgress = guiCreateProgressBar(0.5,0.5,0.45,0.1,true,hospitalWindow)
- cancelButton = guiCreateButton(0.7,0.7,0.6,0.5,true,hospitalWindow)
- addProgress = setTimer(addProg,1000,10)
- timeNoHospital = setTimer(cancelHospital,10000,1)
- guiSetVisible(hospitalWindow,false)
- function hospitalGUI()
- guiSetVisible(hospitalWindow,true)
- showCursor(true)
- end
- addEventHandler("onClientPlayerWasted",getElementRoot(),hospitalGUI)
- function addProg()
- guiProgressBarSetProgress(hospitalProgress,guiProgressBarGetProgress+10)
- end
- function cancelHospital()
- triggerEvent("drawSpawnPanel",localPlayer)
- guiSetVisible(hospitalWindow,false)
- end
- addEventHandler("onClientGUIClick",cancelButton,cancelHospital)
- function citySelect()
- x,y,z = getElementPosition(localPlayer)
- if getZoneName(x,y,z,true)=="Los Santos" and getElementData(localPlayer,"FGNMoney")>=100 then
- setElementData(localPlayer,"FGNMoney",getElementData(localPlayer,"FGNMoney")-100)
- setElementHealth(localPlayer,100)
- setElementPosition(localPlayer,2026.5799560547,-1404.7811279297,17.676984786987)
- killTimer(addProgress)
- killTimer(timeNoHospital)
- guiSetVisible(hospitalWindow,false)
- elseif getZoneName(x,y,z,true)=="Las Venturas" and getElementData(localPlayer,"FGNMoney")>=100 then
- setElementData(localPlayer,"FGNMoney",getElementData(localPlayer,"FGNMoney")-100)
- setElementHealth(localPlayer,100)
- setElementPosition(localPlayer,1607.4057617188,1816.6859130859,10.8203125)
- killTimer(addProgress)
- killTimer(timeNoHospital)
- guiSetVisible(hospitalWindow,false)
- elseif getZoneName(x,y,z,true)=="San Fierro" and getElementData(localPlayer,"FGNMoney")>=100 then
- setElementData(localPlayer,"FGNMoney",getElementData(localPlayer,"FGNMoney")-100)
- setElementHealth(localPlayer,100)
- setElementPosition(localPlayer,-2653.0070800781,637.65576171875,14.453125)
- killTimer(addProgress)
- killTimer(timeNoHospital)
- guiSetVisible(hospitalWindow,false)
- elseif getZoneName(x,y,z,true)=="Bone County" and getElementData(localPlayer,"FGNMoney")>=100 then
- setElementData(localPlayer,"FGNMoney",getElementData(localPlayer,"FGNMoney")-100)
- setElementHealth(localPlayer,100)
- setElementPosition(localPlayer,-322.94583129883,1054.9509277344,19.7421875)
- killTimer(addProgress)
- killTimer(timeNoHospital)
- guiSetVisible(hospitalWindow,false)
- elseif getZoneName(x,y,z,true)=="Red County" and getElementData(localPlayer,"FGNMoney")>=100 then
- setElementData(localPlayer,"FGNMoney",getElementData(localPlayer,"FGNMoney")-100)
- setElementHealth(localPlayer,100)
- setElementPosition(localPlayer,1243.1016845703,328.97875976563,19.7578125)
- killTimer(addProgress)
- killTimer(timeNoHospital)
- guiSetVisible(hospitalWindow,false)
- elseif getZoneName(x,y,z,true)=="Tierra Robada" and getElementData(localPlayer,"FGNMoney")>=100 then
- setElementData(localPlayer,"FGNMoney",getElementData(localPlayer,"FGNMoney")-100)
- setElementHealth(localPlayer,100)
- setElementPosition(localPlayer,-1514.6719970703,2525.2822265625,55.778884887695)
- killTimer(addProgress)
- killTimer(timeNoHospital)
- guiSetVisible(hospitalWindow,false)
- elseif getZoneName(x,y,z,true)=="Whetstone" and getElementData(localPlayer,"FGNMoney")>=100 then
- setElementData(localPlayer,"FGNMoney",getElementData(localPlayer,"FGNMoney")-100)
- setElementHealth(localPlayer,100)
- setElementPosition(localPlayer,-2209.2348632813,-2287.8542480469,30.625)
- killTimer(addProgress)
- killTimer(timeNoHospital)
- guiSetVisible(hospitalWindow,false)
- end
- showCursor(false)
- end
- addEventHandler("onClientGUIClick",hospitalButton,citySelect)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement