Spawn player in nearest position

vito

  • Sr. Member
  • Posts: 405
Spawn player in nearest position
« on September 10th, 2016, 03:22 PM »Last edited on September 10th, 2016, 03:23 PM
There is a very tiny trick to help to you spawn player in nearest safe position in the city (not in water/inside building and so on):

Code: [Select]
function SpawnInNearestPos(x, y){
return Vector(x, y, -99999);
}

// Example to use:
FindPlayer(0).Pos = SpawnInNearestPos(12345,6789);
FindPlayer(0).Pos = SpawnInNearestPos(-9876,-54321);

Vice city is using it even for singleplayer to respawn player if he fall under the map.

Since EC implemented it I decided to share it for public.

Actually it has at least one bug with wrong spawn location near north point mall, but I think you can fix it yourself in your own script.

W3aPoN^

  • Full Member
  • Posts: 105
Re: Spawn player in nearest position
« Reply #1, on December 7th, 2016, 11:53 AM »
Thanks but Can you Please Make a Script When a Player Kill Me then i spawn at where i was killed Understand? my English is Bad
if you Understand then can you make it? Thanks in Advance for You Next Replay :D

Cool

  • Hero Member
  • Posts: 719
Re: Spawn player in nearest position
« Reply #2, on December 7th, 2016, 11:55 AM »
Quote from =NK=RazaCharan** on December 7th, 2016, 11:53 AM
Thanks but Can you Please Make a Script When a Player Kill Me then i spawn at where i was killed Understand? my English is Bad
if you Understand then can you make it? Thanks in Advance for You Next Replay :D
Here is a search Button Use it

Bob

  • Hero Member
  • Posts: 777
Re: Spawn player in nearest position
« Reply #3, on December 7th, 2016, 01:24 PM »
Motley points @Stormeus and @Thijn at regards that I think the script/contenet request board was a bad Idea as individuals without the desire to find fun in scripting does not want to do something as simply tiny as
Quote from =NK=RazaCharan** on December 7th, 2016, 11:53 AM
Thanks but Can you Please Make a Script When a Player Kill Me then i spawn at where i was killed Understand?
This is ridicules, I understand it when referring to something you would like to learn more into like

http://forum.vc-mp.org/?topic=3838.msg29414#msg29414

But something so tiny that you could add the players position into an array on death then spawn the player with the coordinates, This is terrible. This is either a kid society where as it is give me - give me, Or they just don't want to learn anything.. I dunno This was a really cool topic that got spamed. In other words It's a fast way to lose respect when needing future help..

Please do not remove the board instead please set a rule that will get your account flagged upon such bs, When the individual hits max flags let the moderators/site admins deal with him