Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/12/19 in all areas

  1. Coroutines are used to pause execution of a routine (a section of the code) whilst waiting for a callback, for example. They aren't a replacement for timers, but rather an addition. If you want to pause and then resume coroutines after some time elapses, you'd be using setTimer as well. If you want temporary vips and bans you'd be best using traditional data storage (XML files, JSON files, SQL, etc. -- preferably SQL) with timestamps to mark end-time and setTimer to trigger the function that removes the vip status or ban. That way you can restart timers when your resource restarts for any reason, since you know the current timestamp and end-timestamp, you can calculate how long setTimer you need.
    2 points
  2. It is mainly used to break a big task in separated sub-tasks. Your computer can't finish the big task in one run without blocking everything else (other resources and applications like your browser). For example: You have to do 10 exams and for that you have write a script that would determine which exams you have to learn for. For learning each exam you need 4 hours. You are a human, so you need every day atleast 13 hours resting/sleep, breakfast, dinners etc. ----- No worries, you do not need to program this. But there is one thing that matters, which is that you can only finish 2.75 exams per day. In Lua there is also limit, just run this to find out: while true do end ------ Coroutines are used to pause the code when the duration takes to long. The timer is used to resume the code at a new moment. Now an impossible task can become smaller possible tasks.
    1 point
  3. This is a good improvement over your previous appeals (https://forum.multitheftauto.com/topic/120535-cd-47-ddos/ and https://forum.multitheftauto.com/topic/121134-despacito/) and you clearly meant it this time. Appeal accepted, ban removed
    1 point
  4. --كلينت function back() if source == zone then removeEventHandler("onClientRender", root,zoneText) end end function leave(element) if source == zone then addEventHandler("onClientRender", root,zoneText) if element == localPlayer then triggerServerEvent ("addText",localPlayer,element) end end end addEventHandler ("onClientColShapeLeave",root,leave) addEventHandler ("onClientColShapeHit",root,back)
    1 point
  5. No caso do HEADSHOT, o proprio mta ja disponibiliza este resource que fica em C:\Program Files (x86)\MTA San Andreas 1.5\server\mods\deathmatch\resources\[gameplay] E sobre o mod de apontar dedo, para deixar uma arma invisivel tu pode usar um dff e um txd de arma invisivel e usar o GM2MC Mas ja existe esse mod pronto na net e descompilado
    1 point
×
×
  • Create New...