Jump to content

#DRAGON!FIRE

Members
  • Posts

    4,429
  • Joined

  • Last visited

Everything posted by #DRAGON!FIRE

  1. addEventHandler("onClientGUIClick", resourceRoot, function ( ) if ( source == car ) then triggerServerEvent ( "createVehicleForPlayer", localPlayer ) end end ) local Dead = {}; local ID = 411 addEvent ( "createVehicleForPlayer", true ) addEventHandler("createVehicleForPlayer",root, function ( ) if Dead[source] then if isElement ( Dead[source] ) then destroyElement ( Dead[source] ) end end local x, y, z = getElementPosition ( source ) Dead[source] = createVehicle( ID, x + 3, y, z ) if ( Dead[source] ) then warpPedIntoVehicle ( source, Dead[source] ) outputChatBox("* [ تم اعطائك موتر ] .",source,math.random ( 150, 255 ),255,math.random ( 222, 255 ),true) end end ) addEventHandler ( "onPlayerQuit", root, function ( ) if Dead[source] then if isElement ( Dead[source] ) then destroyElement ( Dead[source] ) end Dead[source] = nil end end ) addEventHandler ( "onVehicleExplode", resourceRoot, function ( ) destroyElement ( source ) end )
  2. صراحة ما فهمت ! تبي تسوي kills and deaths ?
  3. الكود كلنت وما ينفع تحطه سيرفر الكود اعتقد انه سليم .. شيك ع الديبوق في اي اخطاء .
  4. الكود فيه تخبيص ما فهمته وش ذا a1, a2, a3 .... ? وممكن تفهمني اكثر وش بتسوي .. يعني اللي يكتبه بالاديت ينحفظ ويجي باللستة ؟
  5. ما تحتاج شادر ! posY = لا تغير فيه اي شي imgH = اللي هي 80 اللي هي طول الصورة moveSpeed = اللي هي 10 وهي سرعة التحرك . local sX, sY = guiGetScreenSize ( ) local posY, imgH, moveSpeed = 0, 80, 10 function moveing_image ( ) if not ( posY > (sY+imgH) ) then posY = posY+moveSpeed else posY = 0 end dxDrawImage( sX/2, posY, 100, imgH, "imgName.png", 0, 0, 0, tocolor ( 255, 255, 255, 255 ) ) end addEventHandler ( "onClientRender", root, moveing_image )
  6. الكود مو صحيح ابدا ! .. ممكن توضح وش هدفكـ من الشادر ؟
  7. This function is the same as triggerClientEvent except the transmission rate of the data contained in the arguments can be limited and other network traffic is not blocked while the data is being transferred. المقصود من هالكلام انه نفس التريقر العادي .. اللهم انه هذا التريقر ما راح يتاثر بمشاكل الاتصال بشكل عام وراح وزي ما قال فوق انه ممكن تكون الاشياء اللي ترسلها مع التريقر محدودة يعني مو زي التريقر العادي يرسل المعلومات كاملة لا هذا ممكن يجزئها ويرسلها ! طبعا تحتاجه مثلأ انكـ تحمل ملف معين للاعب او غير ذلك .
  8. كيف ما ضبط وانت الالفا بسطر انشاء الماركر حاطه 0 اصلأ ! ؟
  9. local theMarker = createMarker(0, 0, 0, "cylinder", 5, 255, 255, 255, 200) addEventHandler ( "onMarkerHit", resourceRoot, function ( player ) if ( source == theMarker ) then if ( getElementType ( player ) == "player" ) then local randomMoney = math.random(50000, 70000) givePlayerMoney ( player, randomMoney ) setElementData ( player, "PlayerScoreMission", (getElementData(player, "PlayerScoreMission") or 0) + 1 ) end end end )
  10. ايش الفكرهـ بالضبط .
  11. اكبر خطا تسويه انك تستخدم كود مو لكـ .. وهالكود اللي فوق كله مخبص ابدا كود من صناعتكـ وبساعدك فيه .
  12. الكود اللي طرحته فوق انساهـ .. سوي كود من نفسكـ وبساعدك !
  13. function dxRender ( ) -- dx stuff end function OnHitOrLeave ( e_ ) if ( e_ == localPlayer and not getPedOccupiedVehicle ( e_ ) ) then if ( eventName == "onClientMarkerHit" ) then addEventHandler ( "onClientRender", root, dxRender ) else removeEventHandler ( "onClientRender", root, dxRender ) end end end addEventHandler ( "onClientMarkerHit", resourceRoot, OnHitOrLeave ) addEventHandler ( "onClientMarkerLeave", resourceRoot, OnHitOrLeave )
  14. string.find مدام انكـ مستخدم اتوقع انه المفروض يرد عليكـ .
  15. que = { ['السلام عليكم'] = 'وعليكم السلام', } addEventHandler ( "onPlayerChat",root, function(msg,type) if type == 0 then for k,v in pairs( que ) do if string.find(string.lower(msg),string.lower(k)) then outputChatBox ( v, source, 0,0,0,true ) break end end end end )
  16. اول وحدة هي الصحيحة لان اساسا لمن تسوي انسيرت راح تجي بالشكل ذا مثلأ Themover: msg ... ZA7F: msg ... NoName: msg ...
  17. تحققك كذا ما ينفع يا عزيزي لان ما سويت تحقق اذا مختار شي او لأ اصلأ ! .. اعتقد ان صاحب الموضوع انحلت المشكلة معاهـ خلاص
  18. صراحة ما فهمت ممكن توضح فكرتكـ اكثر .. لا تنسى هذا مو مجرد كود هذا سكربت كامل !
  19. روح كمل بموضوع الشكوى حقك الله يهديك
  20. Event: "onClientGUIClick" function isEventHandlerAdded( sEventName, pElementAttachedTo, func ) if type( sEventName ) == 'string' and isElement( pElementAttachedTo ) and type( func ) == 'function' then local aAttachedFunctions = getEventHandlers( sEventName, pElementAttachedTo ) if type( aAttachedFunctions ) == 'table' and #aAttachedFunctions > 0 then for i, v in ipairs( aAttachedFunctions ) do if v == func then return true end end end end return false end isEventHandlerAdded addEventHandler removeEventHandler -- Rendering getCameraMatrix getElementPosition getDistanceBetweenPoints3D getScreenFromWorldPosition ممكن تستفيد من هذا الكود .. : --\\\\\\\\\\\\\\\\\\\\\\\\\\ --// Setting local g_screenX, g_screenY = guiGetScreenSize(); local gScale = 0.3; local gAlphaDistance = 25; local gMaxDistance = 50; -- Max Distance local gTextAlpha = 120; local gTextSize = 1; local gAlphaDiff = gMaxDistance - gAlphaDistance; gScale = 1 / gScale * 800 / g_screenY; local gMaxScaleCurve = { { 0, 0 }, { 3, 3 }, { 13, 5 } }; local gTextScaleCurve = { { 0, 0.8 }, { 0.8, 1.2 }, { 99, 99 } }; local gTextAlphaCurve = { { 0, 0 }, { 25, 100 }, { 120, 190 }, { 255, 190 } }; local marker = createMarker( ... ); -- كمل الارقمنت النآقصه addEventHandler ( 'onClientRender', root, function ( ) local x, y, z = getCameraMatrix( ); local x1, y1, z1 = getElementPosition ( marker ); local distance = getDistanceBetweenPoints3D( x, y, z, x1, y1, z1 ); if distance <= gMaxDistance then local x1_, y1_ = getScreenFromWorldPosition( x1, y1, z1 + 0.95, 0.06 ); if x1_ and y1_ then local scale = 1 / ( gScale * ( distance / gMaxDistance ) ); local alpha = ( ( distance - gAlphaDistance ) / gAlphaDiff ); alpha = ( alpha < 0 ) and gTextAlpha or gTextAlpha - ( alpha * gTextAlpha ); scale = math.evalCurve( gMaxScaleCurve, scale ); local textscale = math.evalCurve( gTextScaleCurve, scale ); local textalpha = math.evalCurve( gTextAlphaCurve, alpha ); dxDrawText( "#FFFF00The Text Here", x1_, y1_, x1_, y1_, tocolor ( 255, 255, 255, textalpha ), textscale * gTextSize, "arial", "center", "bottom", false, false, false, true ); end end end ); -- ////////////////////////////////// -- // MATH FUNCTIONS // -- ////////////////////////////////// function math.evalCurve( curve, input ) if input < curve[ 1 ][ 1 ] then return curve[ 1 ][ 2 ]; end for idx = 2, #curve do if input < curve[ idx ][ 1 ] then local x1 = curve[ idx - 1 ][ 1 ]; local y1 = curve[ idx - 1 ][ 2 ]; local x2 = curve[ idx ][ 1 ]; local y2 = curve[ idx ][ 2 ]; local alpha = ( input - x1 ) / ( x2 - x1 ); return math.lerp( y1, y2, alpha ); end end return curve[ #curve ][ 2 ]; end function math.lerp( from, to, alpha ) return from + ( to-from ) * alpha; end
  21. وعليكم السلام تقصد لو ضغط ع الزر يحط التاق هذا فوق راس اللاعب اللي ضغط ؟ ولو ضغط مرهـ ثانية يشيله ؟
  22. يب نسيت احط الشرطة الله يعافيك ^
  23. جرب كذا .. : local section_ = "" addEventHandler ( "onClientGUIDoubleClick", resourceRoot, function ( ) if ( source == GridList ) then local Selectort = guiGridListGetSelectedItem ( source ) if ( Selectort ~= -1 ) then if ( guiGridListGetItemText ( source, Selectort, 1 ) == "..." ) then RefreshGridList ( ) section_ = "" else if ( section_ == "" ) then local Text = guiGridListGetItemText ( source, Selectort , 1 ) guiGridListClear ( source ) guiGridListSetItemText ( source, guiGridListAddRow ( source ) , 1 , "..." , false, false ) for index,v in pairs ( Teleporting[Text] ) do Row = guiGridListAddRow ( source ) guiGridListSetItemText ( source, Row , 1 , index , false , false ) end section_ = Text else local p_ = guiGridListGetItemText ( source, Selectort , 1 ) local PosTable = Teleporting[section_][p] setElementPosition ( localPlayer, unpack(PosTable) ) end end end end end )
×
×
  • Create New...