Jump to content

Best-Killer

Members
  • Posts

    494
  • Joined

  • Last visited

Everything posted by Best-Killer

  1. Yes i'm sure bro :v i'm not sure about 1920x1080 resolution too :v
  2. function jobwindow() if isMouseSetColor (sx*505, sy*519, sx*76, sy*37) then coloracc = tocolor(0, 153, 0, 255) end if isMouseSetColor (sx*710, sy*519, sx*76, sy*37) then colordec = tocolor(255, 0, 0, 255) end dxSetAspectRatioAdjustmentEnabled( true ) dxDrawImage(sx*357, sy*161, sx*550, sy*450, imagepath, 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText("Accept", screenW*505/1280, screenH*519/768, screenW*76/1280, screenH*37/768, coloracc,screenH / 768 * 1.00 , newFont, "left", "top", false, false, false, false, false) dxDrawRectangle(sx*505, sy*519, sx*76, sy*37, tocolor(0, 0, 0, 0), false) dxDrawText("decline", sx*710, sy*519, sx*76, sy*37, colordec, 1.00*sx, newFont, "left", "top", false, false, false, false, false) dxDrawRectangle(sx*710, sy*519, sx*76, sy*37, tocolor(0, 0, 0, 0), false) coloracc = tocolor(255, 255, 255, 255) colordec = tocolor(255, 255, 255, 255) end i just add your code dude :v Errors : No me or my friend : i can see the texts but my friend no
  3. still same :v the text not showen :v
  4. local screenW, screenH = guiGetScreenSize() local sx, sy = (screenW/1280), (screenH/768) function jobwindow() if isMouseSetColor (sx*505, sy*519, sx*76, sy*37) then coloracc = tocolor(0, 153, 0, 255) end if isMouseSetColor (sx*710, sy*519, sx*76, sy*37) then colordec = tocolor(255, 0, 0, 255) end dxSetAspectRatioAdjustmentEnabled( true ) dxDrawImage(sx*357, sy*161, sx*550, sy*450, imagepath, 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText("Accept", 505*sx, 519*sy, 76*sy, 37*sx, coloracc, 1.00*sx, newFont, "left", "top", false, false, false, false, false) dxDrawRectangle(sx*505, sy*519, sx*76, sy*37, tocolor(0, 0, 0, 0), false) dxDrawText("decline", sx*710, sy*519, sx*76, sy*37, colordec, 1.00*sx, newFont, "left", "top", false, false, false, false, false) dxDrawRectangle(sx*710, sy*519, sx*76, sy*37, tocolor(0, 0, 0, 0), false) coloracc = tocolor(255, 255, 255, 255) colordec = tocolor(255, 255, 255, 255) end the things for me fine but my freind have resolution 1920x1080 the text is not showing for him what is the problem ?? i can fix ? or players can't play with resolution 1920x1080
  5. here is object : https://community.multitheftauto.com/index.php?p=resources&s=details&id=6729 but what i'm making is not object , i'm drawingdximage dude
  6. function imagedraw() local streamedPlayers = getElementsByType ("player", root, true) if streamedPlayers and #streamedPlayers ~= 0 then local lpos = {getElementPosition(localPlayer)} for _,p in ipairs (streamedPlayers) do if p and isElement (p) then if getElementData (p, "tesssss") then local ppos = {getElementPosition(p)} if getDistanceBetweenPoints2D (lpos[1], lpos[2], ppos[1], ppos[2]) <= 20 then local x, y = getScreenFromWorldPosition (ppos[1], ppos[2], ppos[3]) if x and y then dxDrawImage ( x, y, 50, 50, "images/crosshair.png" ) end end end end end end end addEventHandler ("onClientRender", root, imagedraw) the image showen but it's not up head the player, what i have to do now
  7. Hello guys i wanted to make like this script : https://community.multitheftauto.com/index.php?p=resources&s=details&id=6729 but with DxDrawImage i want know how to drawimage too all who have stars players :v and cops can see the image too (means server side as i think ) i tried with function imagedraw() local px, py, pz, tx, ty, tz, dist px, py, pz = getCameraMatrix() for k, v in ipairs(getElementsByType("player")) do if(getElementData(v, "tesssss") == true) then tx, ty, tz = getElementPosition(v) dist = getDistanceBetweenPoints3D( px, py, pz, tx, ty, tz ) if dist < 30.0 then if isLineOfSightClear(px, py, pz, tx, ty, tz, true, false, false, true, false, false, true) then local sx, sy, sz = getPedBonePosition(v, 5) local x,y = getScreenFromWorldPosition(sx, sy, sz+0.3) if ( x >= 0 and x <= 1 and y >= 0 and y <= 1 ) then x, y = AbsoluteToRelativ( x, y ) dxDrawImage ( x, y, 50, 50, "images/rank_law.png" ) end end end end end end addEventHandler("onClientRender",getRootElement(),imagedraw) if ( getPlayerWantedLevel ( v ) > 0 ) then setElementData ( v, "tesssss",true) setPlayerNametagText ( v, tostring ( getPlayerName ( v ) ).."["..tostring ( getPlayerWantedLevel ( v ) ).."]" ) else setPlayerNametagText ( v, tostring ( getPlayerName ( v ) ) ) setElementData ( v, "tesssss",false) end
  8. Dude !!! it's not geting from data it's geting from table dude bro :v
  9. i have this in server side : jobRanks = { ['Criminal'] = { [0] = "Robber", [85] = "Assaltant", [150] = "Mercenary", [280] = "Carjacker", [500] = "O.G", [700] = "Underboss", [1000] = "Kingpin", }, } function getJobRankTable ( ) return jobRanks end and i want get them in Client Side to put them like : function test () dxDrawText("RankName Number", 648, 431, 791, 459, tocolor(255, 255, 255, 255), 1.00, textfront, "left", "top", false, false, false, false, false) end What i have to do guys ?
  10. 0 errors and the text not showing :v nvm fixed
  11. function onDmg(attacker, weapon, _, loss) if ( isElement ( attacker ) and weapon and attacker ~= source ) then if getElementData ( source, "KillArrest") =="true" then cancelEvent() end end end addEventHandler('onPlayerDamage',root,onDmg) 0 errors but still i can damage the player :v what is the problem guys
  12. Hello Guys , i want know how to get data from database then i put them in dx text give me example or tell me what problem here :v i tried with : function testdr (d) dxDrawText(tostring(d.mystats.arrests), 524, 250, 720, 322, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) end addEventHandler("onClientPreRender", root,testdr) addEvent ( "SAEGJobs:Modules->Panel:OnServerSendClientData", true ) addEventHandler ( "SAEGJobs:Modules->Panel:OnServerSendClientData", root, function ( d ) testdr(d) end ) addEvent ( "SAEGJobs:Modules->Panel:RequestData", true ) addEventHandler ( "SAEGJobs:Modules->Panel:RequestData", root, function () local user = getAccountName ( getPlayerAccount ( source ) ) local jobData = exports.SAEGJobs:getJobRankTable ( )['police officer'] if ( getElementData ( source, "Job" ):lower( ) == "Detective" ) then jobData = exports.SAEGJobs:getJobRankTable ( )['police officer'] end local data = { } data.mystats = { } data.mystats.arrests = exports.SAEGJobs:getJobColumnData ( user, "Arrests" ) data.mystats.solvedCrims = exports.SAEGJobs:getJobColumnData ( user, "SolvedCrims" ) data.mystats.rank = getElementData ( source, "Job Rank" ) local ranks = { } local ranks_ = { } for i, v in pairs ( jobData ) do table.insert ( ranks, { i, v } ) end table.sort ( ranks, function ( a, b, x ) return a[1] > b[1] end ) for i=#ranks, 1, -1 do table.insert ( ranks_, ranks [ i ] ) end local ranks = ranks_ local nextRank = "None" local nextRankArrests = "None" local isNext = false for i, v in ipairs ( ranks ) do if ( isNext ) then nextRank = v[2] nextRankArrests=v[1] break end if ( v[2] == data.mystats.rank ) then isNext = true end end data.mystats.nextRank = nextRank data.mystats.nextRankArrests = nextRankArrests triggerClientEvent ( source, "SAEGJobs:Modules->Panel:OnServerSendClientData", source, data ) end )
  13. why should i be reported ? i'll not use their design (images) and i think it's allowed any mod answer here pls ? is it's allowed or no
  14. i won't anyone do it for me i just want to know what functions/events i have to use you think i want someone to do it for me ? lol noo
  15. kidding me bro ? :V ahahaha what events/functions i have to use
  16. i like saur F1 panel and i want try to make one like it :v what i have to use guys ? Note: i don't know if that is allowed or no Please tell me if it's problem if i make one like it or no
  17. i won't get account name i want get PlayerName
  18. is there way to getPlayerName From playeraccountname ? if Yes, How ? what functions i have to use
×
×
  • Create New...