Jump to content

MR.S3D

Members
  • Posts

    732
  • Joined

  • Last visited

Everything posted by MR.S3D

  1. حلو رايك ومنها الواحد يطور مهارته بلغات البرمجة الاخرى
  2. ex: Server local marker = createMarker(2153, -1799, 12.5, "cylinder", 1, 255, 0, 0) addEventHandler("onMarkerHit", root, function(hit) if source == marker and getElementType(hit) == "player" then triggerClientEvent(hit,"testS3D", hit) end end ) Client addEvent("testS3D", true) addEventHandler("testS3D", root, function () Window = guiCreateWindow ( 0, 0, 0.5, 0.4, "Test", true ) end )
  3. Client addEvent("onTheDamnWindow", true) addEventHandler("onTheDamnWindow", root, function () if isElement(missionName) then destroyElement(missionName) end missionName = guiCreateLabel(0.64, 0.85, 0.38, 0.13, "sweet buisness", true) local font0_gtasanandreas = guiCreateFont(":freeroam_login/images/gtasanandreas.ttf", 50) guiSetFont(missionName, font0_gtasanandreas or "default-bold-small") guiLabelSetColor(missionName, 252, 226, 81) end )
  4. local missionMarker = createMarker(2153, -1799, 12.5, "cylinder", 1, 255, 0, 0) function triggerTheEvent(hit) if source == missionMarker and getElementType(hit) == "player" then triggerClientEvent("onTheDamnWindow", hit) end end addEventHandler("onMarkerHit", resourceRoot, triggerTheEvent)
  5. use this function https://wiki.multitheftauto.com/wiki/DxDrawTextOnElement
  6. turftimes = setTimer ( sendTurfPayout, (60*tonumber(get("*PAYOUT_TIME")))*1000, 0 ) local turftim,_,_ = getTimerDetails(turftimes) local total = turftim / 60 / 1000 outputChatBox ( ""..total.." minutes",p,255,0,0,true)
  7. Server Cars = {} addCommandHandler ( "Car", function ( p ) if isElement ( Cars [ p ] ) then destroyElement ( Cars [ p ] ) Cars [ p ] = nil end local x,y,z = getElementPosition ( p ) Cars [p] = createVehicle ( 535,x,y,z ) warpPedIntoVehicle(p,Cars [p]) outputChatBox('تم اعطائك السيارة!',p,255,0,0,true) end ) setTimer( function () for v in pairs( Cars ) do if isElement( Cars [v] ) then local R = math.random setVehicleColor( Cars [v],R(0,255),R(0,255),R(0,255)) else Cars [v] = nil end end end, 1000, 0) اسم الأمر Car
  8. يعني صراحه استغرب من ناس لما تشوف سيرفر مسوي المود تروح تنشر مثله يعني ماشاء الله أغلب سكرباتك مقلد الأفكار الواحد يصنع افكار جديده مو يقلد الناس ويسوي اضافات
  9. منتدى روعه والأروع الشخص اللي مؤسسه أتمنى لكم التطوير والتقدم دوما تحياتي
  10. function getPlayerAdminLevel(p) local data = getElementData(p,"acc.adminLevel") if not tonumber( data ) then return end return adminTitle[data][1] end
  11. Parameters = { {1337,"data","data"}, -- works {1338,"data1","data1"}, -- works {1339,"data2",'100'} -- doesn't work,duno why } objects = { {1337,23.15625,-5.677734375,3}, {1338,19.15625,-5.677734375,3}, {1339,15.15625,-5.677734375,3} } function spawnLoot() for i,k in ipairs(objects) do local obj local col local id = k[1] obj = createObject(k[1],k[2],k[3],k[4]) col = createColCuboid(k[2],k[3],k[4],1.6,1.6,1.6) if(obj) then -- if it exists then setElementData(col,"col",true) setElementData(obj,"loot",true) attachElements(col,obj,-0.7,-0.7,-0.5) setElementCollisionsEnabled(obj,false) end for index,key in ipairs(Parameters) do if id == key[1] then setElementData(obj,key[2],key[3]) outputChatBox("ID added") break end end end end addEventHandler ( "onResourceStart", getResourceRootElement(), spawnLoot) function onColEnter ( thePlayer ) if (isElement(thePlayer) and getElementType(thePlayer) == "player") then local item = getElementsWithinColShape (source, "object") if isElementWithinColShape (thePlayer,source) and getElementData(source,"col") == true then setElementData(thePlayer,"inLoot",true) outputChatBox('Enter ColShape') for i,k in ipairs(item) do local data for index,key in ipairs(Parameters) do data = getElementData(k,tostring(key[3])) if data then outputChatBox(tostring( data )) break end end end end end end addEventHandler ("onColShapeHit",resourceRoot, onColEnter) function onColLeave ( thePlayer ) if (isElement(thePlayer) and getElementType(thePlayer) == "player") then if getElementsWithinColShape ( source, "player" ) then setElementData(thePlayer,"inLoot",false) outputChatBox('Leave ColShape') end end end addEventHandler ("onColShapeLeave", resourceRoot, onColLeave)
  12. its work with me. whats the problem?
  13. Parameters = { {1337,"data","data"}, -- works {1338,"data1","data1"}, -- works {1339,"data2",100} -- doesn't work,duno why } objects = { {1337,23.15625,-5.677734375,3}, {1338,19.15625,-5.677734375,3}, {1339,15.15625,-5.677734375,3} } function spawnLoot() for i,k in ipairs(objects) do local obj local col local id = k[1] obj = createObject(k[1],k[2],k[3],k[4]) col = createColCuboid(k[2],k[3],k[4],1.6,1.6,1.6) if(obj) then -- if it exists then setElementData(col,"col",true) setElementData(obj,"loot",true) attachElements(col,obj,-0.7,-0.7,-0.5) setElementCollisionsEnabled(obj,false) end for index,key in ipairs(Parameters) do if id == key[1] then setElementData(obj,key[2],key[3]) outputChatBox("ID added") break end end end end addEventHandler ( "onResourceStart", getResourceRootElement(), spawnLoot) function onColEnter ( thePlayer ) if (isElement(thePlayer) and getElementType(thePlayer) == "player") then local item = getElementsWithinColShape (source, "object") if isElementWithinColShape (thePlayer,source) and getElementData(source,"col") == true then setElementData(thePlayer,"inLoot",true) outputChatBox('Enter ColShape') for i,k in ipairs(item) do local data for index,key in ipairs(Parameters) do data = getElementData(k,tostring(key[3])) if data ~= false then outputChatBox(tostring( data )) end end end end end end addEventHandler ("onColShapeHit",resourceRoot, onColEnter) function onColLeave ( thePlayer ) if (isElement(thePlayer) and getElementType(thePlayer) == "player") then if getElementsWithinColShape ( source, "player" ) then setElementData(thePlayer,"inLoot",false) outputChatBox('Leave ColShape') end end end addEventHandler ("onColShapeLeave", resourceRoot, onColLeave)
  14. Parameters = { {1337,"data","data"}, -- works {1338,"data1","data1"}, -- works {1339,"data2",100} -- doesn't work,duno why } objects = { {1337,23.15625,-5.677734375,3}, {1338,19.15625,-5.677734375,3}, {1339,15.15625,-5.677734375,3} } function spawnLoot() for i,k in ipairs(objects) do local obj local col local id = k[1] obj = createObject(k[1],k[2],k[3],k[4]) col = createColCuboid(k[2],k[3],k[4],1.6,1.6,1.6) if(obj) then -- if it exists then setElementData(col,"col",true) setElementData(obj,"loot",true) attachElements(col,obj,-0.7,-0.7,-0.5) setElementCollisionsEnabled(obj,false) end for index,key in ipairs(Parameters) do if id == key[1] then setElementData(obj,key[2],key[3]) outputChatBox("ID added") break end end end end addEventHandler ( "onResourceStart", getResourceRootElement(), spawnLoot)
  15. try with this Parameters = { {1337,"data","data"}, -- works {1338,"data1","data1"}, -- works {1339,"data2",100} -- doesn't work,duno why } function spawnLoot() for i,k in ipairs(objects) do local obj local col obj = createObject(k[1],k[2],k[3],k[4]) col = createColCuboid(k[2],k[3],k[4],1.6,1.6,1.6) if(obj) then -- if it exists then setElementData(col,"col",true) setElementData(obj,"loot",true) attachElements(col,obj,-0.7,-0.7,-0.5) setElementCollisionsEnabled(obj,false) end end local objects = getElementsByType ( "object",resourceRoot ) for i,loot in ipairs(objects) do if getElementData(loot,"loot") == true then for index,key in ipairs(Parameters) do if getElementModel(loot) == key[1] then setElementData(loot,key[2],key[3]) outputChatBox("ID added") break end end end end end addEventHandler ( "onResourceStart", getResourceRootElement(), spawnLoot)
  16. function spawnLoot() for i,k in ipairs(objects) do objects -- where is variable?
  17. x, y = guiGetScreenSize () function createGUI () local guiWidth, guiHeight = 500, 300 local centerX, centerY = (x / 2) - (guiWidth / 2), (y / 20) - (guiHeight / 20) myWindow = guiCreateWindow(centerX, centerY, 500, 300, "Information", false) end addEventHandler( "onClientResourceStart", getRootElement( ), createGUI)
  18. MR.S3D

    help

    when you use turfCol and create new with turfCol and fist one was nil example for your problem: s3d = nil -- variable s3d = 'hello' -- variable s3d = 'hi' -- variable outputChatBox(s3d) -- in chat : hi -- because the last one variable cancel all variables with same name... You must use tables.. and if you need destroyElement in your this resource only use: local allturfs = getElementsByType("radararea",resourceRoot) local allcols = getElementsByType("colshape",resourceRoot)
  19. اطرح كودك عشان نقدر نساعدك
×
×
  • Create New...