Jump to content

Master_MTA

Members
  • Posts

    3,387
  • Joined

  • Last visited

  • Days Won

    55

Everything posted by Master_MTA

  1. اقدر جهدك لكن هذي خبصه يا غالي الفنكشن اولا لازم يكون له نوع معرفه وهو asynchronous او الغير متزامن اتوقع كذه ترجمته المهم لصاحب الموضوع تفضل هالرابط بيفيدك باذن الله https://stackoverflow.com/questions/33234403/using-setinterval-in-c بالتوفيق للجميع
  2. other sol you can use ajax but it's not that good idea
  3. عودة شامله من جديد للاستضافه حياكم الله الصفحه الرئيسية https://www.facebook.com/Masters-Host-517054055366086/ 2- الدسكورد https://discord.gg/5v3TJQa 3- اللوحة http://161.97.90.192/ يرجى التواصل معنا عبر هذي ال 3 صفحات فقط الى حين الانتهاء من الموقع http://masters-host.com/ الان العرض الخرافي اي سيرفر باي خطه كل شي ب 0.99 للشهر الاول يب زي ما سمعتم ب 10 ريال سوا ب 20 جنيه فودافون مصري والافظع مب صافي فقط كرتين فودافون 10 ما يحتاج صافي والسوا نفس الشي بطاقه 1 فقط paypal-0.99 skrill-0.99 لكم ان تتخيلو five m - mta sa -counter strike -mine craft - اي لعبة في ogp باذن الله نقوم بتوفيرها اذا كان بالامكان 8 gb ram shared 4 core cpu share storage up to 190 gb shared مب بس كذا لا نوفر ايضا تجربة الخدمة المراده قبل الشراء لمدة 1 ساعه وتقرر هل تشتري او لا ما ادري وش اللي يخليكم ما تشترو خدمه مثل كذا وكما عودناكم باذن الله الخادم ربع سنوي شارينه لمدة 3 شهور عشان حقوق الناس وفقنا الله واياكم يا رب
  4. yeah that will solve the problem but not gonna fix the function this function need to be fixed
  5. function getPositionBackOfElement(element, meters) if (not element or not isElement(element)) then return false end local meters = (type(meters) == "number" and meters) or 3 local posX, posY, posZ = getElementPosition(element) local _, _, rotation = getElementRotation(element) posX = posX + math.sin(math.rad(rotation)) * meters posY = posY - math.cos(math.rad(rotation)) * meters rot = rotation - math.cos(math.rad(rotation)) return posX, posY, posZ , rot end function getPositionFrontOfElement(element, meters) if (not element or not isElement(element)) then return false end local meters = (type(meters) == "number" and meters) or 3 local posX, posY, posZ = getElementPosition(element) local _, _, rotation = getElementRotation(element) posX = posX - math.sin(math.rad(rotation)) * meters posY = posY + math.cos(math.rad(rotation)) * meters rot = rotation + math.cos(math.rad(rotation)) return posX, posY, posZ , rot end function isPlayerBehindPlayer( source,player ) local x,y,z = getElementPosition( source ) local x1,y1,z1 = getElementPosition( player ) local cx,cy,cz=getPositionBackOfElement(source, 500) local dist = getDistanceBetweenPoints3D( x,y,z,cx,cy,cz ) local dist1 = getDistanceBetweenPoints3D( x1,y1,z1,cx,cy,cz ) if dist1<dist then return true end return false end function isPlayerInFrontPlayer( source,player ) local x,y,z = getElementPosition( source ) local x1,y1,z1 = getElementPosition( player ) local cx,cy,cz=getPositionFrontOfElement(source, 500) local dist = getDistanceBetweenPoints3D( x,y,z,cx,cy,cz ) local dist1 = getDistanceBetweenPoints3D( x1,y1,z1,cx,cy,cz ) if dist1<dist then return true end return false end يتحقق اذا كان اللاعب اللي تبي قدام او ورا اللاعب اللي تبي
  6. i did it by another way and i would like to share it function getPositionBackOfElement(element, meters) if (not element or not isElement(element)) then return false end local meters = (type(meters) == "number" and meters) or 3 local posX, posY, posZ = getElementPosition(element) local _, _, rotation = getElementRotation(element) posX = posX + math.sin(math.rad(rotation)) * meters posY = posY - math.cos(math.rad(rotation)) * meters rot = rotation - math.cos(math.rad(rotation)) return posX, posY, posZ , rot end function isPlayerBehindPlayer( source,player ) local x,y,z = getElementPosition( source ) local x1,y1,z1 = getElementPosition( player ) local cx,cy,cz=getPositionBackOfElement(source, 500) local dist = getDistanceBetweenPoints3D( x,y,z,cx,cy,cz ) local dist1 = getDistanceBetweenPoints3D( x1,y1,z1,cx,cy,cz ) if dist1<dist then return true end return false end ++ https://wiki.multitheftauto.com/wiki/GetPedTarget ++ https://wiki.multitheftauto.com/wiki/OnPlayerWeaponFire ++ https://wiki.multitheftauto.com/wiki/KillPed and health functions and so on
  7. hello guys i have small question is there any way to make a player can aim 360 degree by weapon or i have to do my custom aim script i was mean is there any function do it for me like setWeaponProperty and which property it's or i have to use onClientRender and so on thx in advance
  8. جيد لكن الفكره كلها اني ما حطيته كذا من الاول لاجل ان الفنكشن ذا خاص للفنكشن حقك تمام ممتاز التعديل
  9. eazy just use this function sFUpper(s) if s:lower == "cj" then return "CJ" end local ta = {} for word in s:gmatch("%w+") do table.insert( ta , word:gsub("^%l", string.upper).." " ) end return table.concat(ta) end print(sFUpper("my Frist char upper")) -- My First Char Upper جربوه لاني ما جربته صراحة لكن توقعي انه بيظبط بيختصر الموضوع مره عليكم
  10. local team = getPlayerTeam(source) if team and team =="police or whatever" then setTimer( spawnPlayer,1000*3,1,source ) end
  11. onPlayerWasted getPlayerTeam getTeamName spawnPlayer
  12. local texts= {} local counter = 1 function createBlipText(text,x,y,size,color,font ,rot) local size = size or 1.3 local font = font or "default" local color = color or tocolor(255,255,255,255) local rot = rot or 0 texts[counter]={text,x,y,size,font ,rot,color} counter = counter+1 return texts[counter-1] end local blip = createBlipText("Test" ,591.02747, 871.34741 ) local screenSize = Vector2(guiGetScreenSize()) local function drawWorldPosMapText() if isPlayerMapVisible() then for k ,v in pairs( texts ) do local worldPos = Vector2(v[2] , v[3]) local mapMin, mapMax do local mx, my, Mx, My = getPlayerMapBoundingBox() if mx then mapMin = Vector2(mx, my) mapMax = Vector2(Mx, My) else return end end local fMx, fMy = (worldPos.x + 3000) / 6000, -(worldPos.y - 3000) / 6000 local fmx, fmy = 1 - fMx, 1 - fMy local screenMapPos = Vector2((fmx * mapMin.x) + (fMx * mapMax.x), (fmy * mapMin.y) + (fMy * mapMax.y)) if screenMapPos.x >= 0 and screenMapPos.y >= 0 and screenMapPos.x <= screenSize.x and screenMapPos.y <= screenSize.y then local width = dxGetTextWidth(v[1],v[4], v[5]) dxDrawText(v[1], screenMapPos.x - (width / 2), screenMapPos.y, screenMapPos.x + (width / 2), screenMapPos.y, v[7], v[4], v[5], "center", "center" ,false,false,false,false,false,v[6]) end end end end addEventHandler("onClientRender", root, drawWorldPosMapText)
  13. فنكشن مدري بيفيدكمم ولا لا بس كنت اسوي لزبون عندي مود وطلبه كان كذا تفضلو local texts= {} local counter = 1 function createBlipText(text,x,y,size,color,font ,rot) local size = size or 1.3 local font = font or "default" local color = color or tocolor(255,255,255,255) local rot = rot or 0 texts[counter]={text,x,y,size,font ,rot,color} counter = counter+1 return texts[counter-1] end local blip = createBlipText("Test" ,591.02747, 871.34741 ) local screenSize = Vector2(guiGetScreenSize()) local function drawWorldPosMapText() if isPlayerMapVisible() then for k ,v in pairs( texts ) do local worldPos = Vector2(v[2] , v[3]) local mapMin, mapMax do local mx, my, Mx, My = getPlayerMapBoundingBox() if mx then mapMin = Vector2(mx, my) mapMax = Vector2(Mx, My) else return end end local fMx, fMy = (worldPos.x + 3000) / 6000, -(worldPos.y - 3000) / 6000 local fmx, fmy = 1 - fMx, 1 - fMy local screenMapPos = Vector2((fmx * mapMin.x) + (fMx * mapMax.x), (fmy * mapMin.y) + (fMy * mapMax.y)) if screenMapPos.x >= 0 and screenMapPos.y >= 0 and screenMapPos.x <= screenSize.x and screenMapPos.y <= screenSize.y then local width = dxGetTextWidth(v[1],v[4], v[5]) dxDrawText(v[1], screenMapPos.x - (width / 2), screenMapPos.y, screenMapPos.x + (width / 2), screenMapPos.y, v[7], v[4], v[5], "center", "center" ,false,false,false,false,false,v[6]) end end end end addEventHandler("onClientRender", root, drawWorldPosMapText)
  14. i know it's old but i was have same problem and wanna share the solution first create table gonna be 'CREATE TABLE IF NOT EXISTS FullData ( id INTEGER PRIMARY KEY AUTOINCREMENT , dataName TEXT, Data TEXT)' like this and inserting gonna be like this "INSERT INTO FullData(dataName,Data) VALUES('Group' , 'test' )" there is another sol for lazy persons like me "INSERT INTO FullData VALUES(NULL,'Group' , 'test' )" hope it helps Enjoy
  15. gonna be like that local x,y,z = 100 ,200 ,330
  16. discord : Master#9933
  17. 36 resourceRoot - > localPlayer
×
×
  • Create New...