King12
Members-
Posts
439 -
Joined
-
Last visited
-
Days Won
1
Everything posted by King12
-
آخر سؤال يا فيس بوك , كيف آخلي لما اللاعب يضغط ع الصوره يفتح له ويندو DxDrawImageSection ^ آو dxDrawImage
-
المفروض ان التايمر اللي معطينك آياه الشباب يضبط لآنه حنا مسوين حدث آذا اللاعب مات بعدين سوينا له تايمر عالعموم جرب كذا Client side addEventHandler ( "onClientGUIClick", guiRoot, function ( ) if ( source == GUIEditor.button[1] ) then guiSetVisible(GUIEditor.window[1], false) showCursor(false) elseif ( source == GUIEditor.button[2] ) then setElementData( localPlayer, "teleport1", true) elseif ( source == GUIEditor.button[3]) then setElementData( localPlayer, "teleport2", true) end end ) addEventHandler("onClientPlayerWasted", localPlayer, function () if getElementData(localPlayer, "teleport1", true) then setTimer(function () triggerServerEvent("spawnplayer1", localPlayer) guiSetVisible(GUIEditor.window[1], false) showCursor(false) setElementData ( localPlayer, "teleport1", false) end, 3000, 1) elseif getElementData(localPlayer, "teleport2", true) then setTimer(function () triggerServerEvent("spawnplayer2", localPlayer) guiSetVisible(GUIEditor.window[1], false) showCursor(false) setElementData ( localPlayer, "teleport2", false) end, 3000, 1) else return end end ) Server side addEvent("spawnplayer1", true) addEventHandler("spawnplayer1", root, function () spawnPlayer(source, 297.23212,191.4963,1007.17188) setElementRotation(source, 0,0,91.98) setElementInterior ( source, 3 ) setElementDimension ( source, 0 ) end ) addEvent("spawnplayer2", true) addEventHandler("spawnplayer2", root, function () spawnPlayer(source, -1615.38806,684.90344,7.18750) setElementRotation(source, 0,0,91.98) end )
-
لا عادي يالغالي ,, فيس بوك شلون آستخدم الركتانقل https://wiki.multitheftauto.com/wiki/DxDrawRectangle سويه بالـ Guieditor تلاقيه ب قائمة الـ Dx طيب بخلي عليه صوره كيف؟
-
لا عادي يالغالي ,, فيس بوك شلون آستخدم الركتانقل https://wiki.multitheftauto.com/wiki/DxDrawRectangle
-
then نآقص elseif getElementData(localPlayer, "teleport2", true) يعطيك العافيه ما انتبهت لها ياراعي الموضوع جرب هذا لو بفلوس Client side addEventHandler ( "onClientGUIClick", guiRoot, function ( ) if ( source == GUIEditor.button[1] ) then guiSetVisible(GUIEditor.window[1], false) showCursor(false) elseif ( source == GUIEditor.button[2] ) then setElementData( localPlayer, "teleport1", true) elseif ( source == GUIEditor.button[3]) then setElementData( localPlayer, "teleport2", true) end end ) addEventHandler("onClientPlayerWasted", localPlayer, function () if getElementData(localPlayer, "teleport1", true) then triggerServerEvent("spawnplayer1", localPlayer) guiSetVisible(GUIEditor.window[1], false) showCursor(false) setElementData ( localPlayer, "teleport1", false) elseif getElementData(localPlayer, "teleport2", true) then triggerServerEvent("spawnplayer2", localPlayer) guiSetVisible(GUIEditor.window[1], false) showCursor(false) setElementData ( localPlayer, "teleport2", false) else return end end ) Server side addEvent("spawnplayer1", true) addEventHandler("spawnplayer1", root, function () spawnPlayer(source, 297.23212,191.4963,1007.17188) setElementRotation(source, 0,0,91.98) setElementInterior ( source, 3 ) setElementDimension ( source, 0 ) end ) addEvent("spawnplayer2", true) addEventHandler("spawnplayer2", root, function () spawnPlayer(source, -1615.38806,684.90344,7.18750) setElementRotation(source, 0,0,91.98) end )
-
What's the difference between convertNumber and tonumber? an example for tonumber : https://wiki.multitheftauto.com/wiki/SetPlayerMoney
-
شلون آسوي جدول لفنكشنات ماهي باللعبه آصلن
-
آغلآط كثير منهآ if getElementData ( localPlayer, "teleport1", true) then آلمفروض يكون كذآ if getElementData ( localPlayer, "teleport1") then لآنك آنت تجيب آلدآتا var getElementData ( element theElement, string key [, inherit = true] ) وليس تحطهآ setElementInterior ( element, 3 ) setElementDimension ( element, 0 ) guiSetVisible(GUIEditor.window[1], false) showCursor(false) من وين جبت آلمنت حط سورس + ليه تزيل آللوحة آصلآ هي مخفية + آلمفروض تحط آلديم وآلآنت في آلسيرفر مع آلسبآون بآلتوفيق رد زاحف يكفي , والثانيه كنت معرفها بس عدلتها عقب وخليتها كلها بالسيرفر سايد وانت مقتبس ردي قبل ما اعدلها لآكن كيف يكون معه سيآرهـ وهو ميت شيك ع الكود اللي مسويه راعي الموضوع عموماً آنا شلته وسويت اللي فوق ^
-
كلامك لخبطني بس آضن تبيه كذا Client side addEventHandler ( "onClientGUIClick", guiRoot, function ( ) if ( source == GUIEditor.button[1] ) then guiSetVisible(GUIEditor.window[1], false) showCursor(false) elseif ( source == GUIEditor.button[2] ) then setElementData( localPlayer, "teleport1", true) elseif ( source == GUIEditor.button[3]) then setElementData( localPlayer, "teleport2", true) end end ) addEventHandler("onClientPlayerWasted", localPlayer, function () if getElementData(localPlayer, "teleport1", true) then triggerServerEvent("spawnplayer1", localPlayer) guiSetVisible(GUIEditor.window[1], false) showCursor(false) setElementData ( localPlayer, "teleport1", false) elseif getElementData(localPlayer, "teleport2", true) triggerServerEvent("spawnplayer2", localPlayer) guiSetVisible(GUIEditor.window[1], false) showCursor(false) setElementData ( localPlayer, "teleport2", false) else return end end ) Server side addEvent("spawnplayer1", true) addEventHandler("spawnplayer1", root, function () spawnPlayer(source, 297.23212,191.4963,1007.17188) setElementRotation(source, 0,0,91.98) setElementInterior ( source, 3 ) setElementDimension ( source, 0 ) end ) addEvent("spawnplayer2", true) addEventHandler("spawnplayer2", root, function () spawnPlayer(source, -1615.38806,684.90344,7.18750) setElementRotation(source, 0,0,91.98) end ) ماجربت السكربت ^
-
كنت مسوي dxDestroyElement(userpanel) فغيرتها لـ Elements لأن بالسكربت هو يقول هذا للفنكشنات علشان كذا سويته. سويت طريقتك يا كنق-هوهو بس ماصار شي باقي تطلع اللوحه يوم آستخدمت dxDestroyElement(userpanel) طلع لي الخطأ هذا بالديبوق يوم اضغط اف1 مره ثانيه علشان اسكرها ERROR: SDT_GUI\dxGui.lua:27: attempt to call global 'wasEventCanceled' (a nil value) ERROR: dxtest\client.lua:10: call failed to call 'SDT_GUI:dxDestroyElement' الكود function dxDestroyElement(dxElement) if (isElement(dxElement)) then triggerEvent("onClientDXDestroy",dxElement) if not (wasEventCanceled()) then -- السطر اللي فيه خطأ رقم 27 destroyElement(dxElement) return true; end end return false; end bindKey("F1","down", function() if toggeled then toggeled = false showCursor ( false ) -- removeEventHandler("onClientRender",getRootElement(), dx) exports.SDT_GUI:dxDestroyElement(menu) -- سطر 10 else toggeled = true end end)
-
آنا آستخدم السكربت هذا https://community.multitheftauto.com/index.php?p= ... ls&id=4871 آخر نسخه اللي بالوصف بس قهرني عجزت آسوي دستروي للدي اكس والآشياء الثانيه الكود حقي : bindKey("F1","down", function() if toggeled then toggeled = false showCursor ( false ) exports.SDT_GUI:dxDestroyElements(dx) else toggeled = true end end) function dx() if toggeled then userpanel = exports.SDT_GUI:dxCreateStaticImage(1750,0,180,1080,"images/background.png",0,parent) end end addEventHandler("onClientRender",getRootElement(), dx) النافذه تطلع وانا مسوي قبلها ازرار على طول النافذه تغطي على الآزرار
-
try to use this event https://wiki.multitheftauto.com/wiki/OnClientPlayerWeaponFire ^ don't know if this works with night goggles + set distance again, if it's not working then it might be a bug.
-
Because there is no an event called "onClientLogin", it's onPlayerLogin : https://wiki.multitheftauto.com/wiki/OnPlayerLogin
-
Hello there, I'm just wondering is it possible to make commands via your voice? like : the player talking from his microphone "opengui" then the gui will open.
-
local gate1 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate2 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate3 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate4 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate5 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate6 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate7 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate8 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate9 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate10 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate11 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate12 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate13 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate14 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate15 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate16 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate17 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate18 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate19 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate20 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate21 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate22 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate23 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate24 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate25 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate26 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate27 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate28 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate29 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate30 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate31 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate32 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate33 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate34 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate35 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate36 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate37 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate38 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate39 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate40 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate41 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate42 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate43 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate44 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate45 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate46 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate47 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate48 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate49 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate50 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate51 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate52 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate53 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) local gate54 = createObject (3437, 4905, -1600, 1999.0649414063, 0, 90, 90) addEventHandler("onClientResourceStart", root, function () moveObject(gate1, 4500, 4880, -1619.2002, 2005.45, 0, 0, 90 ) moveObject(gate2, 4500, 4880, -1619.2002, 2005.45, 0, 0, 90 ) moveObject(gate3, 4500, 4880, -1580.8, 2005.45, 0, 0, 90 ) moveObject(gate4, 4500, 4905, -1580.7998, 2005.45, 0, 0, 90 ) moveObject(gate5, 4500, 4930, -1580.80005, 2005.44995, 0, 0, 90 ) moveObject(gate6, 4500, 4955, -1580.80005, 2005.44995, 0, 0, 90 ) moveObject(gate7, 4500, 4980, -1580.80005, 2005.44995, 0, 0, 90 ) moveObject(gate8, 4500, 5005, -1580.80005, 2005.44995, 0, 0, 90 ) moveObject(gate9, 4500, 5030, -1580.80005, 2005.44995, 0, 0, 90 ) moveObject(gate10, 4500, 5055, -1580.7998, 2005.45, 0, 0, 90 ) moveObject(gate11, 4500, 5080, -1580.80005, 2005.44995, 0, 0, 90 ) moveObject(gate12, 4500, 4930, -1619.19995, 2005.44995, 0, 0, 90 ) moveObject(gate13, 4500, 4955, -1619.19995, 2005.44995, 0, 0, 90 ) moveObject(gate14, 4500, 4980, -1619.19995, 2005.44995, 0, 0, 90 ) moveObject(gate15, 4500, 5005, -1619.19995, 2005.44995, 0, 0, 90 ) moveObject(gate16, 4500, 5030, -1619.19995, 2005.44995, 0, 0, 90 ) moveObject(gate17, 4500, 5055, -1619.19995, 2005.44995, 0, 0, 90 ) moveObject(gate18, 4500, 5080, -1619.2, 2005.45, 0, 0, 90 ) moveObject(gate19, 4500, 4905, -1612.5, 1999.0649, 0, 90, 90 ) moveObject(gate20, 4500, 4905, -1587.5, 1999.0649, 0, 90, 90 ) moveObject(gate21, 4500, 4880, -1587.5, 1999.0649, 0, 90, 90 ) moveObject(gate22, 4500, 4880, -1587.5, 2011.0081, 0, 90, 90 ) moveObject(gate23, 4500, 4880, -1612.5, 2011.0081, 0, 90, 90 ) moveObject(gate24, 4500, 4880, -1612.5, 1999.0649, 0, 90, 90 ) moveObject(gate25, 4500, 4905, -1587.5, 2011.0081, 0, 90, 90 ) moveObject(gate26, 4500, 4905, -1612.5, 2011.0081, 0, 90, 90 ) moveObject(gate27, 4500, 4930, -1587.5, 2011.00806, 0, 90, 90 ) moveObject(gate28, 4500, 4955, -1587.5, 2011.00806, 0, 90, 90 ) moveObject(gate29, 4500, 4980, -1587.5, 2011.00806, 0, 90, 90 ) moveObject(gate30, 4500, 5005, -1587.5, 2011.00806, 0, 90, 90 ) moveObject(gate31, 4500, 5030, -1587.5, 2011.00806, 0, 90, 90 ) moveObject(gate32, 4500, 5055, -1587.5, 2011.00806, 0, 90, 90 ) moveObject(gate33, 4500, 5080, -1587.5, 2011.00806, 0, 90, 90 ) moveObject(gate34, 4500, 4930, -1612.5, 2011.00806, 0, 90, 90 ) moveObject(gate35, 4500, 4955, -1612.5, 2011.00806, 0, 90, 90 ) moveObject(gate36, 4500, 4980, -1612.5, 2011.00806, 0, 90, 90 ) moveObject(gate37, 4500, 5005, -1612.5, 2011.00806, 0, 90, 90 ) moveObject(gate38, 4500, 5030, -1612.5, 2011.00806, 0, 90, 90 ) moveObject(gate39, 4500, 5055, -1612.5, 2011.00806, 0, 90, 90 ) moveObject(gate40, 4500, 5080, -1612.5, 2011.00806, 0, 90, 90 ) moveObject(gate41, 4500, 4930, -1587.5, 1999.06494, 0, 90, 90 ) moveObject(gate42, 4500, 4955, -1587.5, 1999.06494, 0, 90, 90 ) moveObject(gate43, 4500, 4980, -1587.5, 1999.06494, 0, 90, 90 ) moveObject(gate44, 4500, 5005, -1587.5, 1999.06494, 0, 90, 90 ) moveObject(gate45, 4500, 5030, -1587.5, 1999.06494, 0, 90, 90 ) moveObject(gate46, 4500, 5055, -1587.5, 1999.06494, 0, 90, 90 ) moveObject(gate47, 4500, 5080, -1587.5, 1999.06494, 0, 90, 90 ) moveObject(gate48, 4500, 4930, -1612.5, 1999.06494, 0, 90, 90 ) moveObject(gate49, 4500, 4955, -1612.5, 1999.06494, 0, 90, 90 ) moveObject(gate50, 4500, 4980, -1612.5, 1999.06494, 0, 90, 90 ) moveObject(gate51, 4500, 5005, -1612.5, 1999.06494, 0, 90, 90 ) moveObject(gate52, 4500, 5030, -1612.5, 1999.06494, 0, 90, 90 ) moveObject(gate53, 4500, 5055, -1612.5, 1999.06494, 0, 90, 90 ) moveObject(gate54, 4500, 5080, -1612.5, 1999.06494, 0, 90, 90 ) end )
-
Why would you check if the player's health is over 0 in the armor's function?
-
Try this https://wiki.multitheftauto.com/wiki/RemoveWorldModel "onPlayerJoin" or "onResourceClientStart"
-
local largura = 220 local altura = 250 -------- local Tlargura = 0.785 local Taltura = 0.200 local health = math.ceil(getElementHealth(localPlayer)) if health > 0 then return elseif health <= 5 then dxDrawImage(x*Tlargura, y*Taltura, largura, altura, "health/05.png" ) elseif health <= 10 then dxDrawImage(x*Tlargura, y*Taltura, largura, altura, "health/10.png" ) elseif health <= 15 then dxDrawImage(x*Tlargura, y*Taltura, largura, altura, "health/15.png" ) elseif health <= 20 then dxDrawImage(x*Tlargura, y*Taltura, largura, altura, "health/20.png" ) elseif health <= 25 then dxDrawImage(x*Tlargura, y*Taltura, largura, altura, "health/25.png" ) elseif health <= 30 then dxDrawImage(x*Tlargura, y*Taltura, largura, altura, "health/30.png" ) elseif health <= 35 then dxDrawImage(x*Tlargura, y*Taltura, largura, altura, "health/35.png" ) elseif health <= 40 then dxDrawImage(x*Tlargura, y*Taltura, largura, altura, "health/40.png" ) elseif health <= 45 then dxDrawImage(x*Tlargura, y*Taltura, largura, altura, "health/45.png" ) elseif health <= 50 then dxDrawImage(x*Tlargura, y*Taltura, largura, altura, "health/50.png" ) elseif health <= 55 then dxDrawImage(x*Tlargura, y*Taltura, largura, altura, "health/55.png" ) elseif health <= 60 then dxDrawImage(x*Tlargura, y*Taltura, largura, altura, "health/60.png" ) elseif health <= 65 then dxDrawImage(x*Tlargura, y*Taltura, largura, altura, "health/65.png" ) elseif health <= 70 then dxDrawImage(x*Tlargura, y*Taltura, largura, altura, "health/70.png" ) elseif health <= 75 then dxDrawImage(x*Tlargura, y*Taltura, largura, altura, "health/75.png" ) elseif health <= 80 then dxDrawImage(x*Tlargura, y*Taltura, largura, altura, "health/80.png" ) elseif health <= 85 then dxDrawImage(x*Tlargura, y*Taltura, largura, altura, "health/85.png" ) elseif health <= 90 then dxDrawImage(x*Tlargura, y*Taltura, largura, altura, "health/90.png" ) elseif health <= 95 then dxDrawImage(x*Tlargura, y*Taltura, largura, altura, "health/95.png" ) elseif health <= 100 then dxDrawImage(x*Tlargura, y*Taltura, largura, altura, "health/100.png" ) end not sure
-
+ triggerServerEvent and the takePlayerMoney function should be in server-side because : Note: Using this function client side (not recommended) will not change a players money server side.
-
its exactly that line,both resources are running and always gives that error IIYAMA, i really dont know how could you miss my DEBUGSCRIPT 3 LINE on my FIRST POST in this topic obviously i know how to use it. why to script if scripting basics aren't learned? anyway i dont need a script to check if a resource is running because simply i have already checked that long time ago and this thing still does not work.. Are you sure that your code isn't mixed with any server-side functions? and you definite your script in meta as a client-side? And you're using the function in a client-side script? and at last, try this tutorial : https://forum.multitheftauto.com/viewtopic.php?f=148&t=46167
-
anyone?!
-
والله يالخوي تقول ناقصني بس الكود يشتغل زي العسل انا استخدمت الداتا لآني زي ماقلت لك مافكرت بال isElement
