Jump to content

Trefeor

Members
  • Posts

    270
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by Trefeor

  1. جرب هذا -- # Server executeSQLQuery( "CREATE TABLE IF NOT EXISTS `Texts` ( theText , x , y , z )" ) function refreshTexts ( ) local query = executeSQLQuery ( "SELECT * FROM `Texts`" ) if ( query and type ( query ) == "table" and #query > 0 ) then triggerClientEvent ( root , "addtext" , root , query ) end end addEventHandler ( "onResourceStart" , resourceRoot , function ( ) refreshTexts ( ) end ) function globalMessage(the, cmd, ...) local message = table.concat ( { ... }, " " ) local name = getPlayerName(the) local acc = getPlayerAccount ( the ) local x, y, z = getElementPosition(the) executeSQLQuery ( "INSERT INTO `Texts` ( theText , x , y , z ) VALUES ( ? , ? , ? , ? )" , message , x , y , z ) refreshTexts ( ) end addCommandHandler("text", globalMessage) -- كلنت addEvent ( 'addtext' , true ) addEventHandler ( 'addtext' , root ,function( query ) for k,v in ipairs ( query ) do add3DText(v.x,v.y,v.z,v.theText,255,255,0) end end )
  2. العفو حياك الله
  3. 'onClientPlayerDamage' isElement getElementType getPlayerTeam getTeamFromName getElementData cancelEvent
  4. dxDrawRectangle(x,y,w,h) x,y,w,h = هذي الاحداثيات
  5. اجل لازم تحط احداثيات الدي اكس على كل الشاشات
  6. addEventHandler ( "onClientPlayerDamage" , root , function ( attacker ) if ( isElement ( attacker ) and getElementType ( attacker ) == "ped" and getElementData ( attacker , "zombie" ) ) then return end cancelEvent ( ) end ) حط هذا الكود بجانب الكلاينت كذا اللاعب م يتأثر الا من الزومبي
  7. Trefeor

    مساعدة

    جرب هذا --- # Client local Text = "" local sX,sY = guiGetScreenSize ( ) function renderText ( ) dxDrawText ( Text , 0 , 0 , sX , sY , tocolor(255,255,255,255),1.2,"default-bold","center","center",true, true, false, true, false) end addEvent ( "setDxText" , true ) addEventHandler ( "setDxText" , root , function (te) if ( isTimer ( timer ) ) then killTimer ( timer ) removeEventHandler("onClientRender",root,renderText) end Text = te addEventHandler ( "onClientRender",root,renderText) timer = setTimer ( function ( ) removeEventHandler("onClientRender",root,renderText) Text = "" end,5000,1) end ) ; --- # Server function shout ( player, cmd, ... ) local accountname = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" ) ) then local message = table.concat ( { ... }," " ) triggerClientEvent ( root , "setDxText" , root , message ) else outputChatBox ( "You cannot use this command!", player, 255, 12, 15 ) end end addCommandHandler ( "shoutall", shout )
  8. https://forum.multitheftauto.com/forum/96-arabic-العربية/
  9. Trefeor

    مساعدة

    انت خالط اكواد سيرفر مع كلنت لو حاب تسويها ب dxDrawText إستخدم الترايقر triggerClientEvent
  10. onClientPlayerDamage getElementData or getElementType -- عشان تتحقق ان الاتاك بيد او تتحقق انه داتا زومبي الي يعجبك cancelEvent -- عشان تكنسل الحدث انت ماخذ القسم طلبات مودات , هنا تطلب وظائف ماتعرفها او نساعدك باخطائك مو نسوي لك الله يهديك
  11. الا اتوقع تقدر triggerEvent
  12. mtasa://178.32.127.216:22003 ip = 178.32.127.216 port = 22003 الله يهديك الموضوع مره قديم
  13. بالنسبة لـ النقطة حقت يوم تتغير داتا يغيرالفلوس يستخدم onElementDataChange احسن له واسهل له
  14. العفو , أهلا وسهلاً .
  15. addEventHandler("onClientRender", root, function() local level = getElementData(localPlayer, "level") or 1 local xp = getElementData(localPlayer, "xp") or 0 if level and xp then dxDrawLine(40 - 1, 827 - 1, 40 - 1, 854, tocolor(1, 251, 236, 255), 1, false) dxDrawLine(249, 827 - 1, 40 - 1, 827 - 1, tocolor(1, 251, 236, 255), 1, false) dxDrawLine(40 - 1, 854, 249, 854, tocolor(1, 251, 236, 255), 1, false) dxDrawLine(249, 854, 249, 827 - 1, tocolor(1, 251, 236, 255), 1, false) local precentage = ((xp/level)*100)*100 if precentage >= 100 then precentage = 0 end local bar = precentage*2.75 dxDrawRectangle(40, 827, 209, 27, tocolor(127, 126, 126, 255), false) dxDrawText(" Level: "..level.." - XP : "..xp.." / "..(level*100), 45, 832, 239, 850, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) end end ) جرب هذا لو م زبط تاكد من الاحداثيات حقت المستطيل :]
  16. كيف ماتزبط ؟ ذذ لو سواها صح راح تجي اكيد
  17. @EH10 مو مشكلة تعوضها بالجايات إن شاء الله , تسلم @#SnpêŘ تسلم , حياك الله .
  18. isMouseInPosition -- useful getKeyState getCursorPosition وتسوي حسابات وتحدث المتغير حق السكرول
  19. addEventHandler ( "onClientGUIClick", resourceRoot , function ( ) if ( source == start ) then triggerServerEvent ( "StartSound" , localPlayer ) end end ) addEvent ( "playSound_" , true ) addEventHandler ( "playSound_" , root , function ( ) if ( isElement ( sound ) ) then destroyElement ( sound ) end sound = playSound ( "sh.mp3" ) end ) --- Server addEvent ( "StartSound" , true ) addEventHandler ( "StartSound" , root , function ( ) triggerClientEvent (root,"playSound_",root) end )
  20. تسلم , ايوة يتغير السعر , اجمعين يارب
×
×
  • Create New...