-
Posts
740 -
Joined
-
Days Won
16
Everything posted by Tails
-
A new fix has been released for Cinema Experience. Due to another update to Youtube TV a few major bugs were introduced again, unfortunately. Changelog: - Fixed video playback due to guest screen not being clicked through - Fixed an issue where skipping a video would prevent the next video from playing. - Improved button check performance On going issues: - Ads are no longer blocked (The MTA client used to block them, hopefully it's a per client issue and not a global thing) - Very long 20-40 second ads sometimes keep appearing everytime a new video starts Let me know if you find any other issues or if you exerperience any problems with the ads or none at all. All feedback is appreciated, good or bad. Get the latest version (v2.3.3) here: https://community.multitheftauto.com/index.php?p=resources&s=details&id=12950
-
@IIYAMA I think OP was referring to the status of the download. @Whizz You can get the download status with the OnClientTransferBoxProgressChange event See here: https://wiki.multitheftauto.com/wiki/OnClientTransferBoxProgressChange
-
In my second example I used data[j] but you can just put dataValue there. either way is fine.
-
Could you share the structure of your tables and what you're trying to match exactly? table.find is not a function in Lua, you have to either run another loop or if the data table has the same structure you can do this: for i, v in ipairs(numbersTable) do if data[i] and data[i] == v then print('match found', v) end end or maybe with a loop: for i, numbersValue in ipairs(numbersTable) do for j, dataValue in ipairs(data) do if data[j] == numbersValue then print('match found', v) break end end end It all depends on how your tables are structured and how you want to match it, it's kind of hard to guess what the best approach is.
-
I fixed the guest screen click through once again! Apparently it's the same as before again, but I had removed the old click positions. Btw, this means the old version (2.3) is once again working, but I pushed an update regardless. It has the new positions in it, as well as a dev tool to easily add new click positions in the future. Hope everything will keep working now. Download v2.3.2 here.
-
So, I must have made a stupid mistake before with the click positions thinking that clicking was no longer possible. This was a mistake, I have fixed the code and added the new click positions because the guest screen was changed by Google. It should now be bypassed correctly. Sorry for any inconvenience. Let me know if you still encounter any issues and any other screen/popups that need to be bypassed. Send a screenshot here and I will try to fix it. Download the new fixed version 2.3.1 here or here: https://community.multitheftauto.com/index.php?p=resources&s=details&id=12950
-
I opened up an issue on Github: https://github.com/multitheftauto/mtasa-blue/issues/3395
-
@Pitbulltm It seems that mouse clicks are no longer possible for the account selection screen on YoutubeTV, including the guest button, so that's why the screen stays visible when playing videos. I have already a system in place that automatically clicks the screen, but YouTubeTV's elements apparently can't be clicked on anymore. The arrow keys and enter key, however, still work. Unfortunately, there is no function in MTA:SA to automatically inject key presses into the browser besides mouse clicks, so there isn't much I can do at the moment and I can't think of any workaround either. If you or anyone knows about any workaround/fix, please let me know. I'd be happy to implement it.
-
Thank you very much. Could you show me a screenshot of what you see? I don't think it's the API, it has to be something related to YoutubeTV. Also I recommend using your own Youtube API key https://console.cloud.google.com/apis/library/youtube.googleapis.com?hl=en-GB
-
@MGO_SA @Magiz0r @Reda_Iq @CarCrasher @Woffi1221 @Lt.Price @MoHaRx @Marinovv @DreaM40BG I pushed a small update to Cinema Experience (version 2.3) on March 20th, 2024. This is mostly a release to fix some long standing issues. The changes include: Fixed video playback issues with auto click through and ad skipping Improved screen resolution from 360p to 1080p Smoothed ambilight color transitions Unlocked Audio Toggle and Change View settings Added screen aspect ratio adjustment in settings Added YouTube Shorts support (.com browser only) Minor UI and texture updates Fixed hud compatibility issue Fixed some multiplayer sync issues A couple of new features added as well: onscreen video start messages, and the ability to Change View to look directly at the screen. I also cleaned up some unused settings and code. Note that if YouTube TV acts up, you can try enabling the embed video fallback by setting useEmbeds=true in shared.lua. This may cause some videos to error out though due to an embedding issue which is unfixable. You can download the updated version here. Let me know if you run into any other issues. Enjoy!
-
Hi, this is likely a problem with your spawn code. In your code add an event called onPlayerSpawn for server or onClientPlayerSpawn for the client side and use the function fadeCamera. Here is an example for the client side: addEventHandler('onClientPlayerSpawn', localPlayer, function() fadeCamera(true) end) See here for more details: https://wiki.multitheftauto.com/wiki/FadeCamera
-
Because @FLUSHBICEPS made a tiny mistake. The event doesn't return the player, it returns the damage the vehicle took. What you need to do instead, is use the getVehicleOccupant function to get the player. See https://wiki.multitheftauto.com/wiki/OnVehicleDamage for more info and an example.
-
You can use getCameraMatrix: https://wiki.multitheftauto.com/wiki/GetCameraMatrix and setCameraMatrix https://wiki.multitheftauto.com/wiki/SetCameraMatrix
-
I think what you're looking for is a continuous list addEventHandler( "onClientKey", root, function(b, state) if b == "arrow_u" and state then table.insert(skinTable, 1, table.remove(skinTable)) playSoundFrontEnd(1) elseif b == "arrow_d" and state then table.insert(skinTable, table.remove(skinTable, 1)) playSoundFrontEnd(1) end end) local x,y = 0, 0 local sx, sy = guiGetScreenSize() local maxShownItems = 7 local selectedItem = 4 --use middle item as the current selected item addEventHandler("onClientRender", root, function() for i=1, maxShownItems do local xy = (i)*55 -- draw rectangle behind text dxDrawRectangle(x, y+xy, 200, 50, tocolor(0, 0, 0, 125)) if i == 4 then -- selected item dxDrawRectangle(x, y+xy, 200, 50, tocolor(255, 0, 0, 125)) dxDrawText(" "..skinTable[i].name.." "..skinTable[i].price.."$", x, y+xy, x+200, y+xy+50, tocolor(255, 255, 255, 255), 1.5, 'default', 'center', 'center', false, false, true, true) else -- the other items dxDrawText(" "..skinTable[i].name.." "..skinTable[i].price.."$", x, y+xy, x+200, y+xy+50, tocolor(255, 255, 255, 255), 1, 'default', 'center', 'center', false, false, true, true) end end end) This is pretty standard for these types of lists (ignore the styling)
-
Maybe use + in your calculation instead. Or paste your loop here so we can look at it.
-
Hi Snow-Man, Just do something like this: local startIndex = 1 local maxShownItems = 3 addEventHandler('onClientRender', root, function() for i=startIndex, startIndex+maxShownItems do local y = (i-startIndex)*20 dxDrawText(skinTable[i].name, 0, y, 100, 100) end end) And then add or subtract 1 to the startIndex on a key press addEventHandler('onClientKey', root, function(key, p) if key == 'arrow_u' and p then if startIndex > 1 then startIndex = startIndex - 1 end elseif key == 'arrow_d' and p then if startIndex+maxShownItems < #skinTable then startIndex = startIndex + 1 end end end) Hope this helps.
-
Yes with dxDrawText and onClientRender event (see: https://wiki.multitheftauto.com/wiki/DxDrawText) local sw, sh = guiGetScreenSize() addEventHandler('onClientRender', root, function() dxDrawText('hello', 0, sh-25, sw, sh+25, tocolor(255, 255, 255, 150), 1, 'default', 'right', 'top', false, false, true) end) I think this should work. You may have to play around with the x,y,rightx,bottomx values to get it right though, I just wrote this off the top off my head.
-
You have to shut down your server safely with ctrl+c in windows, or shutdown command in the server console. If the server is stopped abruptly, onResourceStop will not be triggered! To avoid losing data in the instance your server crashes, I highly recommend saving important player data such as money every time you update something.
-
Definitely first one. I would format it like this though, with the start of the function on the same line. It's the common way of writing it because you'll have less indentation. addEventHandler("onClientGUIClick", window, function(button, state) if button ~= "left" then return end if source == btnClose then return closeMenu() end if source == btnChange then local AmountKey = guiGetText(EditKey) if AmountKey == "" then return outputChatBox("error", 255, 25, 25, true) end if string.len(AmountKey) ~= 16 then return outputChatBox("error", 255, 25, 25, true) end outputChatBox("successful", 255,126,0, true) closeMenu() end end) Good luck!
-
SetElementData is data stored on the player temporarely, if the player logs off, or the server shuts down, you will lose that information. It is stored inside GTA memory and is synced with all players and the server unless specified otherwise. SetAccountData only allow you to insert key/value pairs into a fixed db. You have no real control over it, and with lots of data this could be bad for performance because it'd need to do a lot of queries (via getAccountData) for each key/value pair that you saved to a player account. MySQL allows you to structure your database and gives you control over what you put in your database and how you modify and query the data. You can also access the data from other places like a website. This will give you the best optimization. If you're new or uncomfortable with MySQL you could try using SQLite instead, which creates a new .db file for you which you gives you similar control over it as MySQL except that you don't have a address from which you can access it. I recommend this if you're new and want to try out MySQL for the first time. You don't have to install MySQL to your desktop or server with this option. You can use setAccountData for small gamemodes if you don't need to store a ton of data per user, otherwise use MySQL or SQLite. Hope this helps.
-
Make sure that resource with the log function is started, preferably before the other resource.
-
Is that the fv_logs resource? Make sure to add this line: <export type="server" function="createLog"/>
-
Make sure you have exported the function createLog in the fv_logs resource meta.