PDA

View Full Version : Spawn Bug - HELP


SilencedPistol
28/05/2013, 10:09 PM
I defeated this months ago but now I've forgotten how. It's most likely simple.

Anyway, when I type my password into my dialog it brings me to a thing with a Left arrow and a Right arrow and then a button called Spawn. If I click Spawn straight away it makes my screen flash yellow/black with a message STAY WITHIN THE WOLRD BOUNDS! - but if I click the spawn arrow like 5 times and click Spawn, it spawns me under Blueberry with me falling.

Help please.

Konewka
28/05/2013, 10:37 PM
There is definitely a problem with whether SpawnPlayer function or SetSpawnInfo. If you use those in one place for too many times it will basically tell the server that it's not sure where you want to spawn. You should rewrite your code and look for any of these problems.

IceCube!
28/05/2013, 10:46 PM
Are you using this function in your mode?

SetPlayerWorldBounds()
SetWorldBounds()

??

SilencedPistol
28/05/2013, 11:31 PM
No Icecube.

I really need this fixed.

IceCube!
29/05/2013, 12:07 AM
Add this command to your mode....


CMD:test(playerid)
{
SetPlayerPos(playerid, 0, 0, 0);
return 1;
}


Report back what happens, it would also be helpful if you tried driving to the edge of the map. In my eyes it has to be the player boundaries but if you say its not its not. I can be a lot more helpful if you at least provided me with the code to spawn the player.

SilencedPistol
29/05/2013, 12:10 AM
The code to spawn is this.


public OnPlayerRequestClass(playerid, classid)
{
SetPlayerCameraPos(playerid, 1743.0819,-1860.4438,13.5787);
SetPlayerCameraLookAt(playerid, 1743.0819,-1860.4438,13.5787);
SetPlayerPos(playerid, 1743.0819,-1860.4438,13.5787);
return 1;
}

Here's the other part.


public OnPlayerSpawn(playerid)
{
if(PlayerInfo[playerid][pBanned] == 1)
{
SendClientMessage(playerid, COLOR_RED, "ERROR: You are banned from this server.");
Kick(playerid);
}
else return SendClientMessage(playerid, COLOR_INFO, "Welcome to the server!");

SetPlayerColor(playerid, COLOR_WHITE);
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername));

new skin = PlayerInfo[playerid][pSkin];
SetPlayerSkin(playerid, skin);

printf("[ %s ] has spawned", playername);
return 1;

}


EDIT: the /test command takes me below Blueberry and I fall.

DobbysGamertag
29/05/2013, 12:15 AM
Added any classes?

SilencedPistol
29/05/2013, 12:16 AM
No classes, nope.

IceCube!
29/05/2013, 12:18 AM
Well the position you have provided us with is inside LS... around the LS PD and airport area... therefore I wouldn't expect you to set world boundaries around here. You have not displayed any boundary, the SAMP default is 20k, 20k, 20k which wouldn't be interacting with this and telling you your at the world boundaries.

This leaves one thing, and that would be that the world bounds have been set in your mode or a filterscript; there is nothing other that would set the boundaries like this. If you cannot find this code I suggest you CHECK everything...

If you would like assistance and have an Active Team Viewer account I'll be happy to check this out for you.

SilencedPistol
29/05/2013, 12:18 AM
Plus, after I fixed the bug I still had to click the Spawn button to spawn. I was wondering if there was a way to completely remove it and when I log in through dialog it takes me straight to the spawn point without pressing no Spawn button.

EDIT: ^ I've fixed this before, I don't think it's the world boundaries. I think it's just a SetPlayerPos spawn bug, but I aint sure. Do you need any other bits of code to look at?

IceCube!
29/05/2013, 12:20 AM
SpawnPlayer(playerid); ^ To the question above.

HurtLocker
29/05/2013, 12:21 AM
Added any classes?

Take a better look on dobygamertag's post...

DobbysGamertag
29/05/2013, 12:21 AM
No classes, nope.

Try this

AddPlayerClass(164,0.0,0.0,0.0,0.0,0,0,0,0,0,0);


See if it works then ;)

IceCube!
29/05/2013, 12:23 AM
Try this

AddPlayerClass(164,0.0,0.0,0.0,0.0,0,0,0,0,0,0);


See if it works then ;)

DOes the same as the command I offered, set the player to 0, 0, 0 but this wouldn't mean that the boundaries are set here... I was assuming he was spawning outside the default 20k boundaries.

He also has an RP mode which means I highly doubt he uses any classes what so ever...

HurtLocker
29/05/2013, 12:23 AM
Added any classes?

Take a better look on dobygamertag's post...

EDIT: this post was accident, admin please remove it.

IceCube!
29/05/2013, 12:25 AM
Take a better look on dobygamertag's post...


He has an RP mode, I highly doubt he uses any classes... He never said "I don't spawn at LS Train Station" he said the boundaries are fucked. The classes have nothing to do with this according to OP, he already stated he has no classes.

HurtLocker
29/05/2013, 12:27 AM
But classes give the initial spawnpoint. Concerning the virtual world i have nothing to say.

IceCube!
29/05/2013, 12:35 AM
Yes but very few RP modes HAVE classes, my RP modes have NONE. The player information is loaded differently some use classes granted by the OP said.

No classes, nope.

Did he not? I'm sure he did! Please read the topic and take the mode he is running into consideration! Why do I have to argue before I can hep someone!

The players aren't being spawned OUTSIDE default bounds AKA 20k, 20k, 20k... If they were he'd say "I SPAWN IN THE OCEAN IM a COMPLETE FUCKING NEWBIE MOTHER FUCKING HELP ME". He isn't saying that his issue is bounds set else where in the gamemode or a filterscript Geez.

SilencedPistol
29/05/2013, 12:35 AM
When I added the playerclass with my X,Y,Z spawn cords, the problem stopped for some reason and I can now spawn with the click of the SPAWN button. It's a RP script, so I don't want classes, is there a way I could fix it and remove the Spawn button and arrows?

IceCube!
29/05/2013, 12:37 AM
Yes but it spawns you at 0,0,0 DRIVE to the spawn point where your player usually spawns and the problem should still occur, this wouldn't be caused by classes.

EDIT: Well I cannot be arsed with this topic anymore I've already waited about about 40 minutes to help you find a solution! I'm going offline.