Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/04/18 in all areas

  1. ثلاثون لاعب بسيرفر فخامة هجولة للانظمة الواقعية عدد جميل جدا وسيرفر جديد ! المبرمجين @MR.TOUNSI @DR.MOOST @Master_MTA @MRKAREEM @Abu-solo تحياتي الخاصة الى MR.HemoO Mr.Mosa والبــاقي فـى القـلب
    2 points
  2. tonumber هل تعلم انك تقدر تختصر هيك : local x, y, z = guiGetText(xEdit), guiGetText(yEdit), guiGetText(zEdit) if tonumber(x) and tonumber(y) and tonumber(z) then -- بدون اختصار if tonumber(x..y..z) then -- بختصار
    2 points
  3. I made this video today for people who don't know how to change their theme.
    1 point
  4. Render events enhancement Having a lot of render events in your resource? Easier attach and remove? Or do you want to pass arguments in to a function which is attached to a render event? Then this might be something for you. Syntax: addRenderEvent bool addRenderEvent(function functionVar [, string eventName, arguments ...]) Arguments: The function you want to attach/target. The event you want to use. ( "onClientRender", "onClientPreRender", "onClientHUDRender") If you do not fill in one of these three, it will automatic fallback to "onClientRender". Fool proof. Arguments you can pass to the target function. (which isn't possible with the default addEventHandler + onClientRender function) Returns: true when added, and false otherwise. Syntax: removeRenderEvent bool removeRenderEvent(function functionVar [, string eventName]) Arguments: The function you want to attach/target. The event you want to use. ( "onClientRender", "onClientPreRender", "onClientHUDRender") If you do not fill in one of these three, it will automatic fallback to "onClientRender". Fool proof. Returns: true if found + removed, and false otherwise. (Not recommended to execute this function every frame > performance) onClientPreRender + timeslice If you use "onClientPreRender", just like the default event, it will pass the timeSlice to the attached/targetted function. https://wiki.multitheftauto.com/wiki/OnClientPreRender I am not sure if attached is the right word for this example, because it isn't really attached to the event. It is saved in a table which gets looped every frame. Performance Is this code bad for performance? The answer to that is NO. I ran a test for it, and it seems that addRenderEvent used less CPU AFTER adding the events. (addRenderEvent: 31% CPU, addEventHandler 99/100% CPU) Adding the event will probably use more CPU, but that is only one execution. Feel free to re-test this example, I am interested how it would perform on your pc's. Performance test code (Not the source code ) Source code:
    1 point
  5. كفوو وانشاء الله لي أكثر و أكثر <3
    1 point
  6. دنته مصخره ههههههههه امزح معك حبيب قلبي الله يسعدك زي ما تضحكني دايم كذا
    1 point
  7. اطن ما في حاجه للداتا local Keys = {"F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12"} local war = createMarker(2490.8999023438, -1668.3000488281, 13.300000190735, "cylinder", 50, 255, 0, 0, 0) addEventHandler("onClientKey", root, function(key , press) if press then for _,keys in ipairs(Keys) do if key == keys and isElementWithinMarker(localPlayer, war) then cancelEvent() outputChatBox("لايمكنك استعمال هذا الزر في ساحة الحرب",255,0,0,true) end end end end )
    1 point
  8. Fine, But i don't comment because i'am ثقيل See my English up ? ^ Like it ?? Daaaamn ya man
    1 point
  9. من طول الغيبات جاب الغنايم منور جراند <3
    1 point
  10. Ask at the servers that banned you
    1 point
  11. JStreamer 3.0 coming in a couple of days, Fixed FPS as well as alot of minor bugs.
    1 point
  12. De nada. Que bom que lhes ajudei.
    1 point
  13. Imagine you have a gamemode and you forbid a certain vehicle, but players still end up driving them and they are infact spawned. It can be a resource vulnerability, multiple scripts on your server can spawn vehicles, or a hack like LUA injector that enables them to be spawned. You want to find out the origin of these vehicles in order to debug the responsible resource (knowing which script contains a possible vulnerability or bug) and need a debug script to find out the culprit. Ofcourse you can just script the violating vehicles to blow up or destroy as soon spawned, but I can understand you also want to know what's actually happening. I had this scenario myself, fixed and found it out myself. It's a waste to just put this script in the bin, so I share it with others that may find themselves with the same or a similar problem. It wasn't easy either to find a proper way to let it work. CODE: local triggeredByModels = { [432]=true } function detectVehicleCreation() if getElementType(source) == "vehicle" and triggeredByModels[getElementModel(source)] then outputServerLog ("** ILLEGAL VEHICLE DETECTED ** "..getVehicleName(source).." was found at "..toJSON({getElementPosition(source)}).. " dim: "..getElementDimension(source).. " & int: "..getElementInterior(source)) local x,y,z = getElementPosition(source) local sphere = createColSphere(x,y,z,40) setElementInterior(sphere, getElementInterior(source)) setElementDimension(sphere, getElementDimension(source)) attachElements(sphere, source) local players = {} local pc = getElementsWithinColShape(sphere, "player") for _,p in pairs (pc) do if p then table.insert (players, getPlayerName(p)) end end if players and #players ~= 0 then outputServerLog ("** Nearby players: "..toJSON(players)) end outputServerLog ("** Responsible resource: "..tostring(getElementID(getElementParent(getElementParent(source))))) destroyElement(sphere) end end addEventHandler ("onElementStartSync", root, detectVehicleCreation) Serverside script. By default (as code above) it's defined to trigger for vehicle ID 432 (rhino) you must change this ofcourse. So what this does, is log the responsible resource if possible that made the vehicle get spawned, and logs the players in direct vinicity of the vehicle as soon it starts to exist, most of the times the player closest to the vehicle is the creator or spawner so you can identify them, punish player/ask them for details about the leak if you're sure that could be them. If it's a LUA injector hack it's likely no usable resource origin (spawner) will be output, you can determine a player using hacks possibly this way.
    1 point
  14. السلام عليكم ورحمة الله أخذت اجازه شهر ومليت من الستيم قلت ارجع ل أم تي اي لطلبات البرمجة، تواصل خاص على المنتدى أو سكايبي mezo.prince1 فيسبوك www.fb.com/medolua كل م عليك فعله هو إرسال رساله فيها نوع السيرفر. فكره المود. شرح المود. طريقة الدفع. وإنشاء الله بسوي نفس المود إلى تبيه بالظبط وإنشاء الله السعر م نختلف عليه والسلام خير الختام
    0 points
×
×
  • Create New...