Jump to content

Avir14

Members
  • Posts

    46
  • Joined

  • Last visited

Everything posted by Avir14

  1. الكود ان الي يقتل احد يظهر له الصوت بس المشكلة ان الصوت يظهر للقاتل والمقتول ابيه للقاتل بس والدي بق مايطلع شئ --Client addEvent( "sso", true ) addEventHandler( "sso", getRootElement(), function(killer) local sound = playSound("sounds/kill.mp3") setSoundVolume(sound, 0.5) end ) --Server addEventHandler ( "onPlayerWasted" , root , function ( _ , killer ) if ( killer and isElement ( killer ) and getElementType ( killer ) == "player" and source ~= killer ) then triggerClientEvent("sso", getRootElement()) outputChatBox ("Kill") end end ) حل لو سمحتم وانا ابي الايفنت يكون مثل ماهو بالسيرفر عشان احتاجه في مودات ثانيه-
  2. يعطيك العافية المشكلة كان لها سببين السبب الاول اني كنت حاط الاكواد بملف كلاينت والمفترض احطها بملف سيرفر والسبب الثاني اني ماكنت اسوي اشغل المود بعدين اطلع واخش من السيرفر
  3. للاسف ماشتغل لسا نفس المشكلة ERROR: script\ c.lua:44: attempt to concatenate a nil value
  4. ما اشتغل للاسف كذا كاتبلي بالدي بق ERROR: script\ c.lua:44: attempt to concatenate a nil value outputChatBox("Your ID IS"..getPlayerID(player), player, 0, 154, 255)
  5. -- ابيه يجيب ايدي اللاعب -- Client function mid ( commandName ) local idd = exports.ids:getPlayerID(player) outputChatBox("Your ID IS"..idd, source, 0, 154, 255) end addCommandHandler ( "myid", escapeMe ) -- مود الايدي الي اسوي منه export local optimize = true -- Should the script be optimized? (if optimized, cannot be used client-side) local ids = {} function assignID() for i=1,getMaxPlayers() do if not ids[i] then ids[i] = source setElementData(source,"id",i,not optimize) break end end end addEventHandler("onPlayerJoin",root,assignID) function startup() for k, v in ipairs(getElementsByType("player")) do local id = getElementData(v,"id") if id then ids[id] = v end end end addEventHandler("onResourceStart",resourceRoot,startup) function getPlayerID(player) for k, v in ipairs(ids) do if v == player then return k end end end function freeID() local id = getElementData(source,"id") if not id then return end ids[id] = nil end addEventHandler("onPlayerQuit",root,freeID) function getPlayerByID(id) local player = ids[id] return player or false end -- debugscript الدي بق ERROR: script\c.lua:2: call: failed to call 'ids:getPlayerID' [string "?"] ERROR: script\c.lua:3: attempt to concatenate local 'idd (a boolean value) حل جزاكم الله خيرا
  6. هذا شات فكرته ان اللاعب اذا كان نفس السريال الي مكتوب بالجدول ومعه رتبه كونسل يمديه يتكلم فشات خاص مايبي يشتغل وكمان مافيه ايرور يطلع بال دي بق local serials = { ["3BF3A4A44441FCA494DA444D9BF8AAF"] = true, ["2E3AF53F29FFF929F6865F68FFFFDFA"] = true, } function adminchat ( thePlayer, _, ... ) local message = table.concat ( { ... }, " " ) local Ser = getPlayerSerial(p) if ( isPlayerOnGroup ( thePlayer ) ) then for _, player in ipairs ( getElementsByType ( "player" ) ) do if serials[Ser] then outputChatBox ( "#FF3333(Managers)#FFFfff ".. getPlayerName ( thePlayer ) ..": #C6C6C6".. message, player, 255, 255, 255, true ) end end else outputChatBox ( "", thePlayer, 255, 255, 255, true ) end end addCommandHandler ( "Managers'Chat", adminchat ) function isPlayerOnGroup ( thePlayer ) local account = getPlayerAccount ( thePlayer ) local inGroup = false for _, group in ipairs ( { "Console" } ) do if isObjectInACLGroup ( "user.".. getAccountName ( account ), aclGetGroup ( group ) ) then inGroup = true break end end return inGroup end addEventHandler("onPlayerJoin",getRootElement(), function () bindKey(source,"]","down","chatbox","Managers'Chat") end) addEventHandler("onResourceStart",getResourceRootElement(getThisResource()), function () for index, player in pairs(getElementsByType("player")) do bindKey(player,"]","down","chatbox","Managers'Chat") end end) addEventHandler( 'onClientRender', root, function( ) setTime( 1, 0 ) end )
  7. --Client GUIEditor = { button = {}, window = {}, label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() local screenW, screenH = guiGetScreenSize() GUIEditor.window[1] = guiCreateWindow((screenW - 568) / 2, (screenH - 461) / 2, 568, 461, "tesst", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible(GUIEditor.window[1], false) GUIEditor.button[300] = guiCreateButton(490, 85, 38, 21, "Create", false, GUIEditor.window[1]) GUIEditor.button[322] = guiCreateButton(532, 85, 26, 21, "Delete", false, GUIEditor.window[1]) end ) addEventHandler ('onClientGUIClick' , root, function () if source == GUIEditor.button[300] then triggerServerEvent("dor",localPlayer) end end ) addEventHandler ('onClientGUIClick' , root, function () if source == GUIEditor.button[322] then triggerServerEvent("cdor",localPlayer) end end ) --Server addEvent('dor',true) addEventHandler('dor',root, function() local ob1 = createObject(1508, 228.3, 149.7, 1003.7) local ob2 = createObject(1508, 228.3, 227, 1203) end ) addEvent('cdor',true) addEventHandler('cdor',root, function () objec = getElementsByType ( "object" ) destroyElement ( objec ) playSoundFrontEnd ( root, 46 ) end ) i want to delete all objects WARNING: Script\s.lua:56: Bad argument @ 'destroyElement' [Expected element at argument 1, got table] Help me please i tried everything
  8. Thank you very much bro @Shady1 - @Vampire For Helping me The solution is closing anti-virus and reinstall MTA:SA >> the game is running now and everything is very good .
  9. i installed MTA:SA with admin rights and every thing is good but what is that mean When i click allow the game opens and when i want to join a server the games closes immediately without any warning or error message , then i tried to open the game again But this problem face me again What should i do now ?
  10. First of all , i tried to join a server but i faced a problem = ( No such mod installed ( Deathmatch ) ) Then i reinstalled MTA:SA but during install i face this problem > And i clicked ignore and i went to open the game but i faced this problem !! >> When i click no >> nothing happens Help me please i don't know why this happened to me Note : i reinstalled Gta sa andreas too
  11. طيب اذا استخدمت اول طريقة لانها سهله كيف اخليه اذا لمس اي واحده منهم يموت باستخدام : addEventHandler ( "onColShapeHit", hillArea, hill_Enter ) وش اكتب مكان ال hillArea يمدي اكتب addEventHandler ( "onColShapeHit", var1 , var2 , var3 , hill_Enter ) ولا لا اتمني تقدر تساعدني
  12. انا ابي اذا اللاعب لمس ال Rectangle يموت وانا مسوي اكثر من Rectangle ابيه اذا لمس اي واحده منهم يموت استخدمت ذا الكود local hillArea = createColRectangle(1252.5432128906, 1211.8337402344, 5, 456.9) , createColRectangle(1661.3341064453, 1167.2008056641, 6.5, 0) , createColRectangle(1256.3558349609, 1199.0007324219, 200.5, 3.5) , createColRectangle(1637.7678222656, 1314.6097412109, 77.4, 5.5) , createColRectangle(1714.9532470703, 1283.1953125, 5, 424.5) , createColRectangle(1309.1072998047, 1669.1701660156, 4, 134.2) , createColRectangle(1331.5991210938, 1803.1833496094, 6, 60) , createColRectangle(1452.1392822266, 1143.9161376953, 5, 59.4) , createColRectangle(1557.4001464844, 1703.8187255859, 5, 159.8) , createColRectangle(1457.5891113281, 1138.0628662109, 187, 5) , createColRectangle(1639.8438720703, 1143.6033935547, 3, 175.7) , createColRectangle(1313.4692382812, 1803.3243408203, 23.9, 2.5) , createColRectangle(1251.8483886719, 1674.6879882812, 55.2, 0) , createColRectangle(1558.4365234375, 1703.4904785156, 149.2, 0.5) , createColRectangle(1337.5737304688, 1862.9287109375, 220.3, 1) local radars = createRadarArea ( 1252.5432128906, 1211.8337402344, 5, 456.9, 255, 0, 0 ) , createRadarArea (1661.3341064453, 1167.2008056641, 6.5, 0, 255, 0, 0) , createRadarArea (1256.3558349609, 1199.0007324219, 200.5, 3.5, 255, 0, 0) , createRadarArea (1637.7678222656, 1314.6097412109, 77.4, 5.5, 255, 0, 0) , createRadarArea (1714.9532470703, 1283.1953125, 5, 424.5, 255, 0, 0) , createRadarArea (1309.1072998047, 1669.1701660156, 4, 134.2, 255, 0, 0) , createRadarArea (1331.5991210938, 1803.1833496094, 6, 60, 255, 0, 0) , createRadarArea (1452.1392822266, 1143.9161376953, 5, 59.4, 255, 0, 0) , createRadarArea (1557.4001464844, 1703.8187255859, 5, 159.8, 255, 0, 0) , createRadarArea (1457.5891113281, 1138.0628662109, 187, 5, 255, 0, 0) , createRadarArea (1639.8438720703, 1143.6033935547, 3, 175.7, 255, 0, 0) , createRadarArea (1313.4692382812, 1803.3243408203, 23.9, 2.5, 255, 0, 0) , createRadarArea (1251.8483886719, 1674.6879882812, 55.2, 0, 255, 0, 0) , createRadarArea (1558.4365234375, 1703.4904785156, 149.2, 0.5, 255, 0, 0) , createRadarArea (1337.5737304688, 1862.9287109375, 220.3, 1, 255, 0, 0) function hill_Enter ( thePlayer, matchingDimension ) if getElementType ( thePlayer ) == "player" then killPlayer ( thePlayer ) outputChatBox ( "Lift zone", getRootElement(), 255, 255, 109 ) end end addEventHandler ( "onColShapeHit", hillArea, hill_Enter ) بس لما شغلته واحده بس تقتل اللاعب اذا لمسه الباقي مايشتغل مادري وش السبب اتمني احد يساعدني ابيه كلهم يقتلو اللاعب اذا لمسهم
  13. كيف اجيب احداثيات المكان المربع ذا الي بالصورة : عشان استخدم الاحداثيات في اني اسوي green zone createColCuboid ( float fX, float fY, float fZ, float fWidth, float fDepth, float fHeight ) createRadarArea ( float startPosX, float startPosY, float sizeX, float sizeY, [ int r = 255, int g = 0, int b = 0, int a = 255, element visibleTo = root ] ) اتمني احد يساعدني ,لاني حاولت كثير وماعرفت
  14. مافهمت وش الكود ذا root , function ( ) triggerClientEvent ( source , "setServer:Name" , source ,table.concat({getServerName( ),'Players : '..getMaxPlayers ( )},',')) end )
  15. ابيه يغير اسم الليبل الي اسم السيرفر ويغير اسم ليبل ثاني يجيب عدد اللاعبين الي بالسيرفر وش الحل --Client GUIEditor = { button = {}, window = {}, label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() local screenW, screenH = guiGetScreenSize() GUIEditor.window[1] = guiCreateWindow((screenW - 568) / 2, (screenH - 461) / 2, 568, 461, "Server Ste", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible(GUIEditor.window[1], false) GUIEditor.label[1] = guiCreateLabel(10, 24, 76, 21, "Server Name:", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "default-bold-small") GUIEditor.label[3] = guiCreateLabel(10, 45, 76, 21, "Players:", false, GUIEditor.window[1]) end ) function ae () guiSetText (GUIEditor.label[1], "Server Name: ".. getServerName ( ) ) guiSetText (GUIEditor.label[3], "Players: ".. getPlayerCount ( ) ) end addEventHandler ( "onClientRender", root, ae ) --debugscript ERROR: T2.lua:16: attempt to call global 'getServerName' (a nil value) ERROR: T2.lua:17: attempt to call global 'getPlayerCount' (a nil value)
  16. I know it's wrong I tried to do everything but nothing work I think that will call : » local tee = guiSetText ( label , "On" )
  17. Thank you, - Yes I know about lua scripting , I think I have 1 year experience in programming in general - Yes I created it Two days ago and it tryed to fix it but I Failed, no one helped me. - Yes of course
  18. i don't know what to do --Client GUIEditor = { label = {}, window = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(746, 409, 429, 418, "", false) guiWindowSetSizable(GUIEditor.window[1], false) label = guiCreateLabel(128, 186, 188, 111, "TEXT", false, GUIEditor.window[1]) end ) function aapp () local tee = guiSetText ( label , "On" ) triggerServerEvent("Me",localPlayer) end addEventHandler ( "onClientRender", root, aapp ) --Server addEvent("Me",true) addEventHandler("Me",root, function (tee) if (getServerConfigSetting( "bullet_sync" ) == "1" ) then tee end end ) -- Debugscript ERROR: Loading script failed: TestScript server.lua:6: '=' expected near 'end' ERROR: Client (unle) triggered serverside event Me, but event is not added serverside
  19. الحين انا ابيه اذا القلتش شغال يغير الليبل عند كل الناس --Client GUIEditor = { label = {}, window = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(746, 409, 429, 418, "", false) guiWindowSetSizable(GUIEditor.window[1], false) label = guiCreateLabel(128, 186, 188, 111, "TEXT", false, GUIEditor.window[1]) end ) function aapp () local tee = guiSetText ( label , "On" ) triggerServerEvent("Me",localPlayer) end addEventHandler ( "onClientRender", root, aapp ) --Server addEvent("Me",true) addEventHandler("Me",root, function (tee) if (getServerConfigSetting( "bullet_sync" ) == "1" ) then tee end end ) -- الكلام الي يطلع بالدي بق ERROR: Loading script failed: TestScript server.lua:6: '=' expected near 'end' ERROR: Client (unle) triggered serverside event Me, but event is not added serverside
×
×
  • Create New...