Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sx,sy = guiGetScreenSize()
- function isCursorPosition(x,y,w,h)
- local sx,sy=guiGetScreenSize()
- if isCursorShowing() then
- local mPos = {getCursorPosition()}
- cursor = {mPos[1]*sx,mPos[2]*sy}
- if cursor[1] > (x) and cursor[1] < (x) + (w) and cursor[2] > (y) and cursor[2] < (y) + (h) then
- return true
- else
- return false
- end
- end
- end
- function dxRectangulo(x,y,w,h,r,g,b,a,gui)
- local dx = dxDrawRectangle (( x / 800 ) * sx,( y / 600 ) * sy,( w / 800 ) * sx,( h / 600 ) * sy,r,g,b,a,true)
- return dx
- end
- function dxTexto(texto,x,y,w,h,r,g,b,a,scale,font,alignX,alignY,clip,wordBreak,gui,ccoded,pixel)
- local dxt = dxDrawText (texto,( x / 800 ) * sx,( y / 600 ) * sy,( w / 800 ) * sx,( h / 600 ) * sy,r,g,b,a,scale,font,alignX,alignY,clip,wordBreak,gui,ccoded,pixel)
- return dxt
- end
- function crearMarker(x,y,z,thetype,size,r,g,b,a,interior,dimension)
- local marker = createMarker ( x, y, z , thetype, size, r, g, b , a)
- if dimension then
- setElementDimension(marker, dimension)
- end
- if interior then
- setElementInterior(marker, interior)
- end
- return marker
- end
- function crearPed(skin,x,y,z,r,interior,dimension,grupoA,Anim,times,loop,updatePosition)
- local peds = createPed ( skin, x, y, z , r)
- if dimension then
- setElementDimension(peds, dimension)
- end
- if interior then
- setElementInterior(peds, interior)
- end
- if grupoA then
- setPedAnimation( peds, grupoA, Anim,times,loop,updatePosition)
- end
- return peds
- end
- MComer = {}
- MarkerCluckinE = crearMarker(928.29296875, -1352.970703125, 14.34375,"arrow",1.5,255,255,0,255)
- MarkerCluckinS = crearMarker(365, -11.61, 1002.7,"arrow",1.5,255,255,0,255,9,95)
- MComer[1] = crearMarker(367.5, -6.23046875, 1000.8,"cylinder",0.8,255,0,0,255,9,95)
- MComer[2] = crearMarker(371.8876953125, -6.23046875, 1000.8,"cylinder",0.8,255,0,0,255,9,95)
- TrabajadorCluckin1 = crearPed(167, 367.4, -4.485351562, 1001.85156,180,9,95)
- TrabajadorCluckin2 = crearPed(167, 371.9, -4.485351562, 1001.85156,180,9,95)
- TrabajadorCluckin3 = crearPed(167, 369.0, -3.806640625, 1001.85156,0,9,95,"ped", "XPRESSscratch")
- TrabajadorCluckin4 = crearPed(167, 370.5, -3.912109375, 1001.85888,180,9,95,"ped", "gum_eat")
- CivilCluckin1 = crearPed(132, 375.5, -10.25, 1002.25,90,9,95,"FOOD", "FF_Sit_Eat2",-1,true,false)
- ---Civil Familia Cluckin--
- FamiliaCluckin1 = crearPed(132, 381, -6.25, 1002.67,90,9,95,"FOOD", "FF_Sit_Eat1",0,true,false)
- FamiliaCluckin2 = crearPed(132, 381, -7.34, 1002.67,90,9,95,"FOOD", "FF_Sit_Eat2",0,true,false)
- FamiliaCluckin3 = crearPed(132, 379.64, -6.30, 1002.38,280,9,95,"FOOD", "FF_Sit_Eat3",0,true,false)
- FamiliaCluckin4 = crearPed(132, 379.64, -7.43, 1002.38,280,9,95,"FOOD", "FF_Sit_Look",0,true,false)
- --Fin Familia--
- ---Civil Pajera Cluckin--
- ParejaCluckin1 = crearPed(132, 380.89, -10.54, 1002.25,89,9,95,"FOOD", "FF_Sit_Eat1",0,true,false)
- ParejaCluckin2 = crearPed(132, 379.69, -10.54, 1002.25,268,9,95,"FOOD", "FF_Sit_Eat2",0,true,false)
- --Fin Pajera--
- function cancelPedDamage ( attacker )
- if source == TrabajadorCluckin1 or TrabajadorCluckin2 or TrabajadorCluckin3 or TrabajadorCluckin4 or CivilCluckin1 then
- for i,v in ipairs (MComer) do
- destroyElement(v)
- end
- end
- end
- addEventHandler ( "onClientPedDamage", getRootElement(), cancelPedDamage )
- --setPedAnimation( TrabajadorCluckin1, "FOOD", "SHP_Tray_Lift")
- function PCluckin()
- dxRectangulo(10, 478, 780, 112, tocolor(0, 0, 0, 184), false)
- dxRectangulo(10, 452, 780, 26, tocolor(0, 0, 0, 151), false)
- dxTexto("Bienvenido a Cluckin' Bell. Que desea?", 10, 452, 790, 478, tocolor(255, 255, 255, 255), 1.50, "default-bold", "center", "center", false, false, false, false, false)
- dxTexto("<", 71, 489, 165, 580, tocolor(255, 255, 255, 255), 5.00, "default-bold", "center", "center", false, false, false, false, false)
- dxTexto(">", 629, 488, 723, 579, tocolor(255, 255, 255, 255), 5.00, "default-bold", "center", "center", false, false, false, false, false)
- dxTexto("Pedido: Cajita Feliz\nAdicional: Helado\nValor: $39", 221, 488, 574, 580, tocolor(255, 255, 255, 255), 1.50, "default-bold", "center", "center", false, false, false, false, false)
- end
- function PCluckin1(thePlayer)
- if isElementWithinMarker(thePlayer, Comer1) then
- addEventHandler("onClientRender",getRootElement(),PCluckin)
- showCursor(true)
- end
- end
- addEventHandler ( "onClientMarkerHit", getRootElement(), PCluckin1 )
- function PCluckin2(thePlayer)
- if isElementWithinMarker(thePlayer, Comer2) then
- addEventHandler("onClientRender",getRootElement(),PCluckin)
- showCursor(true)
- end
- end
- addEventHandler ( "onClientMarkerHit", getRootElement(), PCluckin2 )
- function TeleportCluckinE(thePlayer)
- if isElementWithinMarker(thePlayer, MarkerCluckinE) then
- fadeCamera(false,0)
- setElementInterior( thePlayer, 9, 364.67, -9.8, 1001.87)
- setElementDimension(thePlayer,95)
- setTimer(function() fadeCamera(true)end,1000,1)
- end
- end
- addEventHandler ( "onClientMarkerHit", getRootElement(), TeleportCluckinE )
- function TeleportCluckinS(thePlayer)
- if isElementWithinMarker(thePlayer, MarkerCluckinS) then
- fadeCamera(false,0)
- setElementInterior( thePlayer, 0,925.56, -1352.73, 13.37)
- setElementDimension(thePlayer,0)
- setTimer(function() fadeCamera(true)end,1000,1)
- end
- end
- addEventHandler ( "onClientMarkerHit", getRootElement(), TeleportCluckinS )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement