Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/05/20 in all areas

  1. . Muito obrigado, me ajudou muito
    1 point
  2. الله يسلمك حبيبي وانت بخير
    1 point
  3. الله ينور عليك تسلم اتشال خلاص كل عام وانت بخير
    1 point
  4. ذا dxDrawRectangle ( float startX, float startY, float width, float height [, int color = white, bool postGUI = false, bool subPixelPositioning = false ] ) احذفه ذا السطر وبتلاقيه راح
    1 point
  5. اي شريط ؟؟؟
    1 point
  6. A função supostamente serviria pra dar dinheiro aos jogadores a cada 2 segundos e meio. Mas creio que vc não quer isso. Então apenas apague esse setTimer.
    1 point
  7. Cara, se não existe esta função; Não há necessidade do setTimer para aciona-lá! Pode apagar a linha, que o erro sairá.
    1 point
  8. local chatRadius = 50 function sendMessageToNearbyPlayers(message, messageType) if messageType == 0 then local posX1, posY1, posZ1 = getElementPosition(source) for id, player in ipairs(getElementsByType("player")) do local posX2, posY2, posZ2 = getElementPosition(player) if getDistanceBetweenPoints3D(posX1, posY1, posZ1, posX2, posY2, posZ2) <= chatRadius then outputChatBox(message, player) end end end cancelEvent() end addEventHandler( "onPlayerChat", getRootElement(), sendMessageToNearbyPlayers ) Evento da wiki (Só copiei e colei), evento: onPlayerChat
    1 point
  9. I'll try to test the CPU usage in future, but with R5 3600@RX 5600 XT I don't know if I can test anything, cause It won't cause any drops on my rig
    1 point
  10. The CPU usage was normal (average 0.62% in IPB when flying around the map) on my Intel Celeron E3200 (2.40 GHz) This PC only have a integrated video card with 128 MB dedicated video memory, so the only problem is the lower fps because a lot of objects drawed. (Tested on a green venturas map with the forest generator publiced by Essle ~ Total 2124 tree objects created) But yeah, this is a great work
    1 point
  11. بسم الله , شوف يا ماكس . انا ما راح اكذب عليك ويلي بقوله صح والله من ساعة ما صديقي قلي علي هاي اللعبة من سنين كثيرة قول من 2011 وسويت نفسي ابله ما سمعت شئ بس جيت في وقت والله مليت وطفشت وحملته علي سنة 2012 اي في وقت التأسيس يدوب شوفت اول سيرفر وكان اسمه وناسة تايم هجوله وحرب وبدأت قصة حياتي في السيرفر والله ضليت حياتي كله في السيرفر هههههههه يب كان نفسي اقفل الرتب واكون شئ في وناسة او اكون اداري او اي شئ حلو في وناسة , لكن الظروف تحكم الحين انا بكل جهدي ساعي لهدفي احب اشكر السيرفر علي كل عام بيفرحنا فيه وكل عام بيتطور اكتر احب اشكر اخويا وصديقي في المجال المبرمج نصور افضل مبرمج رأيته عيناي , احب اشكر الاونر هوليود , احب اشكر الاونر , رامي احب اشكرك انت شخصياً يلي جيت تقرا تعليقي وجيت تسوي رد علي افضل سيرفر بحياتي احب اشكر الاخ شبح علي كل ماب قام بتصميمه احب اشكر كل ادمن في وناسة اشتغل بمضيره في السيرفر وشكرا , ويارب نكون دايماً متجمعين علي افضل الاحوال ♥
    1 point
  12. Call me crazy, but the OP is not asking for just working code. He's asking how to improve or whether it is good the code he already has, in order to fix or ignore that warning. So I will try to answer your question: that kind of warning should never be ignored. It means that whatever your code does takes a long time to finish, and in slower servers it could also mean that your script gets aborted in the middle of its execution, throwing errors and not doing what you want it to do. You need to fix up your code, so it doesn't suck up all the limited CPU time the computer has. I hear you asking: "but if my code does really need that time, how can I avoid this?" In that case you can't make your code take less time, but you can distribute the total time it takes in slices by using coroutines. They allow to pause and resume execution of functions, so while they are paused the server can use that CPU time to take care of another things, and in turn don't freeze everything else. When using coroutines, you are basically letting the PC to take a break from time to time, to allow him to dedicate his resources to another pieces of code. So you should fix your code by making appropiate use of coroutines, in order to don't freeze your server and don't see warnings while it executes. But if for some reason you are lazy, you can't really get to coroutines usage or you simply want to do performance tests, you can disable the MTA: SA hook that throws that warnings: debug.sethook() But beware: disabling that hook is NOT a programming practice that should be used in production scripts. It is only intended for development purposes, not as a everyday solution to avoid coroutines. And it won't stop your server from freezing or even crashing; instead, it will make the problem worse, because if your script executes infinitely for some reason you will have to restart the entire server to stop it.
    1 point
  13. That's a for-loop, used to loop all items in the "numberOfIndex" table.
    1 point
  14. سؤال بس ، أنت اكشن الي برمجت لـ سيرفر وناسة تايم هذا؟ ولا شخص آخر
    0 points
×
×
  • Create New...