Random Spawn Help -
x4hi - 25.08.2014
I have set all of my random spawn i believe. My question is, how do i make it not show my original spawn before it randomly spawns me in my created locations? Do i need to open up debug and make other saved positions to add to new Float:RandomSpawns other than using my current spawns? Sorry, i cant explain it well. I made a video and I will post my code.
http://pastebin.com/VnGJ69CL
https://www.youtube.com/watch?v=gtcq...ature=*********
As you can see in the video I spawn at my original location for each player before the random spawn takes effect.
Whats wrong with my code?
Re: Random Spawn Help -
Mzake - 25.08.2014
Add this under "onplayerspawn"
pawn Код:
new Random = random(sizeof(RandomSpawns));
SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]);
reply if u had bugs/problems
Re: Random Spawn Help -
x4hi - 25.08.2014
Quote:
Originally Posted by Mzake
Add this under "onplayerspawn"
pawn Код:
new Random = random(sizeof(RandomSpawns)); SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]);
reply if u had bugs/problems
|
I have that, here is all of my code.
http://pastebin.com/VnGJ69CL
Re: Random Spawn Help -
Mzake - 25.08.2014
Quote:
Originally Posted by x4hi
|
Well explaine what u need, i cant watch vid for now sorry..
you are looking for when player spawn he get a black screen before teleporting to random spawn then black screen go after he tele??
Re: Random Spawn Help -
x4hi - 25.08.2014
Quote:
Originally Posted by Mzake
Well explaine what u need, i cant watch vid for now sorry..
you are looking for when player spawn he get a black screen before teleporting to random spawn then black screen go after he tele?? 
|
The problem is I see my AddPlayerClass(143,2504.1306,-1683.9012,13.5469,49.8305,0,0,0,0,0,0); position before it spawns me to a random location,like within a blink of an eye. I think the cords from new Float:RandomSpawns[][4] are interfering with public OnGameModeInit() spawn coords because they are the same.
Re: Random Spawn Help -
Mzake - 25.08.2014
Quote:
Originally Posted by x4hi
The problem is I see my AddPlayerClass(143,2504.1306,-1683.9012,13.5469,49.8305,0,0,0,0,0,0); position before it spawns me to a random location,like within a blink of an eye. I think the cords from new Float:RandomSpawns[][4] are interfering with public OnGameModeInit() spawn coords because they are the same.
|
Well idk about this , keep searching :/
Re: Random Spawn Help -
IceCube! - 25.08.2014
It would help if you slowed down the footage, as I think your camera is moving back to the death position before it gets back to the player... I can't tell as I can't pause it in time as ******* is 30FPS.
If it isn't it would be an issue with your AddPlayerClass, this is because it contains fixed spawn co-ordinates. The only way you can fix that is to set skins with SetPlayerSkin, and not to use AddPlayerClass.
Your issue isn't server crippling anyway.
Re: Random Spawn Help -
x4hi - 26.08.2014
Quote:
Originally Posted by IceCube!
It would help if you slowed down the footage, as I think your camera is moving back to the death position before it gets back to the player... I can't tell as I can't pause it in time as ******* is 30FPS.
If it isn't it would be an issue with your AddPlayerClass, this is because it contains fixed spawn co-ordinates. The only way you can fix that is to set skins with SetPlayerSkin, and not to use AddPlayerClass.
Your issue isn't server crippling anyway.
|
how would I go about removing the AddPlayerClass to fix it? Just remove all the addplayerclass and add SetPlayerSkin Function and it would work? Sorry I just woke up and I need that push in the right direction haha.