Jump to content

' A F .

Members
  • Posts

    2,156
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by ' A F .

  1. عندك اكثر من طريقة بذكرلك وحدة انك تسوي جدول فيه الحروف الانجليزية وتستخدم وظيفة string.find وتسوي تحقق اذا كان الرساله فيها حروف انجليزي او لأ
  2. لأ
  3. هذا حق @#x1AhMeD-09 addEvent "onPlayerMoneyChange" function onPreFunction(sourceResource, functionName, isAllowedByACL, luaFilename, luaLineNumber, ...) local args = {...} if functionName == "setPlayerMoney" or functionName == "takePlayerMoney" or functionName == "givePlayerMoney" and #args == 2 and isElement(args[1]) then triggerEvent("onPlayerMoneyChange", args[1], args[2]) end end addDebugHook("preFunction", onPreFunction) -- مثال addEventHandler("onPlayerMoneyChange", root, function(newMoney) outputChatBox(getPlayerName(source).."'s money changed to "..newMoney, root, 255, 0, 0, true) end )
  4. فيه شخص من الشباب مسويها شوف بموضوع الوظائف المُفيدة .
  5. فكرة حلوة وجديدة أهنيك أستمر .
  6. بخير يالله لك الحمد , اخبارك انت .
  7. موجود والله بس دخولي قليل @PaisoN^ سولف معنا انت كمان وش رايك ؟
  8. مسكين الي ماعنده احمد .
  9. كل عربي بهذا الموقع ..
  10. the useful function from wiki function dxDrawRoundedRectangle(x, y, rx, ry, color, radius) rx = rx - radius * 2 ry = ry - radius * 2 x = x + radius y = y + radius if (rx >= 0) and (ry >= 0) then dxDrawRectangle(x, y, rx, ry, color) dxDrawRectangle(x, y - radius, rx, radius, color) dxDrawRectangle(x, y + ry, rx, radius, color) dxDrawRectangle(x - radius, y, radius, ry, color) dxDrawRectangle(x + rx, y, radius, ry, color) dxDrawCircle(x, y, radius, 180, 270, color, color, 7) dxDrawCircle(x + rx, y, radius, 270, 360, color, color, 7) dxDrawCircle(x + rx, y + ry, radius, 0, 90, color, color, 7) dxDrawCircle(x, y + ry, radius, 90, 180, color, color, 7) end end example function isMouseInPosition ( x, y, width, height ) if ( not isCursorShowing( ) ) then return false end local sx, sy = guiGetScreenSize ( ) local cx, cy = getCursorPosition ( ) local cx, cy = ( cx * sx ), ( cy * sy ) if ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) then return true else return false end end function dxDrawRoundedRectangle(x, y, rx, ry, color, radius) rx = rx - radius * 2 ry = ry - radius * 2 x = x + radius y = y + radius if (rx >= 0) and (ry >= 0) then dxDrawRectangle(x, y, rx, ry, color) dxDrawRectangle(x, y - radius, rx, radius, color) dxDrawRectangle(x, y + ry, rx, radius, color) dxDrawRectangle(x - radius, y, radius, ry, color) dxDrawRectangle(x + rx, y, radius, ry, color) dxDrawCircle(x, y, radius, 180, 270, color, color, 7) dxDrawCircle(x + rx, y, radius, 270, 360, color, color, 7) dxDrawCircle(x + rx, y + ry, radius, 0, 90, color, color, 7) dxDrawCircle(x, y + ry, radius, 90, 180, color, color, 7) end end -- # example addEventHandler ( "onClientRender" , root , function ( ) local hover = isMouseInPosition ( 300 , 300 , 170 , 30 ) ; dxDrawRoundedRectangle(300,300,170,30, hover and tocolor(200,200,200,200) or tocolor(0,0,0,200), 10) dxDrawText("Button",300,300,470,330,hover and tocolor(0,0,0,200) or tocolor(255,255,255,200),1,'default-bold','center','center') end ) good luck
  11. بالتوفيق لك يـ أحمد , خذني معك
  12. الله يسلمك , حياك الله .
  13. GUIEditor = {staticimage = {}} ; addEventHandler("onClientResourceStart", resourceRoot,function() GUIEditor.staticimage[1] = guiCreateStaticImage(1191, 621, 185, 121, "tara.png", false) end ) ; addEventHandler ( "onClientRender", root, function ( ) if ( isElement ( GUIEditor.staticimage[1] ) and guiGetVisible ( GUIEditor.staticimage[1] ) ) then local tick = getTickCount()/1/1000 local alpha = math.abs(math.sin(-tick)) guiSetAlpha(GUIEditor.staticimage[1], alpha) end end ) ;
  14. addEvent ( "aResource", true ) addEventHandler ( "aResource", _root, function ( name, action ) if checkClient( "command."..action, source, 'aResource', action ) then return end local pname = getPlayerName ( source ) if ( hasObjectPermissionTo ( source, "command."..action ) ) then local text = "" if ( action == "start" ) then if ( startResource ( getResourceFromName ( name ), true ) ) then text = "started" end elseif ( action == "restart" ) then if ( restartResource ( getResourceFromName ( name ) ) ) then text = "restarted" end elseif ( action == "stop" ) then if ( stopResource ( getResourceFromName ( name ) ) ) then text = "stopped" end elseif ( action == "delete" ) then if ( deleteResource ( getResourceFromName ( name ) ) ) then text = "deleted" end elseif ( action == "stopall" ) then if ( stopAllResources ( ) ) then text = "All Stopped" end else action = nil end if ( text ~= "" ) then outputChatBox ( "ADMIN: Resource \'" .. name .. "\' " .. text .. " by " .. getAdminNameForLog ( source ) ) for id, player in ipairs(getElementsByType("player")) do triggerClientEvent ( player, "aClientLog", _root, text ) end end return true end outputChatBox ( "Access denied for '"..tostring ( action ).."'", source, 255, 168, 0 ) return false end )
  15. والله ماقد عدلت على لوحة الادمنية ولا سويت فيها شي بس اتوقع بملف admin_server أبحث عن startResource
  16. ماتقدر تطلع اسم اللاعب الي شغل المود الا انك تعدل على لوحة الادمنية .
  17. السورس على حسب الحدث الي تستخدمه على سبيل المثال : 'onPlayerJoin' -- السورس حقه اللاعب الي دخل 'onVehicleExplode' - - السورس هو السيارة الي انفجرت ولو مثلا تبي يوم اللاعب يخش وتطلع رسالة للكل حط root
  18. هل سيتم إفتتاح سيرفر باتل قراوند ام لا
  19. حط اسماء الصور ارقام مثلاً 1.png حط بدال 1 اللفل الي تبي يجيه الصورة اذا جابها وبدال png الصيغة ويوم تسوي dxDrawImage بس جيب اللفل حق الاعب وتضبط
  20. ---- # Server Side .. local Group = "Console" -- هنا إسم الرتبة الي تبيه يفتح لها .. addCommandHandler ( "HT" , function ( aPlayer ) if ( not isGuestAccount ( getPlayerAccount ( aPlayer ) ) ) then if ( isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(aPlayer)) , aclGetGroup ( Group ) ) ) then triggerClientEvent ( aPlayer , "openACLTab" , aPlayer ) ; outputChatBox ( "مرحباً بك" , aPlayer , 119 , 119 , 119 , true ) else outputChatBox( "لايمكنك تفتح الاسل" , aPlayer , 255 , 0 , 0 , true ) ; end else outputChatBox ( "سجل دخولك اولاً !",aPlayer,255,0,0,true) end end ) ; ---- # Client Side addEvent ( "openACLTab" , true ) ; addEventHandler ( "openACLTab" , root , function ( ) guiSetEnabled(aTab2.ManageACL,true) end ) ; الكود الاول بملف سيرفر والثاني بملف كلينت .
  21. الله يرحمه , حتى لو مات وش بيطلع بيدك غير الدعاء ؟ كلنا رايحين بذا الطريق , أسئل الله حسن الخاتمة ..
  22. isPedDucked بالنسبة للتايمر مافهمت وش بتسوي فيه
×
×
  • Create New...