OnPlayerDeath
#1

Почему при смерти игрока, появляются "<<< >>> Spawn". Как исправить?
Reply
#2

Игроку при коннекте позволили выбрать скин или вы решили быть умнее системы и создали кастомную выбиралку?
Reply
#3

вот весь паблик:

Код:
public OnPlayerConnect(playerid)
{
	SetPlayerColor(playerid,0xFFFFFF00);

	SendClientMessage(playerid,0xFF9900AA,"Добро пожаловать на State Of Lancaster!"); 
    
    TogglePlayerSpectating(playerid,1);     
    
    TextDrawShowForPlayer(playerid, LoginAndReg[0]);
    TextDrawShowForPlayer(playerid, LoginAndReg[1]);
    TextDrawShowForPlayer(playerid, LoginAndReg[2]);
    TextDrawShowForPlayer(playerid, LoginAndReg[3]);    
    SelectTextDraw(playerid, 0xE0DBD1FF);
	SetPVarInt(playerid, "TDReg", 1);  
    
    PlayerInfoAcc[playerid][pAccID] = 0;
	strmid(PlayerInfoAcc[playerid][pAccEmail],"", 0, strlen(""), 0);
	strmid(PlayerInfoAcc[playerid][pAccPass],"", 0, strlen(""), 0);  
    strmid(PlayerInfoAcc[playerid][pAccRegDate],"", 0, strlen(""), 0); 
    
    PlayerInfo[playerid][pID] = 0;  
    strmid(PlayerInfo[playerid][pNick],"", 0, strlen(""), 0); 
    strmid(PlayerInfo[playerid][pCaName],"", 0, strlen(""), 0); 
    strmid(PlayerInfo[playerid][pCaSurName],"", 0, strlen(""), 0); 
    PlayerInfo[playerid][pReg] = 0; PlayerInfo[playerid][pSex] = 0; PlayerInfo[playerid][pAge] = 0;
    PlayerInfo[playerid][pSkin] = 0; PlayerInfo[playerid][pRace] = 0; 
    PlayerInfo[playerid][pArrivalStates] = 0; PlayerInfo[playerid][pSpawn] = 0; PlayerInfo[playerid][pHealth] = 0; 
    ClothesSkin[playerid] = 0; ChosenSkin[playerid] = 0;  
    
	RemoveBuildingForPlayer(playerid, 4961, 1745.2031, -1882.8516, 26.1406, 0.25); RemoveBuildingForPlayer(playerid, 5033, 1745.2031, -1882.8516, 26.1406, 0.25);
	RemoveBuildingForPlayer(playerid, 5055, 1745.2031, -1882.8516, 26.1406, 0.25); RemoveBuildingForPlayer(playerid, 5067, 1701.3906, -1954.1328, 10.3984, 0.25);
    RemoveBuildingForPlayer(playerid, 4881, 1701.3906, -1954.1328, 10.3984, 0.25); RemoveBuildingForPlayer(playerid, 1226, 1725.3906, -1927.0000, 16.3750, 0.25);
    RemoveBuildingForPlayer(playerid, 1280, 1714.9609, -1909.6328, 12.9375, 0.25); RemoveBuildingForPlayer(playerid, 1280, 1714.9609, -1914.2969, 12.9375, 0.25);
    RemoveBuildingForPlayer(playerid, 1226, 1725.3906, -1897.2266, 16.3750, 0.25); RemoveBuildingForPlayer(playerid, 673, 1727.1953, -1930.8984, 11.4453, 0.25);
    RemoveBuildingForPlayer(playerid, 1280, 1725.9063, -1923.5000, 12.9609, 0.25); RemoveBuildingForPlayer(playerid, 673, 1727.1953, -1908.0938, 11.4453, 0.25);
    RemoveBuildingForPlayer(playerid, 673, 1727.1953, -1916.3047, 11.4453, 0.25); RemoveBuildingForPlayer(playerid, 1280, 1725.9063, -1908.1797, 12.9609, 0.25);
    RemoveBuildingForPlayer(playerid, 634, 1712.9297, -1868.2109, 12.1328, 0.25); RemoveBuildingForPlayer(playerid, 634, 1721.0234, -1868.2109, 12.1328, 0.25);
    RemoveBuildingForPlayer(playerid, 673, 1727.1953, -1893.1563, 11.4453, 0.25); RemoveBuildingForPlayer(playerid, 1280, 1725.9063, -1893.5000, 12.9609, 0.25);
    RemoveBuildingForPlayer(playerid, 1226, 1724.8750, -1859.5391, 16.3516, 0.25); RemoveBuildingForPlayer(playerid, 620, 1703.4688, -1846.7109, 10.8047, 0.25);
    RemoveBuildingForPlayer(playerid, 620, 1710.8359, -1846.7109, 10.8047, 0.25); RemoveBuildingForPlayer(playerid, 1226, 1714.9766, -1841.8516, 16.3516, 0.25);
    RemoveBuildingForPlayer(playerid, 620, 1710.8359, -1833.0547, 10.8047, 0.25); RemoveBuildingForPlayer(playerid, 620, 1703.4688, -1833.0547, 10.8047, 0.25);
    RemoveBuildingForPlayer(playerid, 673, 1704.7422, -1829.7969, 11.4453, 0.25); RemoveBuildingForPlayer(playerid, 620, 1721.1563, -1846.7109, 10.8047, 0.25);
    RemoveBuildingForPlayer(playerid, 620, 1731.4766, -1846.7109, 10.8047, 0.25); RemoveBuildingForPlayer(playerid, 620, 1741.7969, -1833.0547, 10.8047, 0.25);
    RemoveBuildingForPlayer(playerid, 620, 1731.4766, -1833.0547, 10.8047, 0.25); RemoveBuildingForPlayer(playerid, 620, 1721.1563, -1833.0547, 10.8047, 0.25);
    RemoveBuildingForPlayer(playerid, 673, 1723.9297, -1829.7969, 11.4453, 0.25); RemoveBuildingForPlayer(playerid, 700, 1732.6719, -1830.0781, 11.4453, 0.25);
    RemoveBuildingForPlayer(playerid, 963, 1747.0391, -1942.6641, 13.6094, 0.25); RemoveBuildingForPlayer(playerid, 962, 1757.1484, -1942.6563, 13.6094, 0.25);
    RemoveBuildingForPlayer(playerid, 1226, 1774.7578, -1931.3125, 16.3750, 0.25); RemoveBuildingForPlayer(playerid, 1226, 1806.4297, -1931.6016, 16.3750, 0.25);
    RemoveBuildingForPlayer(playerid, 4821, 1745.2031, -1882.8516, 26.1406, 0.25); RemoveBuildingForPlayer(playerid, 5024, 1748.8438, -1883.0313, 14.1875, 0.25);
    RemoveBuildingForPlayer(playerid, 5083, 1748.8438, -1883.0313, 14.1875, 0.25); RemoveBuildingForPlayer(playerid, 1226, 1774.7578, -1901.5391, 16.3750, 0.25);
    RemoveBuildingForPlayer(playerid, 1226, 1806.4297, -1901.8281, 16.3750, 0.25); RemoveBuildingForPlayer(playerid, 1226, 1755.8203, -1859.5391, 16.3516, 0.25);
    RemoveBuildingForPlayer(playerid, 1226, 1808.1250, -1859.5391, 16.3516, 0.25); RemoveBuildingForPlayer(playerid, 1226, 1783.6719, -1859.5391, 16.3516, 0.25);
    RemoveBuildingForPlayer(playerid, 620, 1747.1875, -1846.7109, 10.8047, 0.25); RemoveBuildingForPlayer(playerid, 1226, 1742.5547, -1835.0625, 16.3516, 0.25);
    RemoveBuildingForPlayer(playerid, 620, 1762.8281, -1846.7109, 10.8047, 0.25); RemoveBuildingForPlayer(playerid, 620, 1778.4766, -1846.7109, 10.8047, 0.25);
    RemoveBuildingForPlayer(playerid, 620, 1794.1172, -1846.7109, 10.8047, 0.25); RemoveBuildingForPlayer(playerid, 620, 1809.7656, -1846.7109, 10.8047, 0.25);    
    
	return 1;
}
Reply
#4

Что это?
PHP код:
strmid(PlayerInfoAcc[playerid][pAccEmail],""0strlen(""), 0); 
Сделай так
PHP код:
PlayerInfoAcc[playerid][pAccEmail][0] = EOS
Reply
#5

Quote:
Originally Posted by SoNikMells
Посмотреть сообщение
Что это?
PlayerInfoAcc[playerid][pAccEmail][0] = EOS;
что за "[0]"?
Reply
#6

Если так хочется удалить строку по всем правилам то strdel вам в помощь.
SetSpawnInfo используй!
Reply
#7

сделал так:

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
	SetSpawnInfo(playerid, 0, PlayerInfo[playerid][pSkin], 0, 0, 0, 1.0, -1, -1, -1, -1, -1, -1);
	SpawnPlayer(playerid); 

	return 1;
}
игрок либо спавнится в скине сиджея, либо на ферме.
Reply
#8

SetSpawnInfo
Reply
#9

Quote:
Originally Posted by SoNikMells
Посмотреть сообщение
мне нужно чтобы игрок спавнился в координатах, которые указаны в OnPlayerSpawn
Код:
public OnPlayerSpawn(playerid)
{
	if(!IsPlayerLogged[playerid]) return 1;  
    
    SetPlayerColor(playerid,0xFFFFFF00);  
    
    if(PlayerInfo[playerid][pSpawn] == 0) { 
		//if(PlayerInfo[playerid][pMember] == 0) {
			if(PlayerInfo[playerid][pArrivalStates] == 0) {
				SetPlayerPos(playerid, 1712.3109, -1950.2432, 14.1171);
				SetCameraBehindPlayer(playerid);
				SetPlayerFacingAngle(playerid, 180.0);
				SetPlayerInterior(playerid, 0);
				SetPlayerVirtualWorld(playerid, 0);
				return 1;
			}
			if(PlayerInfo[playerid][pArrivalStates] == 1) {
				SetPlayerPos(playerid, 1685.1649,-2240.9700,13.5469);
				SetCameraBehindPlayer(playerid);
				SetPlayerFacingAngle(playerid, 180.0);
				SetPlayerInterior(playerid, 0);
				SetPlayerVirtualWorld(playerid, 0);
				return 1;
			}
			if(PlayerInfo[playerid][pArrivalStates] == 2) {
				SetPlayerPos(playerid, 1411.1161,-1706.1525,13.5395);
				SetCameraBehindPlayer(playerid);
				SetPlayerFacingAngle(playerid, 270.0);
				SetPlayerInterior(playerid, 0);
				SetPlayerVirtualWorld(playerid, 0);
				return 1;
			}
  		//}    
    }    

	return 1;
}
Reply
#10

Эту функцию нужно вызвать один раз при коннекте.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)