Jump to content

Master_MTA

Members
  • Posts

    3,389
  • Joined

  • Last visited

  • Days Won

    55

Everything posted by Master_MTA

  1. gonna be like that local x,y,z = 100 ,200 ,330
  2. discord : Master#9933
  3. 36 resourceRoot - > localPlayer
  4. addEventHandler("onClientMarkerHit",resourceRoot,onTarHit) ليه ما عدلته مثل ما قلت لك
  5. local targetMar = { {1345.76172, 343.09811, 19,0},--x,y,z,blip {205.60931, -174.15186, 1,0},--x,y,z,blip {2264.45654, 63.23068, 25,0},--x,y,z,blip {696.72180, -442.32590, 15,0},--x,y,z,blip {-85.84571, -1189.86865, 0.5,0}--x,y,z,blip } mar[i] = createMarker(v[1],v[2],v[3],"cylinder",2,255,255,0) bli[i] = createBlipAttachedTo(mar[i],v[4]) setBlipVisibleDistance ( bli[i], 100 )-- distance from blip to show function onTarHit(h) if h==localPlayer and getElementData(localPlayer,"pizzaOccupent") == true and getElementData(source,"pizzaMar") == true then local piz = getElementData(localPlayer,"pizzaDone") if not piz then piz = 0 end destroyElement(source) local blip = getAttachedElements ( source )[1] destroyElement(blip) setElementData(localPlayer,"pizzaDone",piz+1) piz = piz+1 outputChatBox(piz.."/5 completed !",0,255,0) if piz == 5 then removeEventHandler("onClientMarkerHit",resourceRoot,onTarHit) outputChatBox("Come back now to receive your money",255,255,0) finMar = createMarker(-52.76169, -225.02179, 5.42969, "cylinder", 2, 255, 255, 0) blipfin = createBlip(-52.76169, -225.02179, 5.42969, 0) addEventHandler("onClientMarkerHit",finMar,finishJob,false) end end end addEventHandler("onClientMarkerHit",resourceRoot,onTarHit)
  6. العفو بالتوفيق اخي
  7. addEventHandler("onVehicleExit",root, function(playerExited) if bikes[playerExited] and isElement(bikes[playerExited]) and bikes[playerExited] == source then destroyElement(source) bikes[playerExited] = nil end end )
  8. ما تطفش انت? عالعموم واصل بالتوفيق باذن الله
  9. just use md5 instead this type of hashing +_+
  10. the version 1.5.7 of mta sa have problem with onColShapeHit onMarkerHit any hit or key binding functions& events if u use getElementType() even if there is check before it for example addEventHandler("onMarkerHit",root,function(e) outputChatBox("element Type"..getElementType(e)) end) -- the bug still showen even if i do that addEventHandler("onMarkerHit",root,function(e) if e and isElement(e) then outputChatBox("element Type"..getElementType(e)) end end) so my sol was like that function isAmElement(e) if isElement( e ) then return true end return false end -- if i do like that it's still not working --[[ function isAmElement(e) return isElement( e ) or false end ]]-- addEventHandler("onMarkerHit",root,function(e) if not isAmElement(e) then return end outputChatBox("element Type"..getElementType(e)) end) it's weird problem
  11. addCommandHandler("getAccount", function (plr)-- adding command handler local acc = getPlayerAccount(plr) -- getting player account if not isGuestAccount(acc) then -- if user logged on local Accountx = getAccountData( aAccount, "aAccount" ) -- if data stored as account data -- local Accountx = getElementData(plr,'aAccount') -- if data was stored as element data remove -- to enable it setElementData ( plr, "tempdata.originalnick", getPlayerName(plr) ) -- i don't get what you want right now else -- if it wasn't logged in setElementData ( plr, "tempdata.originalnick", 'Guest Account' ) end end )
  12. الفكره في الساينتاكس حقك خاطئ ضايف فقط فاصله يا ريت تتحقق من ذي السوالف قبل نشر موضوع عالعموم تفضل local mtaSerial = getPlayerSerial(client) exports.mysql:query_free("UPDATE `accounts` SET `password`='"..toSQL(Password).."' WHERE `mtaserial`='".. toSQL(mtaSerial) .."' ")
  13. @thisdp take this dgs editor and complete your work on it am feel bored from working on it https://top4top.io/downloadf-1622i0s3i1-zip.html it's actually is about to be finished just simple things need to add to it
  14. sure am gonna find it out now just sec just use this it's works for me
  15. sorry for being late i was have online exams there is the soluation getPosition gonna be in oop file getPosition =function(self,...) local pos = Vector2(call(dgsOOP.dgsRes,"dgsGetPosition",self.dgsElement,...)) if pos then return pos.x,pos.y end return false end, and getSize gonna be getSize =function(self,...) local pos = Vector2(call(dgsOOP.dgsRes,"dgsGetSize",self.dgsElement,...)) if pos then return pos.x,pos.y end return false end, +_+ if you wanna return it as vector getSize =function(self,...) local pos = Vector2(call(dgsOOP.dgsRes,"dgsGetSize",self.dgsElement,...)) return (pos and pos) or false end
  16. function getFixedNumberFromString(str,form) return (form[string.gsub(string.match(str,"%W+"),"%s+",'')] and tonumber(string.match(str,"%d+")..form[string.gsub(string.match(str,"%W+"),"%s+",'')]) ) or false end --example local format = { ['K']='000', ['الف']='000', } local num = getFixedNumberFromString("50K",format) print(num)--printing 50000 local num = getFixedNumberFromString("50الف",format) print(num)--printing 50000
  17. function getElementsNearPlayer(plr,d,ty) local ta = {} local x , y , z = getElementPosition(plr) for k,v in ipairs(getElementsByType((ty and ty or 'player')))do if v ~= plr then local x1 , y1 , z1 = getElementPosition( v ) local di = getDistanceBetweenPoints3D ( x , y , z , x1 , y1 , z1 ) if dist <= d then table.insert( ta , v) end end end return ta end
  18. sure am gonna try to find out what's the wrong and tell u
  19. sorry i have question about parent system in your dxlib let us assume there is a window and this window have 2 buttons the button 1 and button 2 let's assume that button 1 is parent for button 2 and window is parent for button 1 so is it true that when am try to get window children button 1 and button 2 is returned? as child for window
  20. the title bar + sorry i was mean dgsGetSize + dgsGetSize+dgsGetPosition -> both of them in oop return 1 value only which's x for pos and w forsize ele:getSize()->w only ele:getPosition()->x only
×
×
  • Create New...