markow
Дебютант
Я изменил спавн на ЖДЛ. Но когда заходишь спавнит на ферме. Почему?
PHP:
stock SetSpawnInfoEx(playerid, Float:x, Float:y, Float:z, Float:angle)
{
switch (PlayerInfo[playerid][pMember])
{
case 0: SetSpawnInfo(playerid, 0xFE, PlayerInfo[playerid][pChar], x, y, z, angle, 0, 0, 0, 0, 0, 0);
case 1..4, 7, 10, 11, 19, 21, 25, 26:
{
if(PlayerInfo[playerid][pOdet] == 0) SetSpawnInfo(playerid, 0xFE, PlayerInfo[playerid][pChar], x, y, z, angle, 0, 0, 0, 0, 0, 0);
else SetSpawnInfo(playerid, 0xFE, PlayerInfo[playerid][pModel], x, y, z, angle, 0, 0, 0, 0, 0, 0);
}
default: SetSpawnInfo(playerid, 0xFE, PlayerInfo[playerid][pModel], x, y, z, angle, 0, 0, 0, 0, 0, 0);
}
return true;
}
Код:
stock SetPlayerSpawn(playerid)
{
if(gSpecID[playerid] != INVALID_PLAYER_ID)
{
gSpecID[playerid] = INVALID_PLAYER_ID;
CancelSelectTextDraw(playerid);
for(new x=0; x <= 1; x++) PlayerTextDrawHide(playerid, PlayerText:ReconPlayerText[playerid][x]);
HideMenuForPlayer(ReconPanel, playerid);
new Float:z_coord = gPlayerPosition[playerid][2] - 1.0;
SetSpawnInfoEx(playerid, gPlayerPosition[playerid][0], gPlayerPosition[playerid][1], z_coord, 0.0);
SetPlayerInteriorEx(playerid, gPlayerInformation[playerid][0]);
SetPlayerVirtualWorldEx(playerid, gPlayerInformation[playerid][1]);
gSpecState[playerid] = INVALID_PLAYER_ID;
return 1;
}
if(StartPaintBall == 0 && TeamPain[playerid] != 0)
{
for(new i; i < 3; i++) TextDrawHideForPlayer(playerid, PaintText[i]);
EndPaint(playerid);
}
else if(TeamPain[playerid] != 0 && StartPaintBall == 2)
{
new spawn = random(10),
Float:z_coord = TeamPain[playerid] == 1 ? (SpawnBlueTeam[typePB][spawn][2]-1.0) : (SpawnRedTeam[typePB][spawn][2]-1.0)
;
if(TeamPain[playerid] == 1)
{
if(PlayerInfo[playerid][pSex] == 1) SetSpawnInfo(playerid, 0xFE, 21, SpawnBlueTeam[typePB][spawn][0],SpawnBlueTeam[typePB][spawn][1],z_coord, SpawnBlueTeam[typePB][spawn][3], 0, 0, 0, 0, 0, 0);
else if(PlayerInfo[playerid][pSex] == 2) SetSpawnInfo(playerid, 0xFE, 41, SpawnBlueTeam[typePB][spawn][0],SpawnBlueTeam[typePB][spawn][1],z_coord, SpawnBlueTeam[typePB][spawn][3], 0, 0, 0, 0, 0, 0);
}
if(TeamPain[playerid] == 2)
{
if(PlayerInfo[playerid][pSex] == 1) SetSpawnInfo(playerid, 0xFE, 19, SpawnRedTeam[typePB][spawn][0],SpawnRedTeam[typePB][spawn][1],z_coord, SpawnRedTeam[typePB][spawn][3], 0, 0, 0, 0, 0, 0);
else if(PlayerInfo[playerid][pSex] == 2) SetSpawnInfo(playerid, 0xFE, 40, SpawnRedTeam[typePB][spawn][0],SpawnRedTeam[typePB][spawn][1],z_coord, SpawnRedTeam[typePB][spawn][3], 0, 0, 0, 0, 0, 0);
}
SetPlayerInteriorEx(playerid, 10);
SetPlayerVirtualWorldEx(playerid, 1);
return true;
}
if(GetPVarInt(playerid, "AntiDeathRace"))
{
SetSpawnInfoEx(playerid, -2169.1880, 643.9022, 1051.3750, 180.8674);
SetPlayerInteriorEx(playerid, 1);
SetPlayerVirtualWorldEx(playerid, 43);
DeletePVar(playerid, "AntiDeathRace");
race_death(playerid);
return 1;
}
if(GetPVarInt(playerid, "BasePopitka") > 0)
{
SetSpawnInfoEx(playerid, 377.6851, -161.1450, 3365.3403, 179.1788);
SetPlayerInteriorEx(playerid, 0);
return 1;
}
if(GetPVarInt(playerid, "baseBB"))
{
SetSpawnInfoEx(playerid, 2177.4709, 1118.3693, 11.6484, 62.3957);
SetPlayerInteriorEx(playerid, 0);
SetPlayerVirtualWorldEx(playerid, 0);
DeletePVar(playerid, "baseBB");
return 1;
}
if(PlayerInfo[playerid][pJailed])
{
if(PlayerInfo[playerid][pJailed] == 4)
{
switch(random(3)) {
case 0: SetSpawnInfoEx(playerid, 5512.0732, 1249.1172, 23.1886, 120.3213);
case 1: SetSpawnInfoEx(playerid, 5524.6377,1241.7778,23.1886,102.7743);
case 2: SetSpawnInfoEx(playerid, 5517.6646,1255.9296,23.1886,99.9542);
}
SetPlayerInteriorEx(playerid, 0);
}
else if(PlayerInfo[playerid][pMestoJail] == 1)
{
SetSpawnInfoEx(playerid, 264.1425, 77.4712, 1000.0391, 263.0160);
SetPlayerInteriorEx(playerid, 6);
}
else if(PlayerInfo[playerid][pMestoJail] == 2)
{
SetSpawnInfoEx(playerid, 219.5400, 109.9767, 998.0156, 1.0000);
SetPlayerInteriorEx(playerid, 10);
}
else if(PlayerInfo[playerid][pMestoJail] == 3)
{
SetSpawnInfoEx(playerid, 198.3642, 161.8103, 1002.0300, 1.0000);
SetPlayerInteriorEx(playerid, 3);
}
SetPlayerVirtualWorldEx(playerid, 0);
return true;
}
if(PlayerInfo[playerid][pHospital] == 1) // спавн в больке // болька ёбана
{
SetSpawnInfoEx(playerid, 483.3876,1135.8149,1020.5549, 91.2250);
SetPlayerInteriorEx(playerid, 1);
SetPlayerVirtualWorldEx(playerid,1);
SendClientMessage(playerid,COLOR_WHITE,"Вам придется пройти курс лечения или вылечиться у медика. Пройдите в палату, чтобы начать процедуру.");
return true;
}
if(PlayerInfo[playerid][Settings][2] == 0)
{
if(PlayerInfo[playerid][pPhousekey] != 255 || PlayerInfo[playerid][pHomez] != 255)
{
new house = PlayerInfo[playerid][pPhousekey] != 255 ? (PlayerInfo[playerid][pPhousekey]) : (PlayerInfo[playerid][pHomez]),
Float:z_coord = HouseInfo[house][hExitz] - 1.0
;
SetSpawnInfoEx(playerid, HouseInfo[house][hExitx], HouseInfo[house][hExity], z_coord, 0.0);
SetPlayerInteriorEx(playerid, HouseInfo[house][hInt]);
PlayerInfo[playerid][pLocal] = house;
SetPlayerVirtualWorldEx(playerid, house+50);
return true;
}
}
switch(PlayerInfo[playerid][pMember])
{
case 2:
{
SetSpawnInfoEx(playerid, 607.0414,1294.3031,1079.3459, 89.1600);
SetPlayerInteriorEx(playerid, 3);
SetPlayerVirtualWorldEx(playerid, 5);
zakonn++;
}
case 3:
{
SetSpawnInfoEx(playerid, 725.9099,-1299.9343,1101.0000, 85.4922);
SetPlayerInteriorEx(playerid, 15);
SetPlayerVirtualWorldEx(playerid, 3);
}
case 7:
{
SetSpawnInfoEx(playerid, 1459.1729,-1803.6135,2995.6550,310.3075);
SetPlayerInteriorEx(playerid, 1);
SetPlayerVirtualWorldEx(playerid, 1);
}
case 10:
{
SetSpawnInfoEx(playerid, 225.1647,121.0442,998.0786, 89.0733);
SetPlayerInteriorEx(playerid, 10);
SetPlayerVirtualWorldEx(playerid, 0);
zakonn++;
}
case 19:
{
SetSpawnInfoEx(playerid, 725.9099,-1299.9343,1101.0000, 85.4922);
SetPlayerInteriorEx(playerid, 15);
SetPlayerVirtualWorldEx(playerid, 2);
}
case 21:
{
SetSpawnInfoEx(playerid, 211.3636,184.3113,1002.0313, 174.3579);
SetPlayerInteriorEx(playerid, 3);
SetPlayerVirtualWorldEx(playerid, 122);
}
case 27:
{
SetSpawnInfoEx(playerid, 1950.7924,1059.6261,993.4688, 167.3940);
SetPlayerInteriorEx(playerid, 10);
SetPlayerVirtualWorldEx(playerid, VW_DRAGONS);
}
case 28:
{
SetSpawnInfoEx(playerid, 2151.9692,1597.3483,1005.1761, 359.8317);
SetPlayerInteriorEx(playerid, 1);
SetPlayerVirtualWorldEx(playerid, VW_CALIGULAS);
}
case 26:
{
SetSpawnInfoEx(playerid, -806.0136,-672.3167,4004.5850,357.5782);
SetPlayerInteriorEx(playerid, 1);
SetPlayerVirtualWorldEx(playerid, 0);
}
case 16:
{
SetSpawnInfoEx(playerid, 429.0533,-71.2425,1501.0859,176.6304);
SetPlayerInteriorEx(playerid, 15);
SetPlayerVirtualWorldEx(playerid, 1);
}
case 6:
{
SetSpawnInfoEx(playerid, 1265.9167,-793.5771,1083.0078, 1.8900);
SetPlayerInteriorEx(playerid, 5);
SetPlayerVirtualWorldEx(playerid, 0);
}
case 14:
{
SetSpawnInfoEx(playerid, 1265.9167,-793.5771,1083.0078, 1.8900);
SetPlayerInteriorEx(playerid, 5);
SetPlayerVirtualWorldEx(playerid, 1);
}
case 11:
{
SetSpawnInfoEx(playerid, -790.5412,1555.0991,1138.2369, 270.5359);
SetPlayerInteriorEx(playerid, 1);
SetPlayerVirtualWorldEx(playerid, 0);
}
case 5:
{
SetSpawnInfoEx(playerid, 1265.9167,-793.5771, 1083.01, 1.8900);
SetPlayerInteriorEx(playerid, 5);
SetPlayerVirtualWorldEx(playerid, 2);
}
case 23:
{
SetSpawnInfoEx(playerid, 1862.9944,-880.1429,1080.4220, 89.6664);
SetPlayerInteriorEx(playerid, 0);
SetPlayerVirtualWorldEx(playerid, 0);
}
case 24:
{
SetSpawnInfoEx(playerid, 1280.3894,1271.6595,9.8281, 316.8163);
SetPlayerInteriorEx(playerid, 0);
SetPlayerVirtualWorldEx(playerid, 0);
}
case 25:
{
SetSpawnInfoEx(playerid, 211.7866,142.4048,1002.0234, 269.2128);
SetPlayerInteriorEx(playerid, 3);
SetPlayerVirtualWorldEx(playerid, 0);
zakonn++;
}
case 4:
{
SetSpawnInfoEx(playerid, 463.9943,1119.7623,1021.8220,336.5881); //спавн для персонала //медики /спавн персонала
SetPlayerInteriorEx(playerid, 1);
SetPlayerVirtualWorldEx(playerid, 1);
Medics ++;
}
case 12:
{
SetSpawnInfoEx(playerid, 618.2568,-147.6965,1093.2360,89.1599); // спавн баллас
SetPlayerInteriorEx(playerid,6);
SetPlayerVirtualWorldEx(playerid, 0);
SetPlayerCheckpoint(playerid,611.0729,-143.7107,1093.2379,1.0);
PicCP[playerid] = 12;
}
case 18:
{
SetSpawnInfoEx(playerid, 285.3923,-151.7457,1164.7350,5.0582);
SetPlayerInteriorEx(playerid, 18);
SetPlayerCheckpoint(playerid,283.8770,-143.8298,1161.2720,1.0);
PicCP[playerid] = 18;
SetPlayerVirtualWorldEx(playerid, 0);
}
case 17:
{
SetSpawnInfoEx(playerid, 1586.4531,-1605.3181,394.4919,1.0901);
SetPlayerInteriorEx(playerid,8);
SetPlayerCheckpoint(playerid,1584.9470,-1594.1694,394.4919,1.0);
PicCP[playerid] = 17;
SetPlayerVirtualWorldEx(playerid, 0);
}
case 13:
{
SetSpawnInfoEx(playerid, 2487.5032,-1702.6426,2204.7449,270.9713);
SetPlayerInteriorEx(playerid, 4);
SetPlayerVirtualWorldEx(playerid, 75);
SetPlayerCheckpoint(playerid,2490.1611,-1704.6406,2197.5859,1.0);
PicCP[playerid] = 13;
}
case 15:
{
SetSpawnInfoEx(playerid, -259.5443,2035.9384,1025.1320, 271.8802);
SetPlayerInteriorEx(playerid, 3);
SetPlayerVirtualWorldEx(playerid, 1);
SetPlayerCheckpoint(playerid,-247.6456,2040.4696,1025.1320,1.0);
PicCP[playerid] = 15;
}
case 8:
{
SetSpawnInfoEx(playerid, 1658.60,2253.22,10.06, 0);
SetPlayerInteriorEx(playerid, 0);
SetPlayerVirtualWorldEx(playerid, 0);
}
case 1:
{
SetSpawnInfoEx(playerid, 1032.4301,570.1222,1017.4719, 1); //точка спавна работников лспд
SetPlayerInteriorEx(playerid, 1);
SetPlayerVirtualWorldEx(playerid, 1);
zakonn++;
}
default:
{
SetSpawnInfoEx(playerid, 1757.8087,-1894.3008,13.5662,269.5239);
SetPlayerInteriorEx(playerid,0);
SetPlayerVirtualWorldEx(playerid, 0);
}
}
return true;
}
Последнее редактирование модератором:
