What happened to Vehicle.SetGhost? It's not in the wiki but it is in the source code. Does it also have anything to do with making this (http://youtu.be/Evh_RvG9ti8) possible? If no, then how do I achieve what storm did and what Vehicle.SetGhost was suppose to do?
Did you even try that function ?
You didn't, because if you would have tried it you would have know that it works just like Stormeus shown in his video.
About the wiki... it is very uncomplete. When I will have more free-time, I will try to complete it as much as I can.
I wouldn't have made this topic if I haven't already tried it out already. So accusing me of not trying is probably not wise. My code was very simple. player.Vehicle.SetGhost( true ); I got an error message saying that SetGhost() isn't a member variable of Vehicle. That and the fact it wasn't in the wiki lead me to believe something happened with it.
Try this:
player.Vehicle.IsGhost=true;
Quote from: Danix on Jan 11, 2015, 01:58 PMTry this:
player.Vehicle.IsGhost=true;
You shouldn't chain anything on player.Vehicle because it might return null. Make sure to at least check before doing that.
if (player.Vehicle != null) player.Vehicle.IsGhost=true;
Quote from: S.L.C on Jan 11, 2015, 02:15 PMQuote from: Danix on Jan 11, 2015, 01:58 PMTry this:
player.Vehicle.IsGhost=true;
You shouldn't chain anything on player.Vehicle because it might return null. Make sure to at least check before doing that.
if (player.Vehicle != null) player.Vehicle.IsGhost=true;
I am indeed aware of that, but he asked for the correct usage, not the whole code.
FindVehicle(ID).IsGhost=true/false;
FindVehicle(1).IsGhost=true;
Thanks to everyone who helped but a guy already told me on my server. Still, thanks though.
@S.L.C: I was just testing some feature so I didn't include some of the usual checking stuff. :P
I was just pointing that out. You never know when a newbie will come around and use that code without knowing.
Thanks to Fuzzie, you saved a hell of codes to be implemented in my script which I'm working on by just showing me this function and that video.