Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local currSelected = 1
- local isShopActive = false
- local OpenSans = dxCreateFont("files/OpenSans.ttf", 10)
- local sx, sy = guiGetScreenSize(getLocalPlayer())
- local sellVehicles = {
- {481, "BMX", 15}, -- 1
- }
- addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function()
- shopPickup = createPickup(213.203125, -182.8291015625, 1.578125, 3, 1314)
- end)
- addEventHandler("onClientPickupHit", root, function(playerSource)
- if source == shopPickup and playerSource == localPlayer then
- cancelEvent()
- executeCommandHandler("togradar", playerSource)
- executeCommandHandler("toghud", playerSource)
- executeCommandHandler("togooc", playerSource)
- guiSetInputMode("no_binds_when_editing")
- fadeCamera(false)
- setElementFrozen(localPlayer, true)
- isShopActive = true
- setTimer(function()
- fadeCamera(true)
- setCameraMatrix(194.08839416504, -173.95440673828, 2.4942998886108, 194.76281738281, -173.2911529541, 2.1698732376099)
- shopVehicle = createVehicle(sellVehicles[currSelected][1], 199.8935546875, -170.7958984375, 1.578125)
- setElementDimension(localPlayer, 9999+getElementData(localPlayer, "playerid"))
- setElementDimension(shopVehicle, 9999+getElementData(localPlayer, "playerid"))
- addEventHandler("onClientRender", root, vehicleRotation)
- addEventHandler("onClientRender", root, updateColor)
- end, 2000, 1)
- showChat(false)
- currSelected = 1
- end
- end)
- function quit()
- if isShopActive then
- setElementFrozen(localPlayer, false)
- setElementDimension(localPlayer, 0)
- setCameraTarget(localPlayer)
- executeCommandHandler("togradar", playerSource)
- executeCommandHandler("toghud", playerSource)
- executeCommandHandler("togooc", playerSource)
- guiSetInputMode("no_binds_when_editing")
- isShopActive = false
- destroyElement(shopVehicle)
- setElementPosition(localPlayer, 192.71875, -178.3212890625, 1.578125)
- removeEventHandler("onClientRender", root, vehicleRotation)
- removeEventHandler("onClientRender", root, updateColor)
- showChat(true)
- currSelected = 1
- if colorPicker.isSelectOpen then
- colorPicker.closeSelect()
- end
- end
- end
- addEvent("backToCharacter",true)
- addEventHandler("backToCharacter",getRootElement(),quit)
- function vehicleRotation()
- local x, y, z = getElementRotation(shopVehicle)
- setElementRotation(shopVehicle, x, y, z + 0.1)
- dxDrawRectangle(sx/2 - 400/2, sy/2 - 350/2, 200, 170, tocolor(0, 0, 0, 150))
- dxDrawRectangle(sx/2 - 400/2, sy/2 - 350/2, 200, 25, tocolor(0, 0, 0, 150))
- dxDrawText('#ff3333internal#ffffffGaming', sx/2 - 275/2 + 75, sy/2 - 350/2 + 25, sx/2 - 275/2, sy/2 - 350/2, tocolor(255, 255, 255, 255), 1, OpenSans, 'center', 'center', false, false, false, true)
- dxDrawText('#ffffffÜdvözöllek a jármű boltban!', sx/2 - 275/2 + 75, sy/2 - 350/2 + 25, sx/2 - 275/2, sy/2 - 200/2, tocolor(255, 255, 255, 255), 1, OpenSans, 'center', 'center', false, false, false, true)
- dxDrawText('#ffffffJármű név: #ff3333'.. sellVehicles[currSelected][2] ..'', sx/2 - 275/2 + 75, sy/2 - 350/2 + 25, sx/2 - 275/2, sy/2 - 130/2, tocolor(255, 255, 255, 255), 1, OpenSans, 'center', 'center', false, false, false, true)
- dxDrawText('#ffffffÁr: #ff3333'.. sellVehicles[currSelected][3] ..'$', sx/2 - 275/2 + 75, sy/2 - 350/2 + 25, sx/2 - 275/2, sy/2 - 50/2, tocolor(255, 255, 255, 255), 1, OpenSans, 'center', 'center', false, false, false, true)
- dxDrawText('#ffffffKilépéshez nyomj #ff3333BACKSPACE #ffffff-t!', sx/2 - 275/2 + 75, sy/2 - 350/2 + 25, sx/2 - 275/2, sy/2 - -200/2, tocolor(255, 255, 255, 255), 1, OpenSans, 'center', 'center', false, false, false, true)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement