Jump to content

Can anyone help me to complete script, I find it difficult to program it..


Neffax

Recommended Posts

(in this script, i wanna make a gym sale like the one in gta sa )

server Side : 

 

   local mark1 = createMarker (2229.80322, -1721.16260, 14.06020, "arrow", 1, 255, 0, 0, 50)
   local mark2 = createMarker (772.22845, -5.51261, 1001.3833, "arrow", 1, 255, 0, 0, 50)
   local mark3 = createMarker (770.36554, 5.59896, 999.8, "cylinder", 1,  255, 0, 100 )
   local obg2 =  createObject (3071, 772.01453, 5.57546, 999.98021, 0, 100, 100)
   local obg =  createObject (3071, 772.01453, 4.7546, 999.98021, 0, 100, 100)
 
function inter(hitElement, matchingDimension)
   
   
    setElementInterior (hitElement, 5, 768.0793, 5.8606, 1000.7160)
    setElementDimension (hitElement, 46)
    setElementInterior (mark2, 5)
    setElementDimension (mark2, 46)
    setElementInterior (mark3, 5)
    setElementDimension (mark3, 46)
    setElementDimension  (obg, 46)
   setElementInterior (obg, 5)
   setElementDimension  (obg2, 46)
   setElementInterior (obg2, 5)



 
end
addEventHandler ("onMarkerHit", mark1, inter)



 
function exiit (hitElement, matchingDimension)
 
    setElementInterior (hitElement, 0, 2230.84985, -1723.47961, 13.55957)
    setElementDimension (hitElement, 0)
 
end
addEventHandler ("onMarkerHit", mark2, exiit)
 
function object1 (hitElement, matchingDimension)
   
   setPedAnimation (hitElement, "freeweights", "gym_free_pickup", -1, false, false, false, false)
   setTimer (function ()
   exports.pAttach:attach(obg, hitElement, "right-hand", 0, -0.15, 0, 90, 0, 0)
   exports.pAttach:attach(obg2, hitElement, "left-hand", 0, -0.15, 0, 90, 0, 0)
   end, 4000, 1 )
   triggerClientEvent (root, "gymm", source)
end
addEventHandler ("onMarkerHit", mark3, object1)
 
Client Side : 
 
function aa()
local screenW, screenH = guiGetScreenSize()
 
addEventHandler("onClientRender", root,
    function()
        dxDrawLine((screenW * 0.8828) - 1, (screenH * 0.4248) - 1, (screenW * 0.8828) - 1, screenH * 0.4375, tocolor(0, 0, 0, 255), 1, true)
        dxDrawLine(screenW * 0.9797, (screenH * 0.4248) - 1, (screenW * 0.8828) - 1, (screenH * 0.4248) - 1, tocolor(0, 0, 0, 255), 1, true)
        dxDrawLine((screenW * 0.8828) - 1, screenH * 0.4375, screenW * 0.9797, screenH * 0.4375, tocolor(0, 0, 0, 255), 1, true)
        dxDrawLine(screenW * 0.9797, screenH * 0.4375, screenW * 0.9797, (screenH * 0.4248) - 1, tocolor(0, 0, 0, 255), 1, true)
        dxDrawRectangle(screenW * 0.8828, screenH * 0.4248, screenW * 0.0969, screenH * 0.0127, tocolor(70, 80, 93, 192), true)
        dxDrawText("POWER", (screenW * 0.7555) - 1, (screenH * 0.4150) - 1, (screenW * 0.8750) - 1, (screenH * 0.4473) - 1, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "center", "center", false, false, true, true, false)
        dxDrawText("POWER", (screenW * 0.7555) + 1, (screenH * 0.4150) - 1, (screenW * 0.8750) + 1, (screenH * 0.4473) - 1, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "center", "center", false, false, true, true, false)
        dxDrawText("POWER", (screenW * 0.7555) - 1, (screenH * 0.4150) + 1, (screenW * 0.8750) - 1, (screenH * 0.4473) + 1, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "center", "center", false, false, true, true, false)
        dxDrawText("POWER", (screenW * 0.7555) + 1, (screenH * 0.4150) + 1, (screenW * 0.8750) + 1, (screenH * 0.4473) + 1, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "center", "center", false, false, true, true, false)
        dxDrawText("POWER", screenW * 0.7555, screenH * 0.4150, screenW * 0.8750, screenH * 0.4473, tocolor(13, 148, 131, 192), 1.00, "bankgothic", "center", "center", false, false, true, true, false)
        dxDrawText("REPS", (screenW * 0.7758) - 1, (screenH * 0.4756) - 1, (screenW * 0.8828) - 1, (screenH * 0.5078) - 1, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "left", "top", false, false, true, true, false)
        dxDrawText("REPS", (screenW * 0.7758) + 1, (screenH * 0.4756) - 1, (screenW * 0.8828) + 1, (screenH * 0.5078) - 1, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "left", "top", false, false, true, true, false)
        dxDrawText("REPS", (screenW * 0.7758) - 1, (screenH * 0.4756) + 1, (screenW * 0.8828) - 1, (screenH * 0.5078) + 1, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "left", "top", false, false, true, true, false)
        dxDrawText("REPS", (screenW * 0.7758) + 1, (screenH * 0.4756) + 1, (screenW * 0.8828) + 1, (screenH * 0.5078) + 1, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "left", "top", false, false, true, true, false)
        dxDrawText("REPS", screenW * 0.7758, screenH * 0.4756, screenW * 0.8828, screenH * 0.5078, tocolor(40, 120, 80, 192), 1.00, "bankgothic", "left", "top", false, false, true, true, false)
    end
)
end
addEvent ("gymm", true)
addEventHandler ("gymm", root, aa)
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...