yMassai Posted May 14, 2012 Posted May 14, 2012 how I could create a script on the spawning of players in three hospitals and when the player is dead, is spawned in the closest hospital. Community Profile MTA:SA = Click Here
Jaysds1 Posted May 14, 2012 Posted May 14, 2012 You could try creating a colshape at the hospital then use isElementWithinColShape(player,thecolshape) My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
Jaysds1 Posted May 14, 2012 Posted May 14, 2012 you could use these: getDistanceBetweenPoints2D() --or getDistanceBetweenPoints3D() My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
Stanley Sathler Posted May 14, 2012 Posted May 14, 2012 You can use a little shit, creating three variables (storing the coordinates of them) and getting the actual player position. So, you create some conditions to choice the more near coordinates. But it is a little hard x] So, maybe you can use as Jaysds said, using getDistanceBetweenPosition2D (or getDistanceBetweenPoints3D) (obs: I never tried use these functions) Software Engineer & Entrepreneur • Running Lustrel and VilarikA • Highly engaged on open source community
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