Question

Здравствуйте, суть в том что игрок спавнится не там где надо а в здание. Координаты которого не указаны в нужном паблике. Вот весь паблик

Спойлер

public OnPlayerSpawn(playerid) {
	if(source_death{playerid} == true) {
		TogglePlayerControllable(playerid, true);
		SetPlayerPos(playerid, 2439.9243, -1791.7804, 1224.4102);
		SetPlayerFacingAngle(playerid, 180.00);
		SetPlayerHealth(playerid, 15.00);
		SetCameraBehindPlayer(playerid);
		SetPlayerSkin(playerid, (player_begin_job_day{playerid} == 0) ? source_skin[playerid] : source_member_skin[playerid]);
		switch(GetPlayerPosPlace(playerid)) {
			case PLAYER_IN_LOS_SANTOS: SetPlayerVirtualWorld(playerid, 1);
			case PLAYER_IN_SAN_FIERRO: SetPlayerVirtualWorld(playerid, 2);
			case PLAYER_IN_LAS_VENTURAS: SetPlayerVirtualWorld(playerid, 3);
		}
		source_death{playerid} = false;
		SetPlayerInterior(playerid, 3);
		SendClientMessage(playerid, -1, !"");
		return SendClientMessage(playerid, COLOR_BLUE, !"Первым делом рекомендуем Вам пройти процесс оформления в регистратуре. Она находится с левой стороны от Вас");
	}

  /*
	if(!source_logged{playerid}) return Kick(playerid);
	for(new i; i < TOTALGZ ;i++) GangZoneShowForPlayer(playerid,GZInfo[i][id],GetGangZoneColor(i));
	if(source_member{playerid} == F_AZTECAS || source_member{playerid} == F_GROVE || source_member{playerid} == F_RIFA ||
			source_member{playerid} == F_BALLAS || source_member{playerid} == F_VAGOS)
	{
		player_begin_job_day{playerid} = 1;
	}
	for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
	{
		if(IsPlayerAttachedObjectSlotUsed(playerid, i)) RemovePlayerAttachedObject(playerid, i);
	}
	if(IsACop(playerid))
	{
	    for(new i = 4; i < 9; i++) if(IsPlayerAttachedObjectSlotUsed(playerid, i)) RemovePlayerAttachedObject(playerid, i);
	}
	SetPVarInt(playerid, "PlayerInAFK", 0);
	RemovePlayerAttachedObject(playerid, 1);
	GunCheckTime[playerid] = 5;
	ResetWeapon(playerid);
	SetPlayerTeamColor(playerid);
	DisablePlayerCheckpoint(playerid);
	DeletePVar(playerid, "GMATS");
	DeletePVar(playerid, "WORK1");
	DeletePVar(playerid, "WORK2");
	DeletePVar(playerid, "WORK3");
	DeletePVar(playerid, "WORK4");
	DeletePVar(playerid, "WORK5");
	DeletePVar(playerid, "WORK");
	DeletePVar(playerid, "LSAWORK");
	DeletePVar(playerid, "LSAWORK1");
	freezing_time(playerid,GetPlayerPing(playerid) * 15);
	if(Player[playerid][pWanted] > 0) SetPlayerWantedLevel(playerid, Player[playerid][pWanted]);
	if(!source_logged{playerid}) SendClientMessage(playerid, COLOR_LIGHTRED, ""), Kick(playerid);
	if(Player[playerid][pJailTime] > 0)
	{
		if(Player[playerid][pJail] == 1)
		{
		   SetPlayerInterior(playerid, 3), SetPlayerVirtualWorld(playerid, 0);
		   SetPlayerPos(playerid,197.9678,161.2581,1003.0300);
		   SetPlayerFacingAngle(playerid, 181.7320);
		   SendClientMessage(playerid, COLOR_LIGHTRED, "Вы еще не отсидели свой тюремный срок");
		   return 1;
        }
        else if(Player[playerid][pJail] == 2)
		{
		   SetPlayerInterior(playerid, 6), SetPlayerVirtualWorld(playerid, 1);
		   SetPlayerPos(playerid,264.1425,77.4712,1001.0391);
		   SetPlayerFacingAngle(playerid, 263.0160);
		   SendClientMessage(playerid, COLOR_LIGHTRED, "Вы еще не отсидели свой тюремный срок");
		   return 1;
        }
	}
	if(player_begin_job_day{playerid} == 0 && source_member{playerid} != MEMBER_ARMY_SF)
	{
		if(GetPVarInt(playerid, "ZWORK") == 1)
		{
			if(IsPlayerAttachedObjectSlotUsed(playerid,1)) RemovePlayerAttachedObject(playerid,1);
			GiveMoneyMysql(playerid, Price[playerid]), SendClientMessage(playerid, COLOR_LIGHTGREEN, "Рабочий день завершен, заработная плата выдана"), Price[playerid] = 0;
			DeletePVar(playerid, "ZWORK"), DeletePVar(playerid, "ZWORK1"), DisablePlayerCheckpoint(playerid);
		}
		SetPlayerSkin(playerid, Player[playerid][pModel]);
		SetPlayerPos(playerid, 1755.1079,-1930.2733,13.5770);
		SetPlayerFacingAngle(playerid, 1.5000);
		SetPlayerInterior(playerid, 0);
		SetPlayerVirtualWorld(playerid, 0);
		SetCameraBehindPlayer(playerid);
	}
	else
    {
			SetPlayerPos(playerid, player_pos_x[playerid], player_pos_y[playerid], player_pos_z[playerid]);
			SetPlayerInterior(playerid, player_interior{playerid});
			SetPlayerVirtualWorld(playerid, player_virtual_world{playerid});
		 	SetPlayerFacingAngle(playerid, player_facing_angle[playerid]);
			return SetPlayerSkin(playerid, Player[playerid][pChar]);
		}
		else
		{
			switch(source_member{playerid})
			{
				case F_MAYOR_LS:
					{
						SetPlayerPos(playerid, 511.7298,-2813.1851,3193.1960);
						SetPlayerFacingAngle(playerid, 88.5394);
						SetPlayerInterior(playerid, 0);
						SetPlayerVirtualWorld(playerid, 0);
						SetCameraBehindPlayer(playerid);
						if(player_begin_job_day{playerid} == 1) return SetPlayerSkin(playerid, Player[playerid][pChar]);
					}
				case MEMBER_SAPD:
					{
						SetPlayerPos(playerid,1525.4106,-1674.3386,2055.0020);
						SetPlayerFacingAngle(playerid, 270.4817);
						SetPlayerInterior(playerid, 0);
						SetCameraBehindPlayer(playerid);
						SetPlayerVirtualWorld(playerid, 1);
						if(player_begin_job_day{playerid} == 1) return SetPlayerSkin(playerid, Player[playerid][pChar]);
					}
				case F_SWAT: {
						SetPlayerPos(playerid, 246.0984,186.8105,1008.1719);
						SetPlayerFacingAngle(playerid, 359.4970);
						SetCameraBehindPlayer(playerid);
						SetPlayerInterior(playerid,3);
						SetPlayerVirtualWorld(playerid, 0);
						if(player_begin_job_day{playerid} == 1) return SetPlayerSkin(playerid, Player[playerid][pChar]);
				}
				case F_NEWS_LS:
					{
						SetPlayerPos(playerid, 2628.0396,-1815.2173,3135.9326);
						SetPlayerFacingAngle(playerid, 268.3709);
						SetCameraBehindPlayer(playerid);
						SetPlayerInterior(playerid,0);
						SetPlayerVirtualWorld(playerid, 1);
						if(player_begin_job_day{playerid} == 1) return SetPlayerSkin(playerid, Player[playerid][pChar]);
					}
				case F_MZ:
					{
						SetPlayerPos(playerid, 643.4105,-329.4363,-94.7852);
						SetPlayerFacingAngle(playerid, 179.5484);
						SetCameraBehindPlayer(playerid);
						SetPlayerInterior(playerid,0);
						SetPlayerVirtualWorld(playerid, 0);
						if(player_begin_job_day{playerid} == 1) return SetPlayerSkin(playerid, Player[playerid][pChar]);
					}
				case F_INSTRUCTORS:
					{
						SetPlayerPos(playerid, -2028.3230,-123.3871,641.0859);
						SetPlayerFacingAngle(playerid, 92.0071);
						SetCameraBehindPlayer(playerid);
						SetPlayerInterior(playerid,0);
						SetPlayerVirtualWorld(playerid, 0);
						if(player_begin_job_day{playerid} == 1) return SetPlayerSkin(playerid, Player[playerid][pChar]);
					}
				case F_GROVE:
					{
						SetPlayerPos(playerid,2492.4290,-1703.2484,1018.3438);
						SetPlayerFacingAngle(playerid, 180.0492);
						SetPlayerInterior(playerid, 3);
						SetCameraBehindPlayer(playerid);
						SetPlayerVirtualWorld(playerid,1);
						SetPlayerSkin(playerid, Player[playerid][pChar]);
						return 1;
					}
				case F_BALLAS:
					{
						SetPlayerPos(playerid,-47.9076,1399.7714,1084.4297);
						SetPlayerFacingAngle(playerid, 89.2518);
						SetPlayerInterior(playerid, 8);
						SetCameraBehindPlayer(playerid);
						SetPlayerVirtualWorld(playerid,1);
						SetPlayerSkin(playerid, Player[playerid][pChar]);
						return 1;
					}
				case F_RIFA:
					{
						SetPlayerPos(playerid,-226.3379,1408.6102,27.7734);
						SetPlayerFacingAngle(playerid, 180.4058);
						SetPlayerInterior(playerid, 18);
						SetCameraBehindPlayer(playerid);
						SetPlayerVirtualWorld(playerid,1);
						SetPlayerSkin(playerid, Player[playerid][pChar]);
						return 1;
					}
				case F_AZTECAS:
					{
						SetPlayerPos(playerid,509.4453,-73.3109,998.7578);
						SetPlayerFacingAngle(playerid, 92.2349);
						SetPlayerInterior(playerid, 11);
						SetCameraBehindPlayer(playerid);
						SetPlayerVirtualWorld(playerid,1);
						SetPlayerSkin(playerid, Player[playerid][pChar]);
						return 1;
					}
				case F_VAGOS:
					{
						SetPlayerPos(playerid,2816.5745,-1166.7212,1029.1719);
						SetPlayerFacingAngle(playerid, 89.1123);
						SetPlayerInterior(playerid, 8);
						SetCameraBehindPlayer(playerid);
						SetPlayerVirtualWorld(playerid, 1);
						SetPlayerSkin(playerid, Player[playerid][pChar]);
						return 1;
				}
			}
		}
	}
	if(PaintReg == false)
	{
		if(GetPVarInt(playerid, "Alpha") > 0)
		{
			switch(GetPVarInt(playerid, "Alpha"))
			{
			case 1:
				{
					new ralpha = random(sizeof(RandomAlpha));
					SetPlayerPos(playerid, RandomAlpha[ralpha][0], RandomAlpha[ralpha][1],RandomAlpha[ralpha][2]);
					SetPlayerFacingAngle(playerid, RandomAlpha[ralpha][3]);
					SetPlayerInterior(playerid, 10), SetCameraBehindPlayer(playerid);
					GivePlayerWeapon(playerid, 24, 30), GivePlayerWeapon(playerid, 31, 100);
					if(Player[playerid][pSex] == 1) return SetPlayerSkin(playerid, 121);
					else return SetPlayerSkin(playerid, 298);
				}
			case 2:
				{
					SetPlayerPos(playerid, -969.9929,1089.3519,1345.0090);
					SetPlayerFacingAngle(playerid, 180.0414);
					SetPlayerInterior(playerid, 10), SetCameraBehindPlayer(playerid);
					GivePlayerWeapon(playerid, 41, 1500);
					if(Player[playerid][pSex] == 1) return SetPlayerSkin(playerid, 274);
					else return SetPlayerSkin(playerid, 41);
				}
			}
		}
	}*/
	return 1;
}

Прошу заметить что часть отключена т.е. /* и */

 

Share this post


Link to post

11 answers to this question

  • 0
41 минуту назад, Remmi_Feed сказал:

2439.9243, -1791.7804, 1224.4102

Это чего координаты, нужного места?

Share this post


Link to post
  • 0

@DEST да

Share this post


Link to post
  • 0

@Remmi_Feed значит после ТП по неверным координатам, сделай /save и примерные координаты ищи в моде, как найдешь замени на нужные и все

Share this post


Link to post
  • 0

@DEST я сначала так и хотел сделать однако нет

Share this post


Link to post
  • 0

@Remmi_Feed значит, придется вам смириться :(

Спавн идет сразу или после смерти? 

Share this post


Link to post
  • 0

@DEST сразу

Share this post


Link to post
  • 0

@Remmi_Feed Значит, ищите паблики которые также вызываются сразу при подключении (дефолтный - OnPlayerConnect). Возможно, есть кастомные паблики например: SetPlayerSpawn или еще какие-то вариации этих названий. 

Share this post


Link to post
  • 0

@Remmi_Feed Если,не секрет что за игровой мод?Т.к в одном,из модов встречался,с данной проблемой,и исправить её было легко :)

Share this post


Link to post
  • 0

@DEST единственное что это вот эти ограничения, может в них проблема, но если убрать то пишет что 

GunCheckTime[playerid] = 5; не известный символ, писал new GunCheckTime; там еще ошибки. Возможно не так объявляю переменную

@Maks_Badanov supernal rp, как же вы решили проблему?

Share this post


Link to post
  • 0

@Remmi_Feed К сожаленю,другой мод,ну допустим в моде Just RP,если ты не администратор и тебя,убили ты попал в больницу,если ты администратор,просто спавнишься,на том месте где у тебя стоит,спавн :)Попробуйте,может тоже такая,система.

Share this post


Link to post
  • 0

@Maks_Badanov так я вообще в доме появляюсь

 

Share this post


Link to post
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • Nik_Rofid
      By Nik_Rofid
          if(IsPlayerInRangeOfPoint(playerid, 5.0, -433.155, 782.72, 12.5547)) Dialog(playerid, DIALOG_WSP_ELOMS, DIALOG_STYLE_MSGBOX, "{ffffff}Разработчик","{ffffff}Взломаем сервер?","Да", "Нет");
          }
          else //Еррор здесь
          {
          SCM(playerid, 0xCECECEFF, "2331");
          }
      Проблема: Здравсвуйте, При компиляции вылезла 1 ошибка C:\Users\User\Desktop\Мод 7.1 с гс чат\gamemodes\new.pwn(20655) : error 010: invalid function or declaration
      Буду рад если поможете!