Player Spawn Bug
#1

Hi guys i have a big problem, when i enter first time on server and i got spawned, i got spawned at my spawn zone. But when i”m reconnect i spawn to same location, but.. http://imgur.com/a/zqo7O
I need fast help please...
Reply
#2

Its probably problem of SetPlayerCameraPos and SetPlayerCameraLookAt post your OnPlayerSpawn code here.
Reply
#3

Btw, IceBlizard are you the eG IceBlizard?[/B]
Quote:
Originally Posted by IceBilizard
Посмотреть сообщение
Its probably problem of SetPlayerCameraPos and SetPlayerCameraLookAt post your OnPlayerSpawn code here.
Reply
#4

Quote:
Originally Posted by IceBilizard
Посмотреть сообщение
Its probably problem of SetPlayerCameraPos and SetPlayerCameraLookAt post your OnPlayerSpawn code here.
Код HTML:
public OnPlayerSpawn(playerid)
{
   	if(IsPlayerConnected(playerid))
	{
    	SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
    	Logged[playerid] = 1;
	}
	if(PlayerInfo[playerid][pPos_x] == 0 && PlayerInfo[playerid][pPos_y] == 0)
    {
        SetPlayerPos(playerid, -83.4851,1359.5786,10.3808); // SpawnPoint Server
        Logged[playerid] = 1;
    }
    else
	{
		SetPlayerPos(playerid, PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z]);
		Logged[playerid] = 1;
 	}
	if(isAlive[playerid] == false)
	{
		SetPlayerPos(playerid, Deadx[playerid], Deady[playerid], Deadz[playerid]);
		SetPlayerInterior(playerid, deadint[playerid]);
		SetPlayerVirtualWorld(playerid, deadvw[playerid]);
		stopanimAllowed[playerid] = false;
		SCM(playerid, COLOR_LIGHTRED, "Esti ranit grav, iti poti accepta moartea sau poti astepta pentru ajutor.");
		TogglePlayerControllable(playerid,0);
		SetTimerEx("LoadDeathAnim", 1000, false, "i", playerid);
		for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(i, playerid, true);

		new string[400];
		new holder[400];

		if(sInfo[playerid][Misc] > 0)
		{
			format(string, sizeof(string), ""COL_LIGHTRED"%d vanatai pe corp.\n", sInfo[playerid][Misc]);
			strcat(holder, string, sizeof(holder));
		}
		if(sInfo[playerid][Head] > 0)
		{
			format(string, sizeof(string), ""COL_LIGHTRED"%d impuscaturi in cap\n", sInfo[playerid][Head]);
			strcat(holder, string, sizeof(holder));
		}
		if(sInfo[playerid][Chest] > 0)
		{
			format(string, sizeof(string), ""COL_LIGHTRED"%d impuscaturi in the chest.\n", sInfo[playerid][Chest]);
			strcat(holder, string, sizeof(holder));
		}
		if(sInfo[playerid][Crotch] > 0)
		{
			format(string, sizeof(string), ""COL_LIGHTRED"%d impuscaturi in the crotch.\n", sInfo[playerid][Crotch]);
			strcat(holder, string, sizeof(holder));
		}
		if(sInfo[playerid][LArm] > 0)
		{
			format(string, sizeof(string), ""COL_LIGHTRED"%d impuscaturi in the left arm.\n", sInfo[playerid][LArm]);
			strcat(holder, string, sizeof(holder));
		}
		if(sInfo[playerid][RArm] > 0)
		{
			format(string, sizeof(string), ""COL_LIGHTRED"%d impuscaturi in the right arm.\n", sInfo[playerid][RArm]);
			strcat(holder, string, sizeof(holder));
		}
		if(sInfo[playerid][LLeg] > 0)
		{
			format(string, sizeof(string), ""COL_LIGHTRED"%d impuscaturi in the left leg.\n", sInfo[playerid][LLeg]);
			strcat(holder, string, sizeof(holder));
		}
		if(sInfo[playerid][RLeg] > 0)
		{
			format(string, sizeof(string), ""COL_LIGHTRED"%d impuscaturi in the right leg.\n", sInfo[playerid][RLeg]);
			strcat(holder, string, sizeof(holder));
		}
		deathlabel[playerid] = Create3DTextLabel(holder, -1, Deadx[playerid], Deady[playerid], Deadz[playerid], 10.0, 0, 0);
	}
	return 1;
But i do not own SetPlayerCameraPos / SetPlayerCameraLookAt
Reply
#5

Try allowing them move when spawning, change this line:

Код:
TogglePlayerControllable(playerid,1);
If it does not work, post your OnPlayerDeath/OnPlayerRequestSpawn here
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)