Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local sx, sy = guiGetScreenSize(); --lekéri a játékos képernyőméretét
- local w, h = 200, 300; --Megadja a hosszát és a magasságát {200 = hossz ; változtatható} {20 = magasság ; változtatható}
- local x, y = sx/2-w/2, sy/2-h/2; --Megadja az x és az y pozitcióját (középre helyezi)
- local font = dxCreateFont("file/mySimpleFont.ttf") --<[ Font ]>--
- local rage = dxCreateFont("file/rage.ttf") --<[ Font ]>--
- local enabledCars = { [416]=true, [596]=true, [597]=true, [598]=true, [599]=true, [427]=true, [490]=true }
- local veh = getPedOccupiedVehicle(localPlayer)
- local ulephely = getPedOccupiedVehicleSeat(localPlayer)
- mainRender = false
- function mainRender()
- if (veh) then
- if (getElementModel(veh)) == 416 or (getElementModel(veh)) == 596 or (getElementModel(veh)) == 597 or (getElementModel(veh)) == 598 or (getElementModel(veh)) == 599 or (getElementModel(veh)) == 427 or (getElementModel(veh)) == 490 then
- if ulephely < 2 then
- mainRender = true
- dxDrawRectangle(x*1.95, y, w, h, isCursorHower(x*1.95, y, w, h, tocolor(0, 0, 0, 100), tocolor(220, 20, 60, 100)));
- dxDrawRectangle(x*1.95, y, w, h-270, tocolor(0, 0, 0, 150))
- dxDrawImage(x*2, y+180, w/2, h/3, "file/siren.png")
- dxDrawImage(x*2, y+40, w/2, h/3, "file/horn.png", tocolor(90,90,134,255))
- dxDrawText("#dc153cSwipe#ffffff-#00baf3Siren", x*1.95, y, x*1.95+w, y+h-270, tocolor(60, 155, 74, 200), 2, "rage", "center", "center", true, true, true, true)
- return;
- elseif ulephely > 2 then
- mainRender = false
- end
- else
- mainRender = false
- return;
- end
- end
- end
- addEventHandler("onClientRender", root, mainRender);
- function isCursorHower(posX, posY, width, height, color1, color2)
- if isCursorShowing() then
- local mouseX, mouseY = getCursorPosition();
- local clientW, clientH = guiGetScreenSize();
- local mouseX, mouseY = mouseX * clientW, mouseY * clientH;
- if (mouseX > posX and mouseX < (posX+width) and mouseY > posY and mouseY < (posY+height)) then
- return color2;
- end
- end
- return color1;
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement