Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/01/22 in all areas

  1. Server Time Sync This resource is used to sync server timestamp (in Milliseconds) to all clients. It is for scripters and resources that may use it in the future. The resource itself is not very complicated at it's core, but it can be incredible useful for (infinity) animations. For example to let many trains drive around the map with almost no bandwidth required, in that resource is the same concept applied. local timeNow = exports.servertimesync:getServerTime() if timeNow then local currentRotation = ((timeNow % 10000) / 10000) * 360 -- Rotate 0-359 every 10 seconds. end I have added a little test resource. Which you can download below. World location: 0, 0, ~. You can download the resource here. Enjoy your server . The test resource. (requires servertimesync)
    2 points
  2. Hello after a long break I am back to making videos ! In this video, I'm presenting you with a parody of NFS Underground 1 Endless Tunnel. Feel free to Subscribe and Like the video if you enjoyed it. ?
    1 point
  3. كفوك اخي الكريم
    1 point
  4. هاذا فقط مثال يعني فه انا فهمتك بس يلي بدك اياه بس الله يعافيك
    1 point
  5. 6rB طبعن بعد كالام الأخ عندي لك مثال اذا بدك يطلع اسم السلاح في شات بوكس او انك بدك تطلع اسم السلاح وايدي سلاح وعدد رصاص او ماشابه function giveWeapons(Name,ID,Ammo) giveWeapon(source, Name, ID, Ammo, true) outputChatBox("#00BFFF* #c1c1c1You Weapon #FF0000[ "..Name.." ]#c1c1c1with got #00BFFF: #FF0000[ "..getWeaponNameFromID(ID).." ]#c1c1c1with ammo #00BFFF: #FF0000[ "..Ammo.." ]#00BFFF.", source,0,255,0,true) end addCommandHandler("giveWeapon", giveWeapons)
    1 point
  6. طيب فيك تسوي شي حعطيك مثال function giveMoney(theplayer, cmd, amount) local amount = tonumber(amount) if(amount) then for index, player in ipairs(getElementType("player")) do if(player ~= theplayer) then givePlayerMoney(player, amount) outputChatBox(getPlayerName(theplayer).."gave you $"..amount.."!",player,0,255,0) end end end end addCommandHandler("give",giveMoney) ممكن تقدر تسوي كذا ورح يعطي فقط للاعب
    1 point
  7. getWeaponNameFromID( id ) -- id ( اي دي السلاح الي تبغى يجي اسمه ) example : local weaponname = getWeaponNameFromID ( 31 ) outputChatBox("get weapon name from id : "..weaponname.."") -- النتيجة get weapon name from id : M4
    1 point
  8. I'm glad that it helped! And enjoy the game! ?
    1 point
  9. The AnVir itself seems to be the problem, so you can try stopping it from the Task Manager or uninstall it.
    1 point
  10. w0w, nice script, i will try this
    1 point
  11. Perhaps the distinction should be drawn between what can only be controlled by scripts and what can be changed by other means. Position can change because of physics, which is why we want MTA to sync it, but control states cannot be changed by anything but scripts. If the script fully controls them anyway, it makes sense to let it take care of making them consistent. Also, there would be a benefit in syncing some other things besides position (assuming they're not synced already), such as whether the ped is knocked down. It's another thing related to physics that can make a big difference.
    1 point
  12. I like the idea that MTA would not greatly disturb the sync actions performed by your own Lua logic. The position syncing is the most primitive approximation being performed but I guess you'd want to do that anyway. Due to the network delays no sync action can perfectly describe where the ped element should be. But having the freedom to find best practices in "high level actions" is certainly a great idea.
    1 point
  13. You are right in that assessment. The ped does teleport around. You have to still call setPedControlState on every client to synchronize the ped actions/animations. I just did a test with a friend of mine on my server. I was of the impression that this behaviour was changed but nah. ^^ Wrong impression given my reading too many incomplete MTA wiki docs. I have amended the wiki documentation of setPedControlState to reflect this observation.
    1 point
  14. Isso não está funcionando pelos seguintes motivos, você não deve usar isObjectInACLGroup no client-side; sua função para o command handler deve receber o parâmetro do jogador que o acionou; getLocalPlayer não pode ser usado no server-side, por isso é nulo; Acompanhe o código abaixo, no documento server-side: addCommandHandler("on", function(playerSource) if (isObjectInACLGroup("user." ..getAccountName(getPlayerAccount(playerSource)), aclGetGroup("Staff"))) then outputChatBox("Ei "..getPlayerName(playerSource).." Você é um staff!") end end ) Para entender melhor como funciona o addCommandHandler, acesse https://wiki.multitheftauto.com/wiki/AddCommandHandler.
    1 point
  15. Wow, I'm very happy to see my scripts are still relevant, thanks! But it can be a negative thing as well, I mean it wasn't supposed to end up this way, back then I tried to improve the script, then I tried to make a new, a more advanced ped system from scratch but didn't have enough time, and to make things even worse, the code I wrote then looks horrible to me now So happy to feel appreciated, yet the fact that everyone's focused on my work that still wasn't satisfying enough to myself, gives me this unpleasant feeling that I gotta clean up this mess, gotta finish the work I once started but I don't know when I'm going to try scripting on MTA again Conversion of game paths to my path format sounds interesting, but making my own paths instead of converting the ones from the game was the reason I came up with my format and traffic editor to begin with. I was having trouble understanding some things in the game's format, and the paths have things like multiple nodes in a straight line, which needlessly uses more data. Now, to the documentation details. node_conns tells the connection ID from node IDs. That is, node_conns[node1_id][node2_id] = connection_id. Also, node coordinates are decimal fixed-point numbers, not floats, and RX/RY each takes 2 bytes as opposed to 4. Reading the value as integer and dividing it by 1000, you get the actual value. I had some problems converting between bytes and floats, and integers were faster to process. Finally, traffic lights. The value 3: "PED" means red for all cars, and that's when the peds cross the road. Normally it would work according to pedestrian traffic lights, but as far as I know, those are neither synced, nor scriptable - at least they weren't when I made the resource.
    1 point
  16. We have decided to open a new subforum for our Chinese-speaking players. Feel free to participate in it and tell your friends about it. Please let me know if the forum name needs correcting (right now it should be Simplified Chinese, but I would like to use more general term - just 'Chinese language' or something). We are also looking for moderators to help us manage this forum. Candidates are required to know both Chinese and English languages pretty well, so they can smoothly communicate with us and the community. -- Translation provided by cocowen 我们决定为中国玩家开放一个子板块,希望大家踊跃参与并转告你们的朋友 请告诉我论坛的中文名称是否准确(目前子板块名称是简体中文,但是我希望能够更加的常规一点,比如'中文语言'或者其他的翻译) 同时我们也在寻找制作组帮助我们管理论坛,候选人需要同时有比较好的英文和中文,这样我们才能更好的交流,也能更好的在论坛交流.
    1 point
×
×
  • Create New...