StaceyBeeGTA Posted June 6, 2018 Share Posted June 6, 2018 Hi guys I'm still new to this so forgive me if this is dumb, but..... I'm wondering how you can trigger /start "resource name" while playing in a server. Like: if player position = x**** y****z**** then start resource (or something like that, for example). Preferably triggered between coordinates, like: if player coords = between y100 and y200 then start resource. and with something like this on the end: if player coords > or < than (y100 - y200) then stop resource. I don't know C# very well so can someone translate this to actual script because I'm just making sh*t up as I go along I'm not sure if what I am saying even makes sense, it does in Staceyland where my brain is Link to comment
WorthlessCynomys Posted June 6, 2018 Share Posted June 6, 2018 What would you want to achieve? Link to comment
StaceyBeeGTA Posted June 6, 2018 Author Share Posted June 6, 2018 Many things over time, but right now I am building a huge island in max with a mansion in the middle and a race track going around the outside. I will have all of my modded cars parked up outside the mansion, but say I wanted to create another racetrack across town and want to use different custom cars but with replacing the same original vehicle, as I get closer the old custom cars will turn off and new ones will turn on. Same with handling lines, weapons, replaced models, maps ect ect. It'll be good to switch switch between them based on your location, or even other things like time or weather, the possibilities are endless. Oh and another this I will do is trigger traffic to spawn and go around the track when I get close enough. 36 AI high poly custom cars endlessly driving around at the other side of map when no one is near is just a waste of cpu. And plus where I have all of my custom cars together when I am far and facing that direction it causes a lot of lag, so I would like them not to load until I am closer so can have less cars on the screen, I know that sounds :~ but if you place the vehicles right you wont see them change. Link to comment
WorthlessCynomys Posted June 6, 2018 Share Posted June 6, 2018 (edited) Well... Those are big plans, I hope you will achieve it You don't have to start resources. I would use collision shapes to detect if a player walks close enough and make a script that changes the necessary things. Edited June 6, 2018 by WorthlessCynomys Link to comment
StaceyBeeGTA Posted June 6, 2018 Author Share Posted June 6, 2018 Thanks Most of it is already made through over projects I have made over the years. It's just optimizing for SA and importing that sucks lol And hmmm I have never used collision shapes as a trigger. Do you know any good tutorials or tips? Link to comment
WorthlessCynomys Posted June 6, 2018 Share Posted June 6, 2018 4 minutes ago, StaceyBee said: Thanks Most of it is already made through over projects I have made over the years. It's just optimizing for SA and importing that sucks lol And hmmm I have never used collision shapes as a trigger. Do you know any good tutorials or tips? Well... Don't use tooooo much of them. It's memory, obviously. They have an event on both server and client side, which can be use easily with addEventHandler on their side. After that it's soooo easy to use them, sometimes it is hilarious. You just have to find the proper functions to do what you want. AND THE ACTUAL TIP Turn on development mode (setDevelopmentMode(true)) and use the showcol command. It will magically make them visible Link to comment
StaceyBeeGTA Posted June 6, 2018 Author Share Posted June 6, 2018 Yup you got that right. Stupid memory. But I guess that is another use for what I am trying to achive. You will never run out of memory if you are switching them off as new ones are being loaded in, even if it has to be triggered with a teleport marker to make it feel a bit more seamless instead of having to wait for resources to load as you are driving. I don't know, I am thinking way too deep into this. I still have to design the garden and textures yet before I'll even be using any of this. And thanks I'll give that a go when I get home from work, I didn't even know about dev mode Link to comment
WorthlessCynomys Posted June 6, 2018 Share Posted June 6, 2018 Just feel free to ask me or anyone on at this place about nearly everything. I can't promise I'll give the best answers, but I'll definitely try ? Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now