Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/10/17 in all areas

  1. Hi. I noticed new MTA version allows specifying headers in fetchRemote, so I could finally implement spotify remote controller (control locally running spotify from the game). I want to share the possibility with you, so here goes.. This is not ready for public use! Download https://www.upload.ee/files/7552466/_spotify_.zip.html Extract [spotify] inside server resources Start Spotify on same computer where you run the game. In MTA server, run one of (or all): spotify_cli, spotify_gui, spotify_notifier, spotify_status In MTA client permanently accept domain access for "open.spotify.com" (this is used anonymously, to get oauth token, MTA client has no spotify session data from you). You might need to reconnect to the server after that as I haven't handled the domain access. Troubleshooting/Feedback: * You might need to change the "starting port" in spotify_api/api.lua, line 42 from 4380 to something else, like 4371 (there currently seems to be a bug with port scanning because on my computer spotify was listening on two ports, both of them responded to version check, but actual status request failed on one of them. Will deal with that definitely if I have some feedback, like which ports people are using and which one is working for them) * New MTA version has "localhost" whitelisted by default. If it's not you will get prompt to whitelist it. * Currently spotify_api connects automatically on client resource start, but there is usecase where user alt+tabs out of game, starts Spotify and then we would like to try connecting again. Maybe you have some good ideas how to design the API for that - should it automatically retry connecting (if not connected) on any exported function call? Also, maybe there is good usecase that connecting should not be done on resource start at all and is deferred until really needed. Currently there might be substantial delay finding the correct port though, because fetchRemote timeout argument doesn't seem to have any effect, so the timeout is really slow (around ~1 sec) for each port. In given zip file it's not an issue as it is trying range 4380-4381 Unfortunately, the spotify remote control API that this resource is using, supports only few basic commands: starting specific track (in specific context (context not implemented in my resource yet)), pausing, resuming and getting current status (and track) info. That is all. No seeking, no volume change, no prev/next track (unless you know what is prev and next, and just play those tracks). Nevertheless the existing commands alone are pretty nice to have. My goal is to publish the spotify_api and let others implement their own usages (either incorporated into gamemode - i.e each map has it's own music; or create some nice GUI controller for the music). Provided spotify_cli and spotify_gui are just dumb interfaces so I know the API is actually working and designed ok. Provided examples: spotify_cli Adds commands to play specific track/playlist/album uri; play; pause. Type command 'spotify.commands' to see list of possible commands. spotify_gui Press 0 (as in zero) to show playlist GUI with play and pause buttons. Click on song name to start playing it. spotify_status Permanently shows current playing song and seek position. spotify_notifier Similar to spotify_status, but pops up only for few seconds when new song started and does not include playing time.
    2 points
  2. برنامج لفحص ملفات رول بلاي وتأكد من عدم وجود ملفات ملغمة تعطي صلاحيات وتعدل على الأدمن , يمكنك تحميله مجانا وفيديو يشرح طريقة العمل http://fpsserver.com/f1/news.php?read=35
    2 points
  3. سلام عليكم ورحمة الله وبركاته كيف الحال ؟ عساكم بخير , اليوم قررت اسوي شروحات كيف تبرمج بوت ديسكورد , لأن ما شفت عربي يسوي شرح كيف تبرمج بوتات ديسورد فقط تركيب بوتات وتضبطها على اعداداتك , فاليوم حاب اعلن عن دورة كيف تبرمج بوتات الديسكورد بالتفصيل ان شاء الله أتمنى من الكل وضع اللأيك في المقطع عشان يوصل للغير .. وسلام خير الختام : )
    2 points
  4. Did you guys enjoy the video? The second part is getting closer.
    2 points
  5. Hello I created this program that will detect files/script that may have backdoor commands such as making your self admin if you type it, it is still in an early stage I will keep updating this program so it can find more backdoors. Download Program Thank you
    1 point
  6. اظن, انك مو حاطط إسم فكشن في 2 سطر
    1 point
  7. 1 point
  8. load/loadstring can indeed not load compiled scripts. Only pure uncompiled lua strings.
    1 point
  9. استخدمتو و ما اشتغل بردو ملحوظة انا قافل Play و فري روم لن انا مسوي جيم بلاي و شغال و كل شييء بس ما اعرف سبب هي المشكلة
    1 point
  10. addEventHandler("onPlayerChat",root, function () for _,players in ipairs ( getElementsByType ( "player" ) ) do if ( getPlayerAccount( players )) then if isGuestAccount( getPlayerAccount( players )) then cancelEvent() outputChatBox( "[Login-System]#ffffffYou should login to talk in chat . ",source,255,255,0,true) end end end end)
    1 point
  11. Thanks, I could fix it with the idea that u gave me. Otherwise, is there some problem with load and loadstring to not to laod copile scripts ? I have uploaded a map on my server which has copiled scripts and when I use load or loadstring functions it doesn't load the scripts.
    1 point
  12. addEventHandler ( "onClientGUIChanged", resourceRoot, function ( ) if source == edit2 then if not tonumber(guiGetText(source)) then guiSetText (source, "") end end end )
    1 point
  13. Maybe I would use that function when the gamemode will be done in order to add web functionalities.
    1 point
  14. Once again outstanding amount of details, keep it up mate!
    1 point
  15. getRootElement() is the same as root btw.
    1 point
  16. Hello community! Update 0.7 is live on the server right now. Lots of things were added, some were changed and I'll list the most important below. But first, I want to detail something that turned out to be less intuitive than I hoped: in order to find loot you need to break the destructible boxes scattered on the map. You will find these boxes in all places where loot would be in other survival gamemodes. Just look around you when you spawn. Breaking other types of destructible objects may yeld metal, wire or wood depending on the object type. Use the RMB + F combo to break any loot box in one hit. Hold F1 in game for a reminder of this and to see all other default keys. Another common issue: the map is very dense (60k objects) and unless you have a good spec computer I highly suggest to lower your video settings, otherwise you'll get FPS drops and stuttering in heavily mapped areas. Your character has three lives. Each time you're wasted you lose one life and your inventory and current xp reset, but you get to keep the level you achieved. When you are wasted and have no more lives left you are dead for good: your "alive time" counter and character progress reset and you are presented again with the class selection screen. It's game over, man! However, you can avoid the "character death" by sleeping in safe camp beds for 2 minutes to regain one life, with a 10 minutes cooldown between sleep cycles. So, while you can lose your character, this should only happen if you are reckless - or misfortunate. To get to the big news: there is a persistent storage system in place, finally! Containers are split into three types: strongbox, stockpiles and vehicles. The strongbox is your personal 100 slots container, accessible only to you from multiple safe camps in the game world, just like a bank account. Stockpiles are 10 slots containers that you can craft and place anywhere in the game world; they can be picked up and carried around, loaded in pickup trucks and moved to a different location etc. Stockpiles can be used (and stolen) by anybody that can find them. And last, all vehicles now have a variable amount of item slots available (2 to 30, depending on their model). Zombie infection now works in two phases: a 'silent' first stage with no symptoms and a second one that deals hp damage every couple of seconds until you are dead. There's an experimental cure for it, a drug named ZomboKleen™. It may give unexpected side-effects or even not work at all - this is not a bug, it's intended. Loot and dose it freely, no prescription required User interaction improved: most of the interface converted to DX, a new Survivor Map with useful survival information, a progress bar for all time-consuming actions, various interaction sounds. Improved compatibility with lower resolutions; the lowest supported screen resolution is 800X600. Most of Dystopia's keys are now bindable through the MTA settings menu. You can also use Ctrl + LMB as an alternative for MMB. 'Play as guest' option discontinued; you'll need to make an account to play, but it's a one-time process that takes less than 10 seconds. Four of the five factions are joinable by various means. You can jump from Scavs to Bandits and back by killing your own faction members, become a Raider by eating your fellow men or voluntarily join the Establishment by taking the medical exam at the military base South Gate. CDF will become joinable later, with a further update. These arrangements are temporary, until I deploy the karma-based faction join system. (planned) The map is almost completed. Some important missing parts were added: South Las Venturas is a proper wasteland now, with a huge nuke crater, collapsed buildings, mounts of ash and sand dunes. The Bayview Enclave is the new home of the rich elite, trying to maintain their high life standards under military protection. Area 69 is an impenetrable fortress with heavy NPC defences and the lively Refugee Camp near it is patrolled by nightstick wielding Peacekeepers. There are literally hundreds of detailed roleplay friendly locations on the map. Every place in the world was changed by and for the apocalypse. From overgrown corners of nature to the urban jungle of Los Santos, you have the whole San Andreas to explore. Be ready to put up a fight, there are over 2000 NPCs waiting to kill you, not counting zombies, bears and traps. You can roam the map, explore, survive, loot and fight your way through just like you would in a single player game, only that with MTA is better since you can... umm... stop playing with yourself I want to give props to @Karim02 (who contributed to Dystopia since I made the project public and also moderates the alpha server) and @Noah_Antilles (who built awesome custom models and provided ideas for the project) and also all other people that gave feedback, suggestions or just played the gamemode. Thanks for reading and see ya all out there! Join our Discord channel (https://discord.gg/p58wRy8) to keep updated with news, plans & media and to share feedback and ideas.
    1 point
  17. You need to add the dxVisible var to your clicking event so it only executes if dxVisible is true. Like this: function onClick(button, state) if dxVisible and (button == "left") and (state == "up") then -- check if dx-rectangle is showing here if isMouseInPosition( 490, 284, 116, 47 ) then outputChatBox ( "Машина заспавнена!" ) --car spawn createVehicle(434,x,y,z) y = y + 5 elseif isMouseInPosition( 737, 284, 116, 47 ) then outputChatBox ( "Вы сменили скин!" ) --skin change setElementModel ( player, 25) end end end addEventHandler( "onClientClick", root, onClick )
    1 point
  18. you need add this function in your script function isMouseInPosition ( x, y, width, height ) if ( not isCursorShowing( ) ) then return false end local sx, sy = guiGetScreenSize ( ) local cx, cy = getCursorPosition ( ) local cx, cy = ( cx * sx ), ( cy * sy ) if ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) then return true else return false end end
    1 point
  19. Put a debug or outputChatBox function on top of the code you are loading, just to be sure.(onClientResource start event doesn't trigger once loaded, only for other resources) If that doesn't work, debug results of the pcall function: local status, err = pcall(loaded) iprint("status:",status,"error:",err) And don't be afraid to call the function manually: loaded()
    1 point
  20. @MR.StoRm اخي رجاء في حال واجهتك مشكلة يرجي طرحها في موضوع جديد لأن هذا الموضوع للإستفسارات البسيطه ولا نود ان نزيد هذا الموضوع صفحتين او ثلاث متعلقه في مشكلتك انت فقط !! #Edit: تمت إزالة تعليق مستر جراند لأنه في المكان الغلط , ويجب عليك إنشاء موضوع يختص بإستفسارك @MR.GRAND وبالتوفيق
    1 point
  21. addEventHandler ( 'onPlayerChat', root, function ( ) cancelEvent () end) جرب ذا لو طلع الكلام في الشات معناها في شئ غلط لو ماطلع معناها في شئ غلط من التحققات اللي سووها فوق
    0 points
  22. اجربه ليش يعني مثلا ؟ انت مجربه بنفسك ؟ طيب وش المشكلة ؟؟ اذا جربته بنفسك اكيد بيشتغل لأنك الوحيد الموجود في السيرفر + حتى لو انك مو بنفسك وفي احد معك في السيرفر مو مسجل بيطلع لك الرسالة لأنك تتحقق من الكل اذا هم مسجلين او لا كودك غلط لأنك تتحقق من الكل addEventHandler ( 'onPlayerChat', root, function ( ) if ( isGuestAccount ( getPlayerAccount ( source ) ) ) then cancelEvent ( ); outputChatBox ( '[Login-System]#ffffffYou should login to talk in chat . ', source, 255, 255, 0, true ) end end ); + تأكد انه في السيرفر سايد
    0 points
  23. جرب كذا addEventHandler("onPlayerChat",getRootElement(), function (player) local acC = getPlayerAccount(player) if isGuestAccount (acC) then cancelEvent() outputChatBox( "[Login-System]#ffffffYou should login to talk in chat . ",source,255,255,0,true) end end) او اقولك جرب حق هيمو لان حقي ما فيه فرق
    0 points
×
×
  • Create New...