TogglePlayerSpectating cause player kick. -
RedJohn - 09.09.2012
I have TogglePlayerSpectating and i somewhere read that i need to have SetPlayerInfo to make it working. But i have SetPlayerInfo and when i start my server it shows: Server closed the connection.
Re: TogglePlayerSpectating cause player kick. -
mobiliz - 09.09.2012
Can you show us your code please for it?
Re: TogglePlayerSpectating cause player kick. -
RedJohn - 09.09.2012
pawn Code:
public OnPlayerRequestClass(playerid, classid)
{
if(PlayerInfo[playerid][Skin] == -1)
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 249.8809, 1852.4695, 8.7625);
SetPlayerCameraPos(playerid, 250.0132, 1849.3933, 8.7734);
SetPlayerCameraLookAt(playerid, 249.8809, 1852.4695, 8.7625);
SetPlayerFacingAngle(playerid, 177.0050);
}
else
{
SetSpawnInfo(playerid, 1, 0, 963.7003, -1616.3728, 14.7561, 180, 0, 0, 0, 0, 0, 0);
SetPlayerSkin(playerid, PlayerInfo[playerid][Skin]);
SpawnPlayer(playerid);
}
return 1;
}
pawn Code:
public OnPlayerConnect(playerid)
{
TogglePlayerSpectating(playerid, 1);
return 1;
}
pawn Code:
TogglePlayerSpectating(playerid, 0);
on player login.
Re: TogglePlayerSpectating cause player kick. -
RedJohn - 09.09.2012
BUMP
(i know, im bumping even if 24 hours aren't gone, but im in hurry, sorry)
Re: TogglePlayerSpectating cause player kick. -
JustinAn - 09.09.2012
Well first off place.
pawn Code:
TogglePlayerSpectating(playerid, 1);
In the OnPlayerRequestClass public function, if you don't understand me:
pawn Code:
public OnPlayerRequestClass(playerid, classid)
{
TogglePlayerSpectating(playerid, 1);
if(PlayerInfo[playerid][Skin] == -1)
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 249.8809, 1852.4695, 8.7625);
SetPlayerCameraPos(playerid, 250.0132, 1849.3933, 8.7734);
SetPlayerCameraLookAt(playerid, 249.8809, 1852.4695, 8.7625);
SetPlayerFacingAngle(playerid, 177.0050);
}
else
{
SetSpawnInfo(playerid, 1, 0, 963.7003, -1616.3728, 14.7561, 180, 0, 0, 0, 0, 0, 0);
SetPlayerSkin(playerid, PlayerInfo[playerid][Skin]);
SpawnPlayer(playerid);
}
return 1;
}
And OnPlayerSpawn:
pawn Code:
public OnPlayerSpawn(playerid)
{
TogglePlayerSpectating(playerid, 0);
}
Give it a shot, if not I'll think of another soloution.
Re: TogglePlayerSpectating cause player kick. -
RedJohn - 10.09.2012
Tried million times.
Re: TogglePlayerSpectating cause player kick. -
RedJohn - 11.09.2012
BUMP
Re: TogglePlayerSpectating cause player kick. -
zT KiNgKoNg - 11.09.2012
bumping topics without waiting for the time needed is breaking the rules please take notice to them or your pots can be removed and help will not be given
Re: TogglePlayerSpectating cause player kick. -
RedJohn - 11.09.2012
Boy, check my bumping time. In first one I told my earlier bumping reason, and 24 are gone since my last bump so don't raise your Posts counter using those lame posts.
Re: TogglePlayerSpectating cause player kick. -
RedJohn - 18.09.2012
Bump