Spawn Bug - HELP - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Spawn Bug - HELP (
/showthread.php?tid=440224)
Spawn Bug - HELP -
SilencedPistol - 28.05.2013
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.
Re: Spawn Bug - HELP -
Konewka - 28.05.2013
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.
Re: Spawn Bug - HELP -
IceCube! - 28.05.2013
Are you using this function in your mode?
SetPlayerWorldBounds()
SetWorldBounds()
??
Re: Spawn Bug - HELP -
SilencedPistol - 28.05.2013
No Icecube.
I really need this fixed.
Re: Spawn Bug - HELP -
IceCube! - 29.05.2013
Add this command to your mode....
pawn Код:
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.
Re: Spawn Bug - HELP -
SilencedPistol - 29.05.2013
The code to spawn is this.
pawn Код:
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.
pawn Код:
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.
Re: Spawn Bug - HELP -
DobbysGamertag - 29.05.2013
Added any classes?
Re: Spawn Bug - HELP -
SilencedPistol - 29.05.2013
No classes, nope.
Re: Spawn Bug - HELP -
DobbysGamertag - 29.05.2013
Quote:
Originally Posted by SilencedPistol
No classes, nope.
|
Try this
pawn Код:
AddPlayerClass(164,0.0,0.0,0.0,0.0,0,0,0,0,0,0);
See if it works then
Re: Spawn Bug - HELP -
IceCube! - 29.05.2013
Quote:
Originally Posted by DobbysGamertag
Try this
pawn Код:
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...