1 Fil gillad
778 kommentarer
23 videos
6 Uppladdningar
23 Följare
8145 nerladdade
@ReNNie Yes and No. Let's do a quick summary:
1. This version (immersive). Approach a TV and if it is valid you can turn it on. No notification will be given. Nothing is hardcoded with respect to props/objects or distances or location. A valid TV must have a valid texture for the screen. This is a very accurate approach.
2. Adding notifications: Similar to above but will trigger false alarms when it encounters any prop including a chair, a table, etc. So notifications would be triggered constantly. The solution? The easy solution, the one I want to avoid, is to have a list of valid props. Why avoid it? Because there are hundreds of potential candidates and not all are valid TVs. Potential candidates means props with keywords such as: TV, cinema, movie, display, screen etc. A list can be found from Durty below.
3. Ideal solution for Item 2, with notification: Find a method to identify a valid TV without hardcoding and without a list. Conceptually this could be done in 2 ways, not sure if either is feasible.
- identify the prop and ensure it is valid and if so give notification (again challenge is to do without a list). This would be accomplished by parsing the prop name (converted from a hash/integer/hex id) looking for keywords like TV or movie
- identify if the prop has a valid texture/render target (called tvscreen).
I don't want to do anything half-assed, so this will be on back burner for now until time allows some R&D.
https://github.com/DurtyFree/gta-v-data-dumps/blob/master/ObjectList.ini
Finally, with respect to your prop in the image. The current script will work with it, without hard coding its name, if the prop is a valid TV. If it is not a valid TV, you can try to rename the texture, usually embedded, so it has script_rt_tvscreen as a name. You can see some discussion around this in the thread with @JoyLucien who actually tested this.
@skeeze415 Yes, Spawn the TV with a trainer (or script) and then I used Menyoo to attach it to the boat and then from the attachment screen i adjusted the 6 coordinates.
@BaadmanDeezy If only life were that easy. Unfortunately, no, that's not how it works and not that simple. Most FiveM scripts are lua but you will see some c# dll files. FiveM uses CitizenFX.Core. The quick answer is no, what you're doing will definitely not work. The methods to run SP scripts in FiveM will depend on whether you're using localgame or not. I'm not sure, I've done all my FiveM scripts with lua, actually one or two dlls.
@gtavjamal btw, the TV in the script (and in the video) is a vanilla one called prop_tv_test
@gtavjamal There are a few mod TVs here as well. I haven't looked at tablets yet, to see if they could support TV. For a car you would ideally need something smaller like a tablet. Again, you can also use props like this one although I haven't tried it
https://www.gta5-mods.com/misc/new-old-tv-for-trevor-s-trailer
@ReNNie I haven't forgot your request for notifications. The issue is to eliminate false alarms from non TV props. As discussed the simple solution is to create a list of valid props. The challenge is can this be done without a list.There are 2 options that come to mind. One is to return the prop name and parse it for keywords such as TV, Screen, Display, Cinema, or Movie. The issue here is that there isn't any guarantee a vanilla prop can play a TV show. Another option is to somehow determine if the prop has the proper render target. The epic fail option, although it might be the most realistic, is to hardcode the props are put them in a text file to be read by the code. This has its own challenges again, because there are hundreds of props that might be candidates, and most will fail.
@PwnageSoldier glad to help
@elsanhoty That's great. Remember that i had made a mistake naming the ini file in the first version. You can name an ini file whatever you want if you specify the path but in this simple case it needs to have the same name as the .dll
@PwnageSoldier Done. @ReNNie has suggested this but I was hoping to find a solution of have notifications, for those who desired it, and I haven't found a solution yet - other than doing this by prop list.
@a012345 At time of writing this, the last update was 16 hours ago. If the TV does not turn, by default with the E key, here are some possible reasons:
1. Your player is not close enough to the TV
2. You have a conflict with the E key
3. Your key is not set to E in the ini file which looks like this:
[Settings]
Menukey = End
PowerOnKey = E
SwitchChannel = Q