Jump to content

-Ilker.

Members
  • Posts

    143
  • Joined

  • Last visited

Everything posted by -Ilker.

  1. You're welcome ? You're welcome ?
  2. اي هذي الفكرة حلوة كمان
  3. انت زيد ونقص بالإحداثيات لين ماتمشي معك
  4. function RGBToHex(red, green, blue) if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255)) then return nil end return string.format("#%.2X%.2X%.2X", red, green, blue) end addEventHandler ( "onPlayerChat" , root , function ( Msg , Type ) if ( Type == 0 ) then Hex = RGBToHex ( unpack({ getPlayerNametagColor ( source ) }) ) ; if ( isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Console") ) ) then outputChatBox('#FF0000* #A8A8A8[ Console ] '..Hex..' '..getPlayerName(source)..'#FF6100: '..Msg..'',root,255,255,255,true) cancelEvent() end elseif ( Type == 2 ) then if ( not getPlayerTeam ( source ) ) then return end cancelEvent() for k,v in ipairs ( getPlayersInTeam ( getPlayerTeam ( source ) ) ) do outputChatBox('#FF0000* ( Team )#A8A8A8 [ Console ]'..Hex..' '..getPlayerName ( source )..'#FF6100: '..Msg..'',root,255,255,255,true) end outputServerLog( "(TEAM): " .. getPlayerName ( source ) .. " : " .. Msg ) end end ) ;
  5. 'onClientRender' isMouseInPosition -- https://wiki.multitheftauto.com/wiki/IsMouseInPosition dxDrawRectangle dxDrawImage dxDrawText
  6. local Urls,Pos,Count = { [1] = "https://a.top4top.io/m_533qy3r01.mp3", [2] = "https://e.top4top.io/m_5316airh4.mp3", },{144.89999, -1939.3, 3.5},0 refreshSound = function ( State ) if ( eventName == "onClientSoundStopped" and source == Sound and State ~= "finished" ) then return end if ( Count >= #Urls ) then Count = 0 end Count = Count + 1 Sound = playSound3D ( Urls[Count] , Vector3(unpack(Pos)) ) ; setSoundMaxDistance (Sound,100) outputChatBox("now playing: "..Count) end addEventHandler("onClientResourceStart",resourceRoot,refreshSound) addEventHandler("onClientSoundStopped",resourceRoot,refreshSound) الكود سويته ونسيت ارسله فاستخدم الي انت تبيه
  7. استخدم حدث onClientSoundStopped بدل التايمر
  8. اول طلب تاكد ان مافيه بق في مود debugscript 3 الطلب الثاني 'onColShapeHit' getPlayerTeam getTeamFromName killPed or setElementPosition
  9. تبي لبن مع الكبسة؟
  10. شوف الويكي وظائف ال browser
  11. setElementData getElementData setAccountData getAccountData
  12. سبق وأفدتك في موضوعك السابق استخدم isPedOnGround عشان تتاكد هو عالأرض ولا يطير
  13. function makePed(player) setPedAnimation(player, "ped", "WOMAN_walknorm") end addEventHandler("onResourceStart",resourceRoot,function () for _,player in ipairs(getElementsByType("player")) do bindKey(player,"num_1","down",makePed,player) end end ) addEventHandler("onPlayerJoin",root,function() bindKey ( source , 'num_1' , 'down' , makePed , source ) end ) جربه مادري صح ولا كتبته بالجوال
  14. addEventHandler ( "onClientResourceStart" , resourceRoot , function ( ) if ( getElementData ( localPlayer , "Group" ) == "Seals" ) then engineImportTXD ( engineLoadTXD ( "SL.txd" ) , 181) end end ) addEventHandler ( "onClientElementDataChange" , root , function ( key , _ , new ) if ( getElementType ( source ) == "player" and key == "Group" and new ~= "Seals" ) then engineRestoreModel ( 181 ) end end ) addEventHandler ( "onClientElementModelChange", root , function ( old , new ) if ( getElementType ( source ) == "player" and new == 181 and getElementData ( source , "Group" ) ~= "Seals" ) then setTimer(setElementModel,500,1,source,old) outputChatBox("* you can't use the skin",255,0,0,true) end end ) ; try this
  15. use setElementModel -- 0 when you left from group
  16. use download="false" in meta and downloadFile
  17. addEventHandler ( "onClientResourceStart" , resourceRoot , function ( ) engineImportTXD ( engineLoadTXD ( "SL.txd" ) , 181) end ) addEventHandler ( "onClientElementModelChange", root , function ( old , new ) if ( getElementType ( source ) == "player" and new == 181 and getElementData ( source , "Group" ) ~= "Seals" ) then setTimer(setElementModel,500,1,source,old) outputChatBox("* you can't use the skin",255,0,0,true) end end ) ;
  18. كيف مسويه انت وريني انا مجربه وشغال !!
  19. بالنسبة للكود الأول على حسب القيم مود حقك وبالنسبة للطلب الثاني عن طريق الـ math.random كذا CamGameType = { {-266.91101, -2985.31860, 55.43195}; { 246.51774597168, -1373.8842773438, 144.62593078613, 206.80244445801, -1460.8732910156, 115.37501525879 }; { 936.66528320313, -1952.71875, 96.436546325684, 851.63366699219, -1917.1932373047, 57.60916519165 }; { 2171.0629882813, -1733.7960205078, 28.407825469971, 2270.751953125, -1737.8638916016, 21.657291412354 }; { 2160.9128417969, 1914.1270751953, 70.156799316406, 2075.7458496094, 1914.4643554688, 17.750059127808 }; { 1763.7528076172, 2677.8356933594, 77.898124694824, 1764.3044433594, 2762.3271484375, 24.410757064819 }; { 495.47686767578, 2498.5187988281, 68.611221313477, 398.80816650391, 2499.5329589844, 43.035179138184 }; { -662.50531005859, 2309.900390625, 151.14398193359, -674.19750976563, 2212.4936523438, 131.77304077148 }; { -2574.7844238281, 1336.4937744141, 11.8532371521, -2601.1931152344, 1428.2474365234, 41.582878112793 }; { -2800.7409667969, 1223.7073974609, 21.463973999023, -2810.4326171875, 1124.2016601563, 23.62508392334 }; { -2667.4091796875, 375.99395751953, 10.6223487854, -2767.3198242188, 376.38967895508, 6.4156184196472 }; { -2535.4235839844, -309.27734375, 45.601852416992, -2446.4743652344, -266.33096313477, 29.993312835693 }; { 1324.1005859375, -2285.8576660156, 48.428714752197, 1420.0893554688, -2285.1794433594, 20.398273468018 }; --LS Airport { 1558.7504882813, 2772.923828125, 36.910488128662, 1462.1025390625, 2775.1691894531, 11.334444046021 }; --LV Golf Club { 2083.1591796875, 1285.4011230469, 83.587997436523, 2180.4367675781, 1283.6098632813, 60.48295211792 }; --LV Pyramid { 1860.1906738281, -1468.1575927734, 51.304958343506, 1796.4697265625, -1403.0015869141, 10.142612457275 }; --LS Stadium { 504.29766845703, -1784.1157226563, 13.753237724304, 474.2275390625, -1879.0340576172, 4.4632802009583 }; --LS Beach House } local rTable = math.random ( #CamGameType ) setCameraMatrix(unpack(CamGameType[rTable]))
  20. --- Client Side local sx,sy = guiGetScreenSize ( ) function renderLogo ( ) dxDrawImage ( 0 , 0 , sx , sy , "logo.png" , 0 , 0 , 0 , tocolor(255,255,255,255) , false ) end addEvent ( "renderEvent" , true ) addEventHandler ( "renderEvent" , root , function ( ) addEventHandler ( "onClientRender" ,root, renderLogo) end ) ---- Server Side addEventHandler ( "onPlayerLogin", root,function() triggerClientEvent ( source , "renderEvent" , source ) end)
  21. addEventHandler -- 'onClientRender' dxDrawImage
  22. عن طريق وظائف ال db dbConnect وغيرها
  23. 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 local statButton = { } addEvent ( "onButtonDxClick" , true ) function dxCreateButton ( element,x,y,w,h,text ) if ( not element or type ( element ) ~= "string" ) then return end if ( not statButton[element] ) then statButton[element] = "up" end if ( isMouseInPosition(x,y,w,h) ) then if ( getKeyState ( "mouse1" ) ) then if ( statButton[element] ~= "down" ) then statButton[element] = "down" triggerEvent ( "onButtonDxClick" , localPlayer , element , text ) end else if ( statButton[element] == "down" ) then statButton[element] = "up" end end end dxDrawRectangle ( x , y , w , h , tocolor(0,0,0,200) , false ) dxDrawText ( text or "" , x,y,x+w,y+h,tocolor(255,255,255,255),1,"default-bold","center","center",false,false,false,true) end --- # Example addEventHandler ( "onClientRender" , root , function ( ) dxCreateButton ( "kill" , 300,300,120,30,"Kill Player" ) dxCreateButton ( "warp" , 300,350,120,30,"Teleport Player" ) end ) addEventHandler ( "onButtonDxClick" , localPlayer , function ( Button , Text ) if ( Button == "kill" ) then outputChatBox(Text) elseif ( Button == "warp" ) then setElementPosition ( localPlayer ,0,0,3) end end ) سويت لك button dx مع حدث خاص فيه onButtonDxClick وسويت لك أمثلة وراح تفهمها ان شاء الله
×
×
  • Create New...