Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/03/19 in Posts

  1. لازم يكون عندك دومين اضن والله اعلم
    1 point
  2. تسسلم ء يالغالي أبشر ان شاء الله نورت الموضوع
    1 point
  3. مود جميل وتصميم اللوحة حلوة كبداية لاكن حاول تجيب افكار جديدة مو اتعملت تقبل مروري
    1 point
  4. Provavelmente o código está entrando em um loop destruindo um elemento que está sendo destruído. Remova a linha 70.
    1 point
  5. 1 - عندك قسم كامل لتعلم البرمجة 2 - عندك الويكي العربي فيه كل اساسيات اللغه 3 - عندك قسم البرمجة لطرح المشاكل اللي تواجهك شايف نفسك عندك افكار حلوة اتعلم البرمجة وطبق افكارك بكيفك يعني كل ما واحد عربي يفتح سيرفر انا اجري عليه ابرمجهولوا وكمان لازم افكار جديدة يا حليلك يا حليلك
    1 point
  6. اي امر في الكلينت بيحدث للاعب المحلي بس يعني مثلا انتا مسوي لما الاعب يضغط اف 2 يظهر لوحة اللوحة بتظهر للاعب فقط مش لكل الاعبين طب انتا عايز الكلام يظهر للكل سوي triggerServerEvent ثم تستقبل الحدث في ملف السيرفر addEvent addEventHandler ثم ترسل تريقر للكلينت بالروت اليمنت وللحدث اللي فيه يتكتب الكلام فوق الاعب عشان يظهر للكل triggerClientEvent( root , "your_Event_Name" , باقي الارقيومنتات ) مثال لما تدوس اف 2 يكتب شئ فوق الاعب ويظهر للكل Client : function dxDrawTextOnElement(TheElement,text,height,distance,R,G,B,alpha,size,font,...) local x, y, z = getElementPosition(TheElement) local x2, y2, z2 = getCameraMatrix() local distance = distance or 20 local height = height or 1 if (isLineOfSightClear(x, y, z+2, x2, y2, z2, ...)) then local sx, sy = getScreenFromWorldPosition(x, y, z+height) if(sx) and (sy) then local distanceBetweenPoints = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2) if(distanceBetweenPoints < distance) then dxDrawText(text, sx+2, sy+2, sx, sy, tocolor(R or 255, G or 255, B or 255, alpha or 255), (size or 1)-(distanceBetweenPoints / distance), font or "arial", "center", "center") end end end end bindKey( "f2" , "down" , "chatbox" , "text" ) addCommandHandler( "text" , function( cmd , ... ) local Message = table.concat( { ... } , " " ) triggerServerEvent( "getRoot" , localPlayer , Message ) end ) addEvent( "DrawMessage" , true ) addEventHandler( "DrawMessage" , root , function( Message ) Msg = Message ; myPlayer = source if( not renderEvent ) then renderEvent = not renderEvent ; addEventHandler( "onClientRender" , root , function( ) dxDrawTextOnElement( myPlayer , '[ ' .. Msg .. ' ]' , 1 , 20 , 255 , 0 ,0 , 255 , 2 , "pricedown") end ) end end ) Server : addEvent( "getRoot" , true ) addEventHandler( "getRoot" , root , function( msg ) triggerClientEvent( root , "DrawMessage" , source , msg ) end )
    1 point
  7. Zip/rar the files from C:/Windows/Minidump/ and upload to https://upload.mtasa.com/ and give link here
    1 point
  8. اكيد مسويها كلينت سويها سيرفر وبتظهر لكل الاعبين .
    1 point
  9. https://wiki.multitheftauto.com/wiki/Main_Page عندك الموقع ذا في كل الشرح لى وضيفة كلنت ام السيرفر وقبل ما تخش هونا شوف لك في قسم دروس البرمجة شرح للويكي وكيف تتعامل معه لأخوان المبرمجين مب مقصرين بالطروحات وإن شاءالله خطوة خطوة مع كتابة اكواد بيدك وتصير تفهم للبرمجة لآكن خذ نصيحة مثال انت شغال على فري روم كـ مثال خليك شغال على فري روم لين تخلصه كله وتشوف اخطائك ووتعلم منها يعني ما تخش سكريبت اخر وانت تلقيك مب مخلص سكريبت اول ولو تحتاج اي مساعدات نزل موضوع وسوي لى تاغ ونورتنــــــــــــــــا
    1 point
  10. للآسف أخي الأشياء متعوب عليها ما اقدر اعطيك أسمحلي
    1 point
  11. "onPlayerChat" getRealTime callRemote fetchRemote صراحة ما جربت من قبل بس توقعي بتحتاج ذي الفنكشنات وحاول انت وعطنا محاولتك
    1 point
  12. CTRL+ C e CTRL+V Troque as linhas 22 e 23 addEventHandler("playerChatting", getRootElement(), playerChatting) addEventHandler("playerNotChatting", getRootElement(), playerNotChatting)
    1 point
  13. Troque na linha 4 resourceRoot por root, ou mude o seu client para: addEventHandler("onClientResourceStart", resourceRoot, function () triggerServerEvent ( "onClientDownloaded", resourceRoot ) end )
    1 point
  14. Ué. Tente com esse: local clients = {} addEvent( "onClientDownloaded", true ) addEventHandler( "onClientDownloaded", resourceRoot, function() table.insert(clients, client) end ) addEvent("playerChatting", true ) addEvent("playerNotChatting", true ) function playerChatting() triggerClientEvent(clients, "updateChatList", getRootElement(), source, true) end function playerNotChatting() triggerClientEvent(clients, "updateChatList", getRootElement(), source, false) end addEventHandler("playerChatting", getRootElement(), updatePlayerChatting) addEventHandler("playerNotChatting", getRootElement(), updatePlayerChatting) addEventHandler("onPlayerQuit", root, function() for i,p in ipairs(clients) do if (p == source) then table.remove(clients, i) end end end )
    1 point
  15. Depois posso tentar pensar em algo melhor, mas aqui uma solução "porca" local clientOk = {} addEvent( "onClientDownloaded", true ) addEventHandler( "onClientDownloaded", resourceRoot, function() clientOk[client] = true end ) addEvent("playerChatting", true ) addEvent("playerNotChatting", true ) function updatePlayerChatting() for _,p in ipairs(getElementsByType("player")) do if (clientOk[p]) then triggerClientEvent(p, "updateChatList", getRootElement(), source, eventName == "playerChatting" and true or false) end end end addEventHandler("playerChatting", getRootElement(), updatePlayerChatting) addEventHandler("playerNotChatting", getRootElement(), updatePlayerChatting) addEventHandler("onPlayerQuit", root, function() clientOk[source] = nil end )
    1 point
  16. Teste com algum player, diga para alguém escrever e tú vê se aparece o ícone (ainda tenho minhas dúvidas)
    1 point
  17. Agora sim funcionou! Obrigado pela ajuda @MaligNos
    1 point
  18. Só sei que nada sei Sócrates Tente: addEvent("playerChatting", true ) addEvent("playerNotChatting", true ) addEvent("updateChatList", true ) function playerChatting() triggerClientEvent(this, "updateChatList", getRootElement(), source, true) end function playerNotChatting() triggerClientEvent(this, "updateChatList", getRootElement(), source, false) end addEvent( "onClientDownloaded", true ) addEventHandler( "onClientDownloaded", root, function() addEventHandler("playerChatting", client, playerChatting) addEventHandler("playerNotChatting", client, playerNotChatting) end )
    1 point
  19. O erro é que no triggerClientEvent, o resource ainda não está disponivel no seu cliente (você está no download) Tente: -- cliente addEventHandler("onClientResourceStart", resourceRoot, function () triggerServerEvent ( "onClientDownloaded", localPlayer ) end ) addEventHandler("onClientPlayerQuit", getRootElement(), function() triggerServerEvent("playerNotChatting", source) end ) -- server addEvent( "onClientDownloaded", true ) addEventHandler( "onClientDownloaded", root, function() addEventHandler("playerChatting", client, playerChatting) addEventHandler("playerNotChatting", client, playerNotChatting) end ) * remova as linhas 15,16,17
    1 point
  20. Adicione isso no seu client e remova a linha 17 do seu script server-side addEventHandler("onClientPlayerQuit", getRootElement(), function() triggerServerEvent("playerNotChatting", source) end )
    1 point
  21. When you run a loop in pairs, it grabs not only indexed items but also objects. Objects have keys and values. for k, v in pairs(table) do in this case k would be your key, and v would be its value. Keys are always strings. Say it's not an object, instead its an indexed item, k would become the index, and v would be the value for that index. ipairs however, loops through ONLY indexed items and it does them in order. So ipairs will not grab objects. pairs is faster than ipairs since it does not have to sort through the table first. for i=1, #table do this is called an Int loop, where it simply goes from 1 number to another, i=start, end i represents index mostly because people use this loop to grab table index's. it is by far the fastest loop, as it doesn't have to sort through the table, or return an extra argumented variable. #table just returns the amount of items in a table
    1 point
  22. 1. Solving the main issue. In case of sending from server to client. • Do not send triggerClientEvent's over the root variable.(it is also root, when you do not fill in the receiver) Instead use a table which contains all players that have loaded their resources. When the event onClientResourceStart has been triggered, this player is ready to go. When I release a tool that I have been announced two days ago, there will be a 2e. There is also a function in Lua called pcall. This will skip all error messages, but I don't think that will work as it is an async created error. (Not directly shown up when the trigger*Event function is called, but after it has first send to the other side) function test1 (arg) print(arg) end pcall(test1, 13342144) pcall(test2, 354356) -- there is no test2 function, but we can try to call it without any error message.
    1 point
  23. ابحث بليوتيوب او جوجل بتلاقي ..
    1 point
  24. Multi Theft Auto: San Andreas 1.5.6 is released Today the MTA team is delighted to announce the release of MTA:SA 1.5.6. You will receive an automatic update soon, but if you don't have MTA installed, you can get it from the home page . There are many changes and improvements across the board, but one feature stands out as being especially exciting: custom animations! This has been a feature on our radar for many years, and @Saml1er was the one who decided to make what many have considered a dream, a reality. Take a quick look at this video of custom animations in action to get a glimpse of what's possible: Changes This release includes many additions, improvements, and fixes. Find the complete set of changes, and more information about the improvements listed below, in the 1.5.6 release notes. If you'd like to keep on top of all the things we're working on, why not watch or star our GitHub repository? Here is a heavily cut-down selection of features and fixes. Highlights: New features Ordered roughly by reverse chronological order New languages Bulgarian, Indonesian and Chinese (Traditional) (a3217) New server console feature for arrow command history (#274 by myonlake) New ACL property ModifyOtherObjects.resourceName for one resource only (6614d) New element functions getElementAngularVelocity, setElementAngularVelocity (#73 by lex128) New chat function clearChatBox (#215 by CrosRoad95) New vehicle functions getVehicleRespawnPosition, getVehicleRespawnRotation, setVehicleRespawnRotation (#334, #338 by l0nger) New goggle effect parameter "noiseEnabled" parameter to setCameraGoggleEffect (#324 by samr46) New drawing function dxDrawCircle (#266 by CrosRoad95, Saml1er) New jetpack functions setPedWearingJetpack, isPedWearingJetpack (#243 by Dezash) New element function getElementsWithinRange (de149) New GUI functions guiWindowIsMovable, guiWindowIsSizable, guiEditGetMaxLength, guiEditIsMasked (#272, #255 by FileEX) New fire function extinguishFire (#207 by CrosRoad95, #252 by myonlake, also 7838b) New world functions getPedsLODDistance, setPedsLODDistance, resetPedsLODDistance (#231 by CrosRoad95) New GUI scrollbar functions guiMemoSetVerticalScrollPosition, guiMemoGetVerticalScrollPosition (#248 by myonlake) New GUI functions guiMemoIsReadOnly, guiEditIsReadOnly (#236 by FileEx) New special property "underworldwarp" (#208 by CrosRoad95, #222 by myonlake) New vector support for collision functions (#217 by myonlake, #163 by Pawelo / 4O4) New animations functions setPedAnimationSpeed, engineLoadIFP, engineReplaceAnimation (Saml1er, with some help from Icensow, raw data loading courtesy of #247 by samr46) New colshape function isInsideColShape (#195 by tederis) New vehicle function for client-sided setVehicleHandling (#192 by Renkon) New world sound parameter to setWorldSoundEnabled to stop sound immediately (44844) New ped weapon function isPedReloadingWeapon (#149 by Neproify) New debug hooks pre/postEventFunction added to addDebugHook (#126) New event parameter "deleted" add to onResourceStop (98502) New vehicle function isVehicleWheelOnGround (#146 by ZReC) New command reloadacl (#131 by Timic) Enable switching camera view mode for trains (#125 by ZReC) New encode functions encodeString, decodeString (#184 by SDraw) New pickup events onPickupLeave & onPlayerPickupLeave (#176 by emre1702) New account functions getAccountIP, getAccountsByIP, getAccountsByData & setAccountName (#164 by emre1702) Highlights: Bug fixes and tweaks getChatboxLayout now works as advertised (#254 by myonlake) Return 2 vectors for ele:getBoundingBox (#305 by Pirulax, #332 by Addlibs) Fix inconsistencies in reading userdata in Player functions (#308 by Addlibs) Improve debug info for garbage collected files (#312 by Dezash) Fix crashes with account functions when using empty strings (faa57) Missing bShallow for server-side water (#240 by myonlake) Fix spawnPlayer rotation not working properly (#258 by myonlake) Fix false elements in getElementsWithinRange (#300 by Sergeanur) Removal of the /whowas command (0cffa) Improve connect to disconnect you less frequently (7fc29) Make connect port argument default to 22003 (d698b) Fix many bugs related to animations, jetpack and choking (#229 by myonlake) getVehicleType not being consistent server/client side (b08f3) Fix custom CEGUI skins accidentally breaking dxDrawRectangle (4e57a) Ignore colorcodes while tabbing in chatbox (#238 by Timic) Various bind tweaks, please tell us if something is broken (by emre1702) Fix empty string in getVehicleNameFromModel (instead of false) (#219 by emre1702) Weather blending improvements (#204 by emre1702) Fix 'stream_title' meta tag when the playback is started (#206 by Sergeanur) Fix problems when using a controller with more than 7 axes (382a3) Console no longer displays an error message when pressing the key of a disabled MTA control (23dad) Fix crash caused by calling client-side setPlayerNametagShowing with a ped (554a2) Fix server crash on server-window resize (becf0) Download This release is backwards compatible with the older 1.5.x releases (1.5.5, 1.5.4, all the way to 1.5). However, if you would like to take advantage of all of these useful changes, you will need to go and download the update! Servers: binaries are available, and don't forget to update your default resources. What's next? We're continually working on new features and fixes for MTA. If you're happy to report bugs and crashes do try out our Nightly release stream. You can do this by going into Settings -> Advanced -> Auto updater -> Update build type. Change to "nightly" and hit "Check for update now". Only do this if you like crashing and like filling out bug reports. We're also working on a brand new community: we want your suggestions, ideas and feedback! If you have any questions or would just like to chat with the community, do check out our official Discord server. We have channels for scripting, general support (bugs), mod development, and many more! Thank you! Thank you very much to the following community members for their work towards this release: Addlibs, ArranTuna, CrosRoad95, Dezash, Dutchman101, Einheit-101, emre1702, FileEX, forkerer, Icensow, jlillis, l0nger, lex128, lopezloo, MIKI785, myonlake, Neproify, Pawelo / 4O4, Pirulax, Renkon, samr46, SDraw, Sergeanur, tederis, Timic3, ZReC, and many others who helped document on the wiki, reported bugs, and helped out with issues. (If your name is missing or you want to change your entry above, please PM @qaisjp) You could be on this list! We're always on the lookout for new contributors. Contribute on GitHub, and chat with us on Discord. Finally, everyone, please give a ? to the newest maintainer of Multi Theft Auto: @Saml1er. Until next time, The MTA Team
    1 point
  25. +1900 since the year of computer starts from 1900
    1 point
  26. الخروج عن سياق الموضوع المرة القادمة سوف يؤدي الى تحذيرك
    1 point
  27. https://github.com/CodyJL/JStreamer That'll automatically setup IDs and stuff. 1.5.6 will hopefully include a new map editor (And possibly if it makes it some spare usable IDs) that'll make this stuff incredibly easy to do
    1 point
×
×
  • Create New...