SA-MP Forums Archive
SpawnPlayer(); - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP (https://sampforum.blast.hk/forumdisplay.php?fid=3)
+--- Forum: Bug Reports (https://sampforum.blast.hk/forumdisplay.php?fid=20)
+--- Thread: SpawnPlayer(); (/showthread.php?tid=320794)



SpawnPlayer(); - WackoX - 24.02.2012

When using SpawnPlayer(); you will be kicked.
The temporarly solution is to use SetSpawnInfo(); before using SpawnPlayer();

I did this but i'm still getting kicked..


Re: SpawnPlayer(); - MP2 - 25.02.2012

Show your code.


Re: SpawnPlayer(); - WackoX - 25.02.2012

Quote:
Originally Posted by MP2
View Post
Show your code.
Code:
SetSpawnInfo(playerid, 0, 0, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
And i'm still getting kicked.. SA:MP team fix this! it's so annoying players can't play on my server!


Re: SpawnPlayer(); - BlackBank - 25.02.2012

Quote:
Originally Posted by WackoX
View Post
Code:
SetSpawnInfo(playerid, 0, 0, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
And i'm still getting kicked.. SA:MP team fix this! it's so annoying players can't play on my server!
In which callback/public are you putting the SpawnPlayer and SetSpawnInfo in?


Re: SpawnPlayer(); - Shadow_ - 25.02.2012

I use this on my gamemode i use it on the callback OnPlayerRequestClass and on OnPlayerDialogResponse and it doesn't kick my players. maybe your using it wrong.

pawn Code:
public OnPlayerRequestClass(playerid, classid)
{
    SetSpawnInfo(playerid, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
    SpawnPlayer(playerid);
    return 1;
}



Re: SpawnPlayer(); - EladNahum - 25.02.2012

Quote:
Originally Posted by Shadow_
View Post
I use this on my gamemode i use it on the callback OnPlayerRequestClass and on OnPlayerDialogResponse and it doesn't kick my players. maybe your using it wrong.

pawn Code:
public OnPlayerRequestClass(playerid, classid)
{
    SetSpawnInfo(playerid, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
    SpawnPlayer(playerid);
    return 1;
}
Thank you!
I had this problem too, and now it's don't happen .
+rep.


Re: SpawnPlayer(); - WackoX - 25.02.2012

I'll explain it a littlebit better, this is what i have explained on the easy way:

Code:
public OnPlayerRequestClass()
{
    ShowPlayerDialog();
}
public OnDialogResponse()
{
    LoginPlayer();
}
LoginPlayer()
{
    SetSpawnInfo();
    SpawnPlayer();
}
And i'm still getting kicked, see:




Re: SpawnPlayer(); - WackoX - 25.02.2012

Works again.


Re: SpawnPlayer(); - Shadow_ - 27.02.2012

Set the spawn info and spawn player OnPlayerRequestClass


Re: SpawnPlayer(); - Lorenc_ - 27.02.2012

pawn Code:
public OnPlayerRequestClass(playerid, classid)
{
    SpawnPlayer(playerid);
    SetSpawnInfo(playerid, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
    return 1;
}
I'm pretty sure it's like that.