Рекомендованные сообщения



Не найдено.

15 posts in this topic

Суть проблемы: Допустим игрока посадили в тюрьму не важно администратор или полицейский(Баг произходит и так и так.) При использованье команды /unjail или по истеканию срока игрока кидает в 3 разных места, зависит от тюрьмы в которую его посадили. (Я даже не знаю какие коды вам скидывать, поэтому скину пока что каманду unjail)

Спойлер

CMD:unjail(playerid, params[])
{
    IsAdmin(ADM_OLDER_MODER);
	else if(!gAdminLogged[playerid]) return SendClientMessage(playerid, COLOR_GREY, YouAreNotLoggedInAsAdmin);
	else if(sscanf(params, "d", params[0])) return SendClientMessage(playerid, COLOR_WHITE, "Введите: /unjail [id игрока]");
	else if(params[0] == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, PlayerIsNotOnline);
	else if(!gPlayerLogged[params[0]]) return SendClientMessage(playerid, COLOR_GREY, PlayerIsNotAuthorized);
	else if(pInfo[params[0]][pJail] == 0) return SendClientMessage(playerid, COLOR_GREY, "Игрок не находиться в тюрьме!");
	pInfo[params[0]][pJailTime] = 1;
	MysqlUpdatePlayerInt(params[0], "jailtime", pInfo[params[0]][pJailTime]);
	ResetPlayerWeaponsEx(params[0]);
	new string[100];
	format(string, sizeof(string), "[A] %s[%i] выпустил из тюрьмы %s[%i]",GetName(playerid),playerid,GetName(params[0]),params[0]);
	SendAdminMessage(COLOR_GRAD1, string);
	SpawnPlayerEx(playerid);
	return 1;
}

Напишите какой код еще скинуть что бы было бы болимение нормально понятно!

 

Share this post


Link to post
Share on other sites

@Nekit-smi так а проблема-то в чем? Нужно убрать это или что?

Share this post


Link to post
Share on other sites
17 часов назад, DEST сказал:

@Nekit-smi так а проблема-то в чем? Нужно убрать это или что?

Проблема в том что когда выходишь с тюрьмы или админ выпускает командой /unjail Ты появляешься в жопе какой то... Я предпологаю что это проблема с переменной SpawnPlayerEx. Надо Сделать что бы спавнило допустим дома или же на спавне фраки (Просто что бы сработала команда /spawn на человека который выходит с тюрьмы)

Спойлер

stock SpawnPlayerEx(playerid)
{
    if(IsPlayerInAnyVehicle(playerid))
	{
	    new Float:X,Float:Y,Float:Z;
	    GetPlayerPos(playerid,X,Y,Z);
		SetPlayerPos(playerid,X,Y,Z);
	    SetTimerEx("PlayerSpawn", 50, false, "i", playerid);
	    return 1;
	}
 	SpawnPlayer(playerid);
	return 1;
}

 

 

Edited by Nekit-smi

Share this post


Link to post
Share on other sites

@Nekit-smi OnPlayerSpawn кинь

Share this post


Link to post
Share on other sites
1 час назад, DEST сказал:

@Nekit-smi OnPlayerSpawn кинь

Спойлер

public OnPlayerSpawn(playerid)
{
	if(!gPlayerLogged[playerid])
	{
	    SendClientMessage(playerid, COLOR_RED, PlayerNeedToLoggedForToPlay);
		return SKick(playerid, 2);
	}
	AC_NoTwoKillFrag[playerid] = false;
	if(gKilled[playerid] == 1) gKilled[playerid] = 0;
	if(pInfo[playerid][pCash])
	{
		ResetPlayerMoney(playerid);
		GivePlayerMoney(playerid, pInfo[playerid][pCash]);
	}
	if(pTemp[playerid][pWork])
	{
		pTemp[playerid][pWork] = 0;
		for(new i; i < 4; i++) PlayerTextDrawHide(playerid, status_work_TD[playerid][i]);
	}
	if(pTemp[playerid][pArmyJob])
 	{
        pTemp[playerid][pArmyJob] = 0;
        gCountArmyJob ++;
        SendClientMessage(playerid, COLOR_RED, "Âû ïîêèíóëè ñêëàä îðóæèÿ è áîëüøå íå ÿâëÿåòåñü îõðàííèêîì");
	}
	if(GetPVarInt(playerid, "TaxiPrice") > 0)
	{
		DeletePVar(playerid, "TimeTaxi");
		DeletePVar(playerid, "TaxiPrice");
		DeletePVar(playerid, "PlayerTaxi");
	}
	if(FlyInfo[playerid][fType] == 1) SetPlayerCamera(playerid, 0);
    TogglePlayerControllable(playerid, true);
    SetArmour(playerid, 0);
    if(pInfo[playerid][pHeal] < 42) /*SetHealth(playerid, 10+random(40))*/PlayerDied[playerid] = true;
    else SetHealth(playerid, pInfo[playerid][pHeal]);
    SetHunger(playerid, pInfo[playerid][pHunger]);
 	DisablePlayerCheckpoint(playerid);
	SetPlayerVirtualWorld(playerid, 0);
	SetPlayerScore(playerid, pInfo[playerid][pLevel]);
	if(pInfo[playerid][pMember]) SetPlayerSkin(playerid, pInfo[playerid][pMemberSkin]);
	else SetPlayerSkin(playerid, pInfo[playerid][pModel]);
	SetPlayerColorEx(playerid, TeamColors[GetTeamID(playerid)]);
	if(pInfo[playerid][pFightStyle]) SetPlayerFightingStyle(playerid, pInfo[playerid][pFightStyle]);
	else SetPlayerFightingStyle(playerid, 0);
	if(pInfo[playerid][pWanted]) SetPlayerWantedLevel(playerid, pInfo[playerid][pWanted]);
	PlayerPlaySound(playerid, 1184, 0.0, 0.0, 0.0);
	SetPVarInt(playerid, "K_Times", 0);
    if(CanUse[playerid]>0) CanUse[playerid]=0;
    if(gym_cloakroom[playerid]) gym_cloakroom[playerid] = false;
    SetPlayerSkills(playerid);
    pTemp[playerid][pAbletoGun] = 2;
    new weapid, ammo;
	for (new i;i<13;i++)
	{
		GetPlayerWeaponData(playerid,i,weapid,ammo);
		if(weapid && ammo && gGuns[playerid][i] == weapid && gAmmos[playerid][i] <= ammo)
		{
		    GivePlayerWeaponEx(playerid,gGuns[playerid][i],gAmmos[playerid][i]);
		}
	}
	if(GetPVarInt(playerid, "first_spawn"))
	{
	    new gun[128];
		GetPVarString(playerid,"mysqlgun",gun,128);
		DeletePVar(playerid,"mysqlgun");
		if(strlen(gun))
		{
			new guns[6],ammos[6],datas[2][56];
			explode(datas,gun,";");
			sscanf(datas[0],"p<|>a<i>[6]",guns);
			sscanf(datas[1],"p<|>a<i>[6]",ammos);
			for(new i;i<6;i++) GivePlayerWeaponEx(playerid,guns[i],ammos[i]);
		}
		PreloadAnimLibAll(playerid);
		DeletePVar(playerid, "first_spawn");
	}
	new string[128];
	if(pInfo[playerid][Spectating][0] != INVALID_PLAYER_ID)
	{
	    SetPlayerPos(playerid, GetPVarFloat(playerid, "SpecX"), GetPVarFloat(playerid, "SpecY"), GetPVarFloat(playerid, "SpecZ"));
	    SetPlayerFacingAngle(playerid, GetPVarFloat(playerid, "SpecA"));
	    SetCameraBehindPlayer(playerid);
		SetPlayerVirtualWorld(playerid, GetPVarInt(playerid, "SpecVw"));
		SetPlayerInterior(playerid, GetPVarInt(playerid, "SpecInt"));
		DeletePVar(playerid, "SpecInt");
		DeletePVar(playerid, "SpecVw");
		DeletePVar(playerid, "SpecX");
		DeletePVar(playerid, "SpecY");
		DeletePVar(playerid, "SpecZ");
		DeletePVar(playerid, "SpecA");
		pInfo[playerid][Spectating][0] = pInfo[playerid][Spectating][1] = INVALID_PLAYER_ID;
		SetPlayerColorEx(playerid, TeamColors[GetTeamID(playerid)]);
		SetPlayerScore(playerid, pInfo[playerid][pLevel]);
		if(pInfo[playerid][pWanted]) SetPlayerWantedLevel(playerid, pInfo[playerid][pWanted]);
		if(pInfo[playerid][pMember]) SetPlayerSkin(playerid, pInfo[playerid][pMemberSkin]);
		else SetPlayerSkin(playerid, pInfo[playerid][pModel]);
		return 1;
	}
	if(GetPVarInt(playerid, "Fly_CurrentPlace"))
	{
	    SetPlayerPos(playerid, GetPVarFloat(playerid, "CurrentFlyX"), GetPVarFloat(playerid, "CurrentFlyY"), GetPVarFloat(playerid, "CurrentFlyZ"));
	    SetCameraBehindPlayer(playerid);
		SetPlayerVirtualWorld(playerid, GetPVarInt(playerid, "CurrentFlyVw"));
		SetPlayerInterior(playerid, GetPVarInt(playerid, "CurrentFlyInt"));
		DeletePVar(playerid, "Fly_CurrentPlace");
		DeletePVar(playerid, "CurrentFlyInt");
		DeletePVar(playerid, "CurrentFlyVw");
		DeletePVar(playerid, "CurrentFlyX");
		DeletePVar(playerid, "CurrentFlyY");
		DeletePVar(playerid, "CurrentFlyZ");
		pInfo[playerid][Spectating][0] = pInfo[playerid][Spectating][1] = INVALID_PLAYER_ID;
		SetPlayerColorEx(playerid, TeamColors[GetTeamID(playerid)]);
		SetPlayerScore(playerid, pInfo[playerid][pLevel]);
		if(pInfo[playerid][pWanted]) SetPlayerWantedLevel(playerid, pInfo[playerid][pWanted]);
		if(pInfo[playerid][pMember]) SetPlayerSkin(playerid, pInfo[playerid][pMemberSkin]);
		else SetPlayerSkin(playerid, pInfo[playerid][pModel]);
		return 1;
	}
	if(GetPVarInt(playerid, "Fly_PlaceLaunch"))
	{
	    SetPlayerPos(playerid, GetPVarFloat(playerid, "FlyX"), GetPVarFloat(playerid, "FlyY"), GetPVarFloat(playerid, "FlyZ"));
	    SetPlayerFacingAngle(playerid, GetPVarFloat(playerid, "FlyA"));
	    SetCameraBehindPlayer(playerid);
		SetPlayerVirtualWorld(playerid, GetPVarInt(playerid, "FlyVw"));
		SetPlayerInterior(playerid, GetPVarInt(playerid, "FlyInt"));
		DeletePVar(playerid, "Fly_PlaceLaunch");
		DeletePVar(playerid, "FlyInt");
		DeletePVar(playerid, "FlyVw");
		DeletePVar(playerid, "FlyX");
		DeletePVar(playerid, "FlyY");
		DeletePVar(playerid, "FlyZ");
		DeletePVar(playerid, "FlyA");
		SetPlayerColorEx(playerid, TeamColors[GetTeamID(playerid)]);
		SetPlayerScore(playerid, pInfo[playerid][pLevel]);
		if(pInfo[playerid][pWanted]) SetPlayerWantedLevel(playerid, pInfo[playerid][pWanted]);
		if(pInfo[playerid][pMember]) SetPlayerSkin(playerid, pInfo[playerid][pMemberSkin]);
		else SetPlayerSkin(playerid, pInfo[playerid][pModel]);
		return 1;
	}
	else if(ClothesRound[playerid] == 1)
	{
	    SetPlayerPos(playerid,-668.6816, -1581.2933, 1001.0993);
		SetPlayerFacingAngle(playerid,182.00000);
		SetPlayerCameraPos(playerid, -668.6038, -1585.5938, 1001.2456);
		//SetPlayerCameraPos(playerid,1772.4346-3.5*floatsin(181.0849,degrees),-1953.5457+3.5*floatcos(181.0849,degrees),15.1519);
		SetPlayerCameraLookAt(playerid,-668.6747, -1584.5967, 1001.1459);
		SetPlayerInterior(playerid, 1);
		SetPlayerVirtualWorld(playerid,playerid);
		SendClientMessage(playerid, 0x3399FFFF, "Âûáåðèòå ñåáå ïîäõîäÿùóþ îäåæäó, ïîñëå âûáîðà íàæìèòå {63BD4E}SAVE");
		SendClientMessage(playerid, 0xFFCC00FF, "×òîáû ïðîñìîòðåòü îäåæäó, èñïîëüçóéòå {FF6600}NEXT >> {FFCC00}è {FF6600}<< BACK");
		TogglePlayerControllable(playerid, 0);
		ShowMenuForPlayer(clothing_selection, playerid);
		SetHealth(playerid, 100.0);
		if(pInfo[playerid][pSex] == 1) SetPlayerSkin(playerid, JoinRegM[SelectCharPlace[playerid]]), ChosenSkin[playerid] = JoinRegM[0];
		else SetPlayerSkin(playerid, JoinRegF[SelectCharPlace[playerid]]), ChosenSkin[playerid] = JoinRegF[0];
	}
	else if(ClothesRound[playerid] == 2)
	{
	    SendClientMessage(playerid, 0x3399FFFF, "Âûáåðèòå ñåáå ïîäõîäÿùóþ îäåæäó,  ïîñëå âûáîðà íàæìèòå {63BD4E}BUY{3399FF}, äëÿ îòìåíû íàæìèòå {F04245}EXIT");
		SendClientMessage(playerid, 0xFFCC00FF, "×òîáû ïðîñìîòðåòü îäåæäó, èñïîëüçóéòå {FF6600}NEXT >> {FFCC00}è {FF6600}<< BACK");
		SetPlayerPos(playerid,-1773.3794, 1767.9017, 2377.4482);
	    SetPlayerFacingAngle(playerid,42.2389);
	    SetPlayerCameraPos(playerid, -1775.5872, 1769.9413, 2377.9160);
		//SetPlayerCameraPos(playerid,2180.4900-3.5*floatsin(267.7833,degrees),1622.0040+3.5*floatcos(267.7833,degrees),1043.5634);
		SetPlayerCameraLookAt(playerid,-1774.8374, 1769.2820, 2377.7180);
		SetPlayerVirtualWorld(playerid, playerid);
	    SetPlayerInterior(playerid, 1);
	    TogglePlayerControllable(playerid, 0);
		ShowMenuForPlayer(buy_clothing, playerid);
		if(pInfo[playerid][pSex] == 1)
		{
			SelectCharPlace[playerid] = 0;
			SetPlayerSkin(playerid, JoinShopM[SelectCharPlace[playerid]][0]);
			format(string, sizeof(string), "~w~~n~~n~~n~~n~~n~~n~COST: ~g~%i$", JoinShopM[SelectCharPlace[playerid]][1]);
		}
		else
		{
			SelectCharPlace[playerid] = 0;
			SetPlayerSkin(playerid, JoinShopF[SelectCharPlace[playerid]][0]);
			format(string, sizeof(string), "~w~~n~~n~~n~~n~~n~~n~COST: ~g~%i$", JoinShopF[SelectCharPlace[playerid]][1]);
		}
		GameTextForPlayer(playerid, string, 3000, 3);
	}
	else if(pInfo[playerid][pJail] == 1)
	{
		new rand_coord = random(sizeof(JailSpawn));
	    SetPlayerPos(playerid, JailSpawn[rand_coord][0], JailSpawn[rand_coord][1], JailSpawn[rand_coord][2], 1);
	    SetPlayerFacingAngle(playerid, JailSpawn[rand_coord][3]);
		SetPlayerInterior(playerid, 1);
		SetPlayerVirtualWorld(playerid, 1);
		SetCameraBehindPlayer(playerid);
		format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~JAILED: ~w~%d", pInfo[playerid][pJailTime]);
		GameTextForPlayer(playerid, string, 3000, 3);
		SendClientMessage(playerid, COLOR_RED, "Âû åùå íå îòñèäåëè ñâîé òþðåìíûé ñðîê (/jailtime)");
	}
	else if(pInfo[playerid][pJail] == 2)
	{
		new rand_coord = random(sizeof(JailSpawn));
	    SetPlayerPos(playerid, JailSpawn[rand_coord][0], JailSpawn[rand_coord][1], JailSpawn[rand_coord][2], 1);
	    SetPlayerFacingAngle(playerid, JailSpawn[rand_coord][3]);
		SetPlayerInterior(playerid, 1);
		SetPlayerVirtualWorld(playerid, 2);
		SetCameraBehindPlayer(playerid);
		format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~JAILED: ~w~%d", pInfo[playerid][pJailTime]);
		GameTextForPlayer(playerid, string, 3000, 3);
		SendClientMessage(playerid, COLOR_RED, "Âû åùå íå îòñèäåëè ñâîé òþðåìíûé ñðîê (/jailtime)");
	}
	else if(pInfo[playerid][pJail] == 3)
	{
	    new rand_coord = random(sizeof(JailSpawn));
	    SetPlayerPos(playerid, JailSpawn[rand_coord][0], JailSpawn[rand_coord][1], JailSpawn[rand_coord][2], 1);
	    SetPlayerFacingAngle(playerid, JailSpawn[rand_coord][3]);
		SetPlayerInterior(playerid, 1);
		SetPlayerVirtualWorld(playerid, 3);
		SetCameraBehindPlayer(playerid);
		format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~JAILED: ~w~%d", pInfo[playerid][pJailTime]);
		GameTextForPlayer(playerid, string, 3000, 3);
		SendClientMessage(playerid, COLOR_RED, "Âû åùå íå îòñèäåëè ñâîé òþðåìíûé ñðîê (/jailtime)");
	}
	else if(pInfo[playerid][pJail] == 4)
	{
		SetPlayerPos(playerid,5494.0488,1245.3721,23.1886);
		SetPlayerFacingAngle(playerid, 270.0000);
		SetPlayerInterior(playerid, 1);
		SetPlayerVirtualWorld(playerid, 1);
		SetCameraBehindPlayer(playerid);
		format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~JAILED: ~w~%d", pInfo[playerid][pJailTime]);
		GameTextForPlayer(playerid, string, 3000, 3);
		if(pInfo[playerid][pText][3] == 0)
		{
			SendClientMessage(playerid, COLOR_RED, "Âû åùå íå îòñèäåëè ñâîé òþðåìíûé ñðîê (/jailtime)");
		}
		else
		{
		    if(!GetString(pInfo[playerid][pJailReason], "None"))
		    {
		        format(string, sizeof(string), "[Èíôîðìàöèÿ] {FFFFFF}Âû áûëè ïîñàæåíû â äåìîðãàí â îôôëàéíå. Ïðè÷èíà: %s (/jailtime)", pInfo[playerid][pJailReason]);
				SendClientMessage(playerid, COLOR_YELLOW, string);
				strmid(pInfo[playerid][pJailReason], "None", 0, strlen("None"), 32);
				MysqlUpdatePlayerStr(playerid, "jailreason", pInfo[playerid][pJailReason]);
			}
		    mysql_query_string[0] = EOS;
			format(mysql_query_string, 256, "UPDATE "T_ACCOUNTS" SET text = '%i, %i, %i, 0, %i' WHERE name = '%s'", pInfo[playerid][pText][0], pInfo[playerid][pText][1], pInfo[playerid][pText][2], pInfo[playerid][pText][4], GetName(playerid));
			mysql_tquery(dbHandle, mysql_query_string, "", "");
		}
	}
	else if(PlayerDied[playerid])
	{
//	    new rand_coord = random(sizeof(MedicSpawn));
//	    SetPlayerPos(playerid, MedicSpawn[rand_coord][0], MedicSpawn[rand_coord][1], MedicSpawn[rand_coord][2], 1);
//	    SetPlayerFacingAngle(playerid, 90.0000);
	    switch(random(3))
	    {
	        case 0:
			{
			    SetPlayerPos(playerid,2468.6204,-2147.3486,634.2466,1);
			    SetPlayerFacingAngle(playerid, 90.0000);
			    SetPlayerVirtualWorld(playerid,4);
			    SetPlayerInterior(playerid,1);
			}
	        case 1:
	        {
	            SetPlayerPos(playerid,367.0321,158.1389,1003.8500,1);
	            SetPlayerFacingAngle(playerid, 90.0000);
	            SetPlayerVirtualWorld(playerid,5);
	            SetPlayerInterior(playerid,1);
	        }
	        case 2:
			{
			    SetPlayerPos(playerid,2468.6204,-2147.3486,634.2466,1);
			    SetPlayerFacingAngle(playerid, 90.0000);
			    SetPlayerVirtualWorld(playerid,6);
			    SetPlayerInterior(playerid,1);
			}
/*	        default:
	        {
	            SetPlayerVirtualWorld(playerid,6);
	            SetPlayerInterior(playerid,1);
	        }*/
	    }
	    SetHealth(playerid, 10+random(40));
        SendClientMessage(playerid,COLOR_WHITE,"Âàì ïðèäåòñÿ ïðîéòè êóðñ ëå÷åíèÿ èëè âûëå÷èòüñÿ ó ìåäèêà. Âîéäèòå â ïàëàòó è äåëàéòå ïðîöåäóðó.");
	}
    else if(pInfo[playerid][pHouse] != 0 && pInfo[playerid][pSpawnChange] == 1)
	{
	    new i = pInfo[playerid][pHouse], _c = HouseInfo[i][hClass], _i = HouseInfo[i][hInt];
		SetPlayerPos(playerid, HintsInfo[_c][_i][hiExitX], HintsInfo[_c][_i][hiExitY], HintsInfo[_c][_i][hiExitZ], 1);
		SetPlayerFacingAngle(playerid, HintsInfo[_c][_i][hiExitFA]);
		SetCameraBehindPlayer(playerid);
		SetPlayerInterior(playerid, HintsInfo[_c][_i][hiInt]);
		SetPlayerVirtualWorld(playerid, HouseInfo[i][hID]);
		SetPVarInt(playerid, "UseHouse", i);
	}
	else if(pInfo[playerid][pMember] == TEAM_LSMAYOR && pInfo[playerid][pSpawnChange] == 2)
	{
		SetPlayerPos(playerid, -937.2898,873.0830,2512.9500, 1);// Ñïàâí àäìèíèñòðàöèè þæíûé
		SetPlayerFacingAngle(playerid, 270.1464);
		SetCameraBehindPlayer(playerid);
		SetPlayerInterior(playerid, 3);
		SetPlayerVirtualWorld(playerid, 1);
	}
	else if(pInfo[playerid][pMember] == TEAM_SFMAYOR && pInfo[playerid][pSpawnChange] == 2)
	{
		SetPlayerPos(playerid, 170.9268,1161.7322,542.4528, 1);
		SetPlayerFacingAngle(playerid, 90.9611);
		SetCameraBehindPlayer(playerid);
		SetPlayerInterior(playerid, 3);
		SetPlayerVirtualWorld(playerid, 2);
	}
	else if(pInfo[playerid][pMember] == TEAM_LVMAYOR && pInfo[playerid][pSpawnChange] == 2)
	{
		SetPlayerPos(playerid, -937.2898,873.0830,2512.9500, 1);
		SetPlayerFacingAngle(playerid, 270.1464);
		SetCameraBehindPlayer(playerid);
		SetPlayerInterior(playerid, 3);
		SetPlayerVirtualWorld(playerid, 3);
	}
	else if(pInfo[playerid][pMember] == TEAM_DPS && pInfo[playerid][pSpawnChange] == 2)
	{
	    SetPlayerPos(playerid, 877.2130,2097.5388,2721.8101);
	    SetPlayerFacingAngle(playerid, 269.9558);
	    SetCameraBehindPlayer(playerid);
		SetPlayerInterior(playerid, 1);
	    SetPlayerVirtualWorld(playerid, 1);
	}
	else if(pInfo[playerid][pMember] == TEAM_SFPD && pInfo[playerid][pSpawnChange] == 2)
	{
		SetPlayerPos(playerid, 2210.4004,-523.8504,-2.6141, 1);
	    SetPlayerFacingAngle(playerid, 269.9558);
		SetCameraBehindPlayer(playerid);
		SetPlayerInterior(playerid, 1);
		SetPlayerVirtualWorld(playerid, 2);
	}
	else if(pInfo[playerid][pMember] == TEAM_FBI && pInfo[playerid][pSpawnChange] == 2)
	{
		SetPlayerPos(playerid, 227.8871,-465.6732,1006.4200, 1);
		SetPlayerFacingAngle(playerid, 93.4680);
		SetCameraBehindPlayer(playerid);
		SetPlayerInterior(playerid, 2);
		SetPlayerVirtualWorld(playerid, 0);
	}
	else if(pInfo[playerid][pMember] == TEAM_LSHOSPITAL && pInfo[playerid][pSpawnChange] == 2)
	{
		SetPlayerPos(playerid, 2480.3799,-2140.8325,634.2466, 1);//Ñïàâí áîëüíèöû þæíûé
		SetPlayerFacingAngle(playerid, 359.5859);
		SetCameraBehindPlayer(playerid);
		SetPlayerInterior(playerid, 1);
		SetPlayerVirtualWorld(playerid, 4);
	}
	else if(pInfo[playerid][pMember] == TEAM_SFHOSPITAL && pInfo[playerid][pSpawnChange] == 2)
	{
		SetPlayerPos(playerid, 375.3733,146.7827,1003.8500, 1);//Ñïàâí áîëüíèöû áàòûðåâî
		SetPlayerFacingAngle(playerid, 79.2507);
		SetCameraBehindPlayer(playerid);
		SetPlayerInterior(playerid, 1);
		SetPlayerVirtualWorld(playerid, 5);
	}
	else if(pInfo[playerid][pMember] == TEAM_LVHOSPITAL && pInfo[playerid][pSpawnChange] == 2)
	{
		SetPlayerPos(playerid, 2480.3799,-2140.8325,634.2466, 1);
		SetPlayerFacingAngle(playerid, 359.5859);
		SetCameraBehindPlayer(playerid);
		SetPlayerInterior(playerid, 1);
		SetPlayerVirtualWorld(playerid, 6);
	}
	else if(pInfo[playerid][pMember] == TEAM_AUTOSCHOOL && pInfo[playerid][pSpawnChange] == 2)
	{
		SetPlayerPos(playerid, 2311.7302,-1941.5127,2022.9600, 1);//Ñïàâí àâòîøêîëà
		SetPlayerFacingAngle(playerid, 7.8568);
		SetCameraBehindPlayer(playerid);
		SetPlayerInterior(playerid, 1);
		SetPlayerVirtualWorld(playerid, 1);
	}
	else if(pInfo[playerid][pMember] == TEAM_GROVE && pInfo[playerid][pSpawnChange] == 2)
	{
		SetPlayerPos(playerid, 420.3829,1658.2628,-31.3641, 1);// Ñïàâí îïã Þæíàÿ
		SetPlayerFacingAngle(playerid, 0.8654);
		SetCameraBehindPlayer(playerid);
		SetPlayerInterior(playerid, 1);
	    SetPlayerVirtualWorld(playerid, 1);
	}
	else if(pInfo[playerid][pMember] == TEAM_BALLAS && pInfo[playerid][pSpawnChange] == 2)
	{
		SetPlayerPos(playerid, 420.3829,1658.2628,-31.3641, 1);
		SetPlayerFacingAngle(playerid, 0.8654);
		SetCameraBehindPlayer(playerid);
		SetPlayerInterior(playerid, 1);
	    SetPlayerVirtualWorld(playerid, 5);
	}
	else if(pInfo[playerid][pMember] == TEAM_RIFA && pInfo[playerid][pSpawnChange] == 2)
	{
		SetPlayerPos(playerid, 420.3829,1658.2628,-31.3641, 1);
		SetPlayerFacingAngle(playerid, 0.8654);
		SetCameraBehindPlayer(playerid);
		SetPlayerInterior(playerid, 1);
	    SetPlayerVirtualWorld(playerid, 3);
	}
	else if(pInfo[playerid][pMember] == TEAM_AZTECAS && pInfo[playerid][pSpawnChange] == 2)
	{
		SetPlayerPos(playerid, 420.3829,1658.2628,-31.3641, 1);
		SetPlayerFacingAngle(playerid, 0.8654);
		SetCameraBehindPlayer(playerid);
		SetPlayerInterior(playerid, 1);
	    SetPlayerVirtualWorld(playerid, 4);
	}
	else if(pInfo[playerid][pMember] == TEAM_VAGOS && pInfo[playerid][pSpawnChange] == 2)
	{
		SetPlayerPos(playerid, 420.3829,1658.2628,-31.3641, 1);
		SetPlayerFacingAngle(playerid, 0.8654);
		SetCameraBehindPlayer(playerid);
		SetPlayerInterior(playerid, 1);
	    SetPlayerVirtualWorld(playerid, 2);
	}
	else if(pInfo[playerid][pMember] == TEAM_NG && pInfo[playerid][pSpawnChange] == 2)
	{
	    SetPlayerPos(playerid, -303.7119,322.7673,2213.0000, 1);// Ñïàâí àðìèè
		SetPlayerFacingAngle(playerid, 182.3619);
		SetCameraBehindPlayer(playerid);
	    SetPlayerInterior(playerid, 1);
	    SetPlayerVirtualWorld(playerid, 1);
	}
	else if(pInfo[playerid][pMember] == TEAM_LCN && pInfo[playerid][pSpawnChange] == 2)
	{
		SetPlayerPos(playerid, 260.6152,1772.5627,575.3359, 1);// Ñïàâí èòàëèÿ ìàôèÿ
		SetPlayerFacingAngle(playerid, 179.7802);
		SetCameraBehindPlayer(playerid);
		SetPlayerInterior(playerid, 5);
		SetPlayerVirtualWorld(playerid, 1);
	}
	else if(pInfo[playerid][pMember] == TEAM_YAKUZA && pInfo[playerid][pSpawnChange] == 2)
	{
		SetPlayerPos(playerid, 2559.3193,-1845.4357,2522.8401, 1);// Ñïàâí ßêóäçû
		SetPlayerFacingAngle(playerid, 179.7802);
		SetCameraBehindPlayer(playerid);
		SetPlayerInterior(playerid, 5);
		SetPlayerVirtualWorld(playerid, 2);
	}
	else if(pInfo[playerid][pMember] == TEAM_RM && pInfo[playerid][pSpawnChange] == 2)
	{
		SetPlayerPos(playerid, -2631.7493,2917.9336,2738.6201, 1);//Ñïàâí Ðóññêàÿ Ìàôèÿ
		SetPlayerFacingAngle(playerid, 179.7802);
		SetCameraBehindPlayer(playerid);
		SetPlayerInterior(playerid, 5);
		SetPlayerVirtualWorld(playerid, 3);
	}
	else if(pInfo[playerid][pMember] == TEAM_LSNEWS && pInfo[playerid][pSpawnChange] == 2)
	{
		SetPlayerPos(playerid, -108.1242,461.7322,3013.1499, 1);
		SetPlayerFacingAngle(playerid, 359.0987);
		SetCameraBehindPlayer(playerid);
		SetPlayerInterior(playerid, 1);
		SetPlayerVirtualWorld(playerid, 1);
	}
	else if(pInfo[playerid][pMember] == TEAM_SFNEWS && pInfo[playerid][pSpawnChange] == 2)
	{
		SetPlayerPos(playerid, -1071.3462,2210.8601,1002.0000, 1);
		SetPlayerFacingAngle(playerid, 359.0987);
		SetCameraBehindPlayer(playerid);
		SetPlayerInterior(playerid, 1);
		SetPlayerVirtualWorld(playerid, 2);
	}
	else if(pInfo[playerid][pMember] == TEAM_LVNEWS && pInfo[playerid][pSpawnChange] == 2)
	{
		SetPlayerPos(playerid, -1742.6841,2593.1270,62.6659, 1);
		SetPlayerFacingAngle(playerid, 359.0987);
		SetCameraBehindPlayer(playerid);
		SetPlayerInterior(playerid, 1);
		SetPlayerVirtualWorld(playerid, 3);
	}
	else if(pInfo[playerid][pMember] == TEAM_LVPD && pInfo[playerid][pSpawnChange] == 2)
	{
		SetPlayerPos(playerid, 877.2130,2097.5388,2721.8101, 1);
	    SetPlayerFacingAngle(playerid, 269.9558);
		SetCameraBehindPlayer(playerid);
		SetPlayerInterior(playerid, 1);
		SetPlayerVirtualWorld(playerid, 3);
	}
	else if(pInfo[playerid][pMember] >= 1 && pInfo[playerid][pSpawnChange] == 0 || pInfo[playerid][pMember] == 0)
	{
		if(pInfo[playerid][pLevel] >= 1 && pInfo[playerid][pLevel] <= 3)
		{
		    switch(random(3))
		    {
				//ÆÄ-Âîêçàë
		        case 0:
				{
					SetPlayerPos(playerid, 2515.5547,-2119.0225,24.1524);
					SetPlayerFacingAngle(playerid, 270.0000);
				}
		        case 1:
				{
					SetPlayerPos(playerid, 2267.5657,-2189.0391,22.0084);
					SetPlayerFacingAngle(playerid, 270.0000);
				}
				//Àâòîâîêçàë
				case 2:
				{
				    SetPlayerPos(playerid,2267.5657,-2189.0391,22.0084);
					SetPlayerFacingAngle(playerid,358.9097);
				}
		    }
			SetCameraBehindPlayer(playerid);
			SetPlayerInterior(playerid, 0);
			SetPlayerVirtualWorld(playerid, 0);
		}
		if(pInfo[playerid][pLevel] >= 4 && pInfo[playerid][pLevel] <= 7)
	    {
			SetPlayerPos(playerid, 1924.9647,2076.8179,15.7370);
			SetPlayerFacingAngle(playerid, 180.0000);
			SetCameraBehindPlayer(playerid);
			SetPlayerInterior(playerid, 0);
			SetPlayerVirtualWorld(playerid, 0);
		}
		if(pInfo[playerid][pLevel] >= 8)
	    {
			SetPlayerPos(playerid, 1820.8707,2524.4622,15.8179);
			SetPlayerFacingAngle(playerid, 123.9908);
			SetCameraBehindPlayer(playerid);
			SetPlayerInterior(playerid, 0);
			SetPlayerVirtualWorld(playerid, 0);
		}
	}
	gPlayerSpawned[playerid] = true;
	return 1;
}

 

 

Share this post


Link to post
Share on other sites

Найди в моде массив JailSpawn и покажи его содержимое.

Share this post


Link to post
Share on other sites
49 минут назад, Elrmrnt-Kritik сказал:

Найди в моде массив JailSpawn и покажи его содержимое.

static const stock Float:JailSpawn[4][4] = {
	{897.5146,2080.9880,2721.8101},
	{2210.1938,-505.2677,-7.4141},
	{1004.1040,576.0970,1010.5649,0.6477},
	{1001.0569,590.8435,1010.5649,179.5393}

 

Share this post


Link to post
Share on other sites

Вот на одни из этих координат игрока должно спавнить (первые три координаты каждого столбика смотри).

Share this post


Link to post
Share on other sites

Не шарю как сделать что бы его просто спавнило (Как буддто команой /spawn)

Share this post


Link to post
Share on other sites
В ‎01‎.‎06‎.‎2018 в 15:53, DEST сказал:

@Nekit-smi OnPlayerSpawn кинь

Не шарю как сделать что бы его просто спавнило (Как буддто команой /spawn)  

Я выше скинул OnPlayerSpawn

 

Share this post


Link to post
Share on other sites

@Nekit-smi на русском копировать из PAWNO нужно

Share this post


Link to post
Share on other sites
1 час назад, DEST сказал:

@Nekit-smi на русском копировать из PAWNO нужно

Спойлер

{
	if(!gPlayerLogged[playerid])
	{
	    SendClientMessage(playerid, COLOR_RED, PlayerNeedToLoggedForToPlay);
		return SKick(playerid, 2);
	}
	AC_NoTwoKillFrag[playerid] = false;
	if(gKilled[playerid] == 1) gKilled[playerid] = 0;
	if(pInfo[playerid][pCash])
	{
		ResetPlayerMoney(playerid);
		GivePlayerMoney(playerid, pInfo[playerid][pCash]);
	}
	if(pTemp[playerid][pWork])
	{
		pTemp[playerid][pWork] = 0;
		for(new i; i < 4; i++) PlayerTextDrawHide(playerid, status_work_TD[playerid][i]);
	}
	if(pTemp[playerid][pArmyJob])
 	{
        pTemp[playerid][pArmyJob] = 0;
        gCountArmyJob ++;
        SendClientMessage(playerid, COLOR_RED, "Вы покинули склад оружия и больше не являетесь охранником");
	}
	if(GetPVarInt(playerid, "TaxiPrice") > 0)
	{
		DeletePVar(playerid, "TimeTaxi");
		DeletePVar(playerid, "TaxiPrice");
		DeletePVar(playerid, "PlayerTaxi");
	}
	if(FlyInfo[playerid][fType] == 1) SetPlayerCamera(playerid, 0);
    TogglePlayerControllable(playerid, true);
    SetArmour(playerid, 0);
    if(pInfo[playerid][pHeal] < 42) /*SetHealth(playerid, 10+random(40))*/PlayerDied[playerid] = true;
    else SetHealth(playerid, pInfo[playerid][pHeal]);
    SetHunger(playerid, pInfo[playerid][pHunger]);
 	DisablePlayerCheckpoint(playerid);
	SetPlayerVirtualWorld(playerid, 0);
	SetPlayerScore(playerid, pInfo[playerid][pLevel]);
	if(pInfo[playerid][pMember]) SetPlayerSkin(playerid, pInfo[playerid][pMemberSkin]);
	else SetPlayerSkin(playerid, pInfo[playerid][pModel]);
	SetPlayerColorEx(playerid, TeamColors[GetTeamID(playerid)]);
	if(pInfo[playerid][pFightStyle]) SetPlayerFightingStyle(playerid, pInfo[playerid][pFightStyle]);
	else SetPlayerFightingStyle(playerid, 0);
	if(pInfo[playerid][pWanted]) SetPlayerWantedLevel(playerid, pInfo[playerid][pWanted]);
	PlayerPlaySound(playerid, 1184, 0.0, 0.0, 0.0);
	SetPVarInt(playerid, "K_Times", 0);
    if(CanUse[playerid]>0) CanUse[playerid]=0;
    if(gym_cloakroom[playerid]) gym_cloakroom[playerid] = false;
    SetPlayerSkills(playerid);
    pTemp[playerid][pAbletoGun] = 2;
    new weapid, ammo;
	for (new i;i<13;i++)
	{
		GetPlayerWeaponData(playerid,i,weapid,ammo);
		if(weapid && ammo && gGuns[playerid][i] == weapid && gAmmos[playerid][i] <= ammo)
		{
		    GivePlayerWeaponEx(playerid,gGuns[playerid][i],gAmmos[playerid][i]);
		}
	}
	if(GetPVarInt(playerid, "first_spawn"))
	{
	    new gun[128];
		GetPVarString(playerid,"mysqlgun",gun,128);
		DeletePVar(playerid,"mysqlgun");
		if(strlen(gun))
		{
			new guns[6],ammos[6],datas[2][56];
			explode(datas,gun,";");
			sscanf(datas[0],"p<|>a<i>[6]",guns);
			sscanf(datas[1],"p<|>a<i>[6]",ammos);
			for(new i;i<6;i++) GivePlayerWeaponEx(playerid,guns[i],ammos[i]);
		}
		PreloadAnimLibAll(playerid);
		DeletePVar(playerid, "first_spawn");
	}
	new string[128];
	if(pInfo[playerid][Spectating][0] != INVALID_PLAYER_ID)
	{
	    SetPlayerPos(playerid, GetPVarFloat(playerid, "SpecX"), GetPVarFloat(playerid, "SpecY"), GetPVarFloat(playerid, "SpecZ"));
	    SetPlayerFacingAngle(playerid, GetPVarFloat(playerid, "SpecA"));
	    SetCameraBehindPlayer(playerid);
		SetPlayerVirtualWorld(playerid, GetPVarInt(playerid, "SpecVw"));
		SetPlayerInterior(playerid, GetPVarInt(playerid, "SpecInt"));
		DeletePVar(playerid, "SpecInt");
		DeletePVar(playerid, "SpecVw");
		DeletePVar(playerid, "SpecX");
		DeletePVar(playerid, "SpecY");
		DeletePVar(playerid, "SpecZ");
		DeletePVar(playerid, "SpecA");
		pInfo[playerid][Spectating][0] = pInfo[playerid][Spectating][1] = INVALID_PLAYER_ID;
		SetPlayerColorEx(playerid, TeamColors[GetTeamID(playerid)]);
		SetPlayerScore(playerid, pInfo[playerid][pLevel]);
		if(pInfo[playerid][pWanted]) SetPlayerWantedLevel(playerid, pInfo[playerid][pWanted]);
		if(pInfo[playerid][pMember]) SetPlayerSkin(playerid, pInfo[playerid][pMemberSkin]);
		else SetPlayerSkin(playerid, pInfo[playerid][pModel]);
		return 1;
	}
	if(GetPVarInt(playerid, "Fly_CurrentPlace"))
	{
	    SetPlayerPos(playerid, GetPVarFloat(playerid, "CurrentFlyX"), GetPVarFloat(playerid, "CurrentFlyY"), GetPVarFloat(playerid, "CurrentFlyZ"));
	    SetCameraBehindPlayer(playerid);
		SetPlayerVirtualWorld(playerid, GetPVarInt(playerid, "CurrentFlyVw"));
		SetPlayerInterior(playerid, GetPVarInt(playerid, "CurrentFlyInt"));
		DeletePVar(playerid, "Fly_CurrentPlace");
		DeletePVar(playerid, "CurrentFlyInt");
		DeletePVar(playerid, "CurrentFlyVw");
		DeletePVar(playerid, "CurrentFlyX");
		DeletePVar(playerid, "CurrentFlyY");
		DeletePVar(playerid, "CurrentFlyZ");
		pInfo[playerid][Spectating][0] = pInfo[playerid][Spectating][1] = INVALID_PLAYER_ID;
		SetPlayerColorEx(playerid, TeamColors[GetTeamID(playerid)]);
		SetPlayerScore(playerid, pInfo[playerid][pLevel]);
		if(pInfo[playerid][pWanted]) SetPlayerWantedLevel(playerid, pInfo[playerid][pWanted]);
		if(pInfo[playerid][pMember]) SetPlayerSkin(playerid, pInfo[playerid][pMemberSkin]);
		else SetPlayerSkin(playerid, pInfo[playerid][pModel]);
		return 1;
	}
	if(GetPVarInt(playerid, "Fly_PlaceLaunch"))
	{
	    SetPlayerPos(playerid, GetPVarFloat(playerid, "FlyX"), GetPVarFloat(playerid, "FlyY"), GetPVarFloat(playerid, "FlyZ"));
	    SetPlayerFacingAngle(playerid, GetPVarFloat(playerid, "FlyA"));
	    SetCameraBehindPlayer(playerid);
		SetPlayerVirtualWorld(playerid, GetPVarInt(playerid, "FlyVw"));
		SetPlayerInterior(playerid, GetPVarInt(playerid, "FlyInt"));
		DeletePVar(playerid, "Fly_PlaceLaunch");
		DeletePVar(playerid, "FlyInt");
		DeletePVar(playerid, "FlyVw");
		DeletePVar(playerid, "FlyX");
		DeletePVar(playerid, "FlyY");
		DeletePVar(playerid, "FlyZ");
		DeletePVar(playerid, "FlyA");
		SetPlayerColorEx(playerid, TeamColors[GetTeamID(playerid)]);
		SetPlayerScore(playerid, pInfo[playerid][pLevel]);
		if(pInfo[playerid][pWanted]) SetPlayerWantedLevel(playerid, pInfo[playerid][pWanted]);
		if(pInfo[playerid][pMember]) SetPlayerSkin(playerid, pInfo[playerid][pMemberSkin]);
		else SetPlayerSkin(playerid, pInfo[playerid][pModel]);
		return 1;
	}
	else if(ClothesRound[playerid] == 1)
	{
	    SetPlayerPos(playerid,-668.6816, -1581.2933, 1001.0993);
		SetPlayerFacingAngle(playerid,182.00000);
		SetPlayerCameraPos(playerid, -668.6038, -1585.5938, 1001.2456);
		//SetPlayerCameraPos(playerid,1772.4346-3.5*floatsin(181.0849,degrees),-1953.5457+3.5*floatcos(181.0849,degrees),15.1519);
		SetPlayerCameraLookAt(playerid,-668.6747, -1584.5967, 1001.1459);
		SetPlayerInterior(playerid, 1);
		SetPlayerVirtualWorld(playerid,playerid);
		SendClientMessage(playerid, 0x3399FFFF, "Выберите себе подходящую одежду, после выбора нажмите {63BD4E}SAVE");
		SendClientMessage(playerid, 0xFFCC00FF, "Чтобы просмотреть одежду, используйте {FF6600}NEXT >> {FFCC00}и {FF6600}<< BACK");
		TogglePlayerControllable(playerid, 0);
		ShowMenuForPlayer(clothing_selection, playerid);
		SetHealth(playerid, 100.0);
		if(pInfo[playerid][pSex] == 1) SetPlayerSkin(playerid, JoinRegM[SelectCharPlace[playerid]]), ChosenSkin[playerid] = JoinRegM[0];
		else SetPlayerSkin(playerid, JoinRegF[SelectCharPlace[playerid]]), ChosenSkin[playerid] = JoinRegF[0];
	}
	else if(ClothesRound[playerid] == 2)
	{
	    SendClientMessage(playerid, 0x3399FFFF, "Выберите себе подходящую одежду,  после выбора нажмите {63BD4E}BUY{3399FF}, для отмены нажмите {F04245}EXIT");
		SendClientMessage(playerid, 0xFFCC00FF, "Чтобы просмотреть одежду, используйте {FF6600}NEXT >> {FFCC00}и {FF6600}<< BACK");
		SetPlayerPos(playerid,-1773.3794, 1767.9017, 2377.4482);
	    SetPlayerFacingAngle(playerid,42.2389);
	    SetPlayerCameraPos(playerid, -1775.5872, 1769.9413, 2377.9160);
		//SetPlayerCameraPos(playerid,2180.4900-3.5*floatsin(267.7833,degrees),1622.0040+3.5*floatcos(267.7833,degrees),1043.5634);
		SetPlayerCameraLookAt(playerid,-1774.8374, 1769.2820, 2377.7180);
		SetPlayerVirtualWorld(playerid, playerid);
	    SetPlayerInterior(playerid, 1);
	    TogglePlayerControllable(playerid, 0);
		ShowMenuForPlayer(buy_clothing, playerid);
		if(pInfo[playerid][pSex] == 1)
		{
			SelectCharPlace[playerid] = 0;
			SetPlayerSkin(playerid, JoinShopM[SelectCharPlace[playerid]][0]);
			format(string, sizeof(string), "~w~~n~~n~~n~~n~~n~~n~COST: ~g~%i$", JoinShopM[SelectCharPlace[playerid]][1]);
		}
		else
		{
			SelectCharPlace[playerid] = 0;
			SetPlayerSkin(playerid, JoinShopF[SelectCharPlace[playerid]][0]);
			format(string, sizeof(string), "~w~~n~~n~~n~~n~~n~~n~COST: ~g~%i$", JoinShopF[SelectCharPlace[playerid]][1]);
		}
		GameTextForPlayer(playerid, string, 3000, 3);
	}
	else if(pInfo[playerid][pJail] == 1)
	{
		new rand_coord = random(sizeof(JailSpawn));
	    SetPlayerPos(playerid, JailSpawn[rand_coord][0], JailSpawn[rand_coord][1], JailSpawn[rand_coord][2], 1);
	    SetPlayerFacingAngle(playerid, JailSpawn[rand_coord][3]);
		SetPlayerInterior(playerid, 1);
		SetPlayerVirtualWorld(playerid, 1);
		SetCameraBehindPlayer(playerid);
		format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~JAILED: ~w~%d", pInfo[playerid][pJailTime]);
		GameTextForPlayer(playerid, string, 3000, 3);
		SendClientMessage(playerid, COLOR_RED, "Вы еще не отсидели свой тюремный срок (/jailtime)");
	}
	else if(pInfo[playerid][pJail] == 2)
	{
		new rand_coord = random(sizeof(JailSpawn));
	    SetPlayerPos(playerid, JailSpawn[rand_coord][0], JailSpawn[rand_coord][1], JailSpawn[rand_coord][2], 1);
	    SetPlayerFacingAngle(playerid, JailSpawn[rand_coord][3]);
		SetPlayerInterior(playerid, 1);
		SetPlayerVirtualWorld(playerid, 2);
		SetCameraBehindPlayer(playerid);
		format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~JAILED: ~w~%d", pInfo[playerid][pJailTime]);
		GameTextForPlayer(playerid, string, 3000, 3);
		SendClientMessage(playerid, COLOR_RED, "Вы еще не отсидели свой тюремный срок (/jailtime)");
	}
	else if(pInfo[playerid][pJail] == 3)
	{
	    new rand_coord = random(sizeof(JailSpawn));
	    SetPlayerPos(playerid, JailSpawn[rand_coord][0], JailSpawn[rand_coord][1], JailSpawn[rand_coord][2], 1);
	    SetPlayerFacingAngle(playerid, JailSpawn[rand_coord][3]);
		SetPlayerInterior(playerid, 1);
		SetPlayerVirtualWorld(playerid, 3);
		SetCameraBehindPlayer(playerid);
		format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~JAILED: ~w~%d", pInfo[playerid][pJailTime]);
		GameTextForPlayer(playerid, string, 3000, 3);
		SendClientMessage(playerid, COLOR_RED, "Вы еще не отсидели свой тюремный срок (/jailtime)");
	}
	else if(pInfo[playerid][pJail] == 4)
	{
		SetPlayerPos(playerid,5494.0488,1245.3721,23.1886);
		SetPlayerFacingAngle(playerid, 270.0000);
		SetPlayerInterior(playerid, 1);
		SetPlayerVirtualWorld(playerid, 1);
		SetCameraBehindPlayer(playerid);
		format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~JAILED: ~w~%d", pInfo[playerid][pJailTime]);
		GameTextForPlayer(playerid, string, 3000, 3);
		if(pInfo[playerid][pText][3] == 0)
		{
			SendClientMessage(playerid, COLOR_RED, "Вы еще не отсидели свой тюремный срок (/jailtime)");
		}
		else
		{
		    if(!GetString(pInfo[playerid][pJailReason], "None"))
		    {
		        format(string, sizeof(string), "[Информация] {FFFFFF}Вы были посажены в деморган в оффлайне. Причина: %s (/jailtime)", pInfo[playerid][pJailReason]);
				SendClientMessage(playerid, COLOR_YELLOW, string);
				strmid(pInfo[playerid][pJailReason], "None", 0, strlen("None"), 32);
				MysqlUpdatePlayerStr(playerid, "jailreason", pInfo[playerid][pJailReason]);
			}
		    mysql_query_string[0] = EOS;
			format(mysql_query_string, 256, "UPDATE "T_ACCOUNTS" SET text = '%i, %i, %i, 0, %i' WHERE name = '%s'", pInfo[playerid][pText][0], pInfo[playerid][pText][1], pInfo[playerid][pText][2], pInfo[playerid][pText][4], GetName(playerid));
			mysql_tquery(dbHandle, mysql_query_string, "", "");
		}
	}
	else if(PlayerDied[playerid])
	{
//	    new rand_coord = random(sizeof(MedicSpawn));
//	    SetPlayerPos(playerid, MedicSpawn[rand_coord][0], MedicSpawn[rand_coord][1], MedicSpawn[rand_coord][2], 1);
//	    SetPlayerFacingAngle(playerid, 90.0000);
	    switch(random(3))
	    {
	        case 0:
			{
			    SetPlayerPos(playerid,2468.6204,-2147.3486,634.2466,1);
			    SetPlayerFacingAngle(playerid, 90.0000);
			    SetPlayerVirtualWorld(playerid,4);
			    SetPlayerInterior(playerid,1);
			}
	        case 1:
	        {
	            SetPlayerPos(playerid,367.0321,158.1389,1003.8500,1);
	            SetPlayerFacingAngle(playerid, 90.0000);
	            SetPlayerVirtualWorld(playerid,5);
	            SetPlayerInterior(playerid,1);
	        }
	        case 2:
			{
			    SetPlayerPos(playerid,2468.6204,-2147.3486,634.2466,1);
			    SetPlayerFacingAngle(playerid, 90.0000);
			    SetPlayerVirtualWorld(playerid,6);
			    SetPlayerInterior(playerid,1);
			}
/*	        default:
	        {
	            SetPlayerVirtualWorld(playerid,6);
	            SetPlayerInterior(playerid,1);
	        }*/
	    }
	    SetHealth(playerid, 10+random(40));
        SendClientMessage(playerid,COLOR_WHITE,"Вам придется пройти курс лечения или вылечиться у медика. Войдите в палату и делайте процедуру.");
	}
    else if(pInfo[playerid][pHouse] != 0 && pInfo[playerid][pSpawnChange] == 1)
	{
	    new i = pInfo[playerid][pHouse], _c = HouseInfo[i][hClass], _i = HouseInfo[i][hInt];
		SetPlayerPos(playerid, HintsInfo[_c][_i][hiExitX], HintsInfo[_c][_i][hiExitY], HintsInfo[_c][_i][hiExitZ], 1);
		SetPlayerFacingAngle(playerid, HintsInfo[_c][_i][hiExitFA]);
		SetCameraBehindPlayer(playerid);
		SetPlayerInterior(playerid, HintsInfo[_c][_i][hiInt]);
		SetPlayerVirtualWorld(playerid, HouseInfo[i][hID]);
		SetPVarInt(playerid, "UseHouse", i);
	}
	else if(pInfo[playerid][pMember] == TEAM_LSMAYOR && pInfo[playerid][pSpawnChange] == 2)
	{
		SetPlayerPos(playerid, -937.2898,873.0830,2512.9500, 1);// Спавн администрации южный
		SetPlayerFacingAngle(playerid, 270.1464);
		SetCameraBehindPlayer(playerid);
		SetPlayerInterior(playerid, 3);
		SetPlayerVirtualWorld(playerid, 1);
	}
	else if(pInfo[playerid][pMember] == TEAM_SFMAYOR && pInfo[playerid][pSpawnChange] == 2)
	{
		SetPlayerPos(playerid, 170.9268,1161.7322,542.4528, 1);
		SetPlayerFacingAngle(playerid, 90.9611);
		SetCameraBehindPlayer(playerid);
		SetPlayerInterior(playerid, 3);
		SetPlayerVirtualWorld(playerid, 2);
	}
	else if(pInfo[playerid][pMember] == TEAM_LVMAYOR && pInfo[playerid][pSpawnChange] == 2)
	{
		SetPlayerPos(playerid, -937.2898,873.0830,2512.9500, 1);
		SetPlayerFacingAngle(playerid, 270.1464);
		SetCameraBehindPlayer(playerid);
		SetPlayerInterior(playerid, 3);
		SetPlayerVirtualWorld(playerid, 3);
	}
	else if(pInfo[playerid][pMember] == TEAM_DPS && pInfo[playerid][pSpawnChange] == 2)
	{
	    SetPlayerPos(playerid, 877.2130,2097.5388,2721.8101);
	    SetPlayerFacingAngle(playerid, 269.9558);
	    SetCameraBehindPlayer(playerid);
		SetPlayerInterior(playerid, 1);
	    SetPlayerVirtualWorld(playerid, 1);
	}
	else if(pInfo[playerid][pMember] == TEAM_SFPD && pInfo[playerid][pSpawnChange] == 2)
	{
		SetPlayerPos(playerid, 2210.4004,-523.8504,-2.6141, 1);
	    SetPlayerFacingAngle(playerid, 269.9558);
		SetCameraBehindPlayer(playerid);
		SetPlayerInterior(playerid, 1);
		SetPlayerVirtualWorld(playerid, 2);
	}
	else if(pInfo[playerid][pMember] == TEAM_FBI && pInfo[playerid][pSpawnChange] == 2)
	{
		SetPlayerPos(playerid, 227.8871,-465.6732,1006.4200, 1);
		SetPlayerFacingAngle(playerid, 93.4680);
		SetCameraBehindPlayer(playerid);
		SetPlayerInterior(playerid, 2);
		SetPlayerVirtualWorld(playerid, 0);
	}
	else if(pInfo[playerid][pMember] == TEAM_LSHOSPITAL && pInfo[playerid][pSpawnChange] == 2)
	{
		SetPlayerPos(playerid, 2480.3799,-2140.8325,634.2466, 1);//Спавн больницы южный
		SetPlayerFacingAngle(playerid, 359.5859);
		SetCameraBehindPlayer(playerid);
		SetPlayerInterior(playerid, 1);
		SetPlayerVirtualWorld(playerid, 4);
	}
	else if(pInfo[playerid][pMember] == TEAM_SFHOSPITAL && pInfo[playerid][pSpawnChange] == 2)
	{
		SetPlayerPos(playerid, 375.3733,146.7827,1003.8500, 1);//Спавн больницы батырево
		SetPlayerFacingAngle(playerid, 79.2507);
		SetCameraBehindPlayer(playerid);
		SetPlayerInterior(playerid, 1);
		SetPlayerVirtualWorld(playerid, 5);
	}
	else if(pInfo[playerid][pMember] == TEAM_LVHOSPITAL && pInfo[playerid][pSpawnChange] == 2)
	{
		SetPlayerPos(playerid, 2480.3799,-2140.8325,634.2466, 1);
		SetPlayerFacingAngle(playerid, 359.5859);
		SetCameraBehindPlayer(playerid);
		SetPlayerInterior(playerid, 1);
		SetPlayerVirtualWorld(playerid, 6);
	}
	else if(pInfo[playerid][pMember] == TEAM_AUTOSCHOOL && pInfo[playerid][pSpawnChange] == 2)
	{
		SetPlayerPos(playerid, 2311.7302,-1941.5127,2022.9600, 1);//Спавн автошкола
		SetPlayerFacingAngle(playerid, 7.8568);
		SetCameraBehindPlayer(playerid);
		SetPlayerInterior(playerid, 1);
		SetPlayerVirtualWorld(playerid, 1);
	}
	else if(pInfo[playerid][pMember] == TEAM_GROVE && pInfo[playerid][pSpawnChange] == 2)
	{
		SetPlayerPos(playerid, 420.3829,1658.2628,-31.3641, 1);// Спавн опг Южная
		SetPlayerFacingAngle(playerid, 0.8654);
		SetCameraBehindPlayer(playerid);
		SetPlayerInterior(playerid, 1);
	    SetPlayerVirtualWorld(playerid, 1);
	}
	else if(pInfo[playerid][pMember] == TEAM_BALLAS && pInfo[playerid][pSpawnChange] == 2)
	{
		SetPlayerPos(playerid, 420.3829,1658.2628,-31.3641, 1);
		SetPlayerFacingAngle(playerid, 0.8654);
		SetCameraBehindPlayer(playerid);
		SetPlayerInterior(playerid, 1);
	    SetPlayerVirtualWorld(playerid, 5);
	}
	else if(pInfo[playerid][pMember] == TEAM_RIFA && pInfo[playerid][pSpawnChange] == 2)
	{
		SetPlayerPos(playerid, 420.3829,1658.2628,-31.3641, 1);
		SetPlayerFacingAngle(playerid, 0.8654);
		SetCameraBehindPlayer(playerid);
		SetPlayerInterior(playerid, 1);
	    SetPlayerVirtualWorld(playerid, 3);
	}
	else if(pInfo[playerid][pMember] == TEAM_AZTECAS && pInfo[playerid][pSpawnChange] == 2)
	{
		SetPlayerPos(playerid, 420.3829,1658.2628,-31.3641, 1);
		SetPlayerFacingAngle(playerid, 0.8654);
		SetCameraBehindPlayer(playerid);
		SetPlayerInterior(playerid, 1);
	    SetPlayerVirtualWorld(playerid, 4);
	}
	else if(pInfo[playerid][pMember] == TEAM_VAGOS && pInfo[playerid][pSpawnChange] == 2)
	{
		SetPlayerPos(playerid, 420.3829,1658.2628,-31.3641, 1);
		SetPlayerFacingAngle(playerid, 0.8654);
		SetCameraBehindPlayer(playerid);
		SetPlayerInterior(playerid, 1);
	    SetPlayerVirtualWorld(playerid, 2);
	}
	else if(pInfo[playerid][pMember] == TEAM_NG && pInfo[playerid][pSpawnChange] == 2)
	{
	    SetPlayerPos(playerid, -303.7119,322.7673,2213.0000, 1);// Спавн армии
		SetPlayerFacingAngle(playerid, 182.3619);
		SetCameraBehindPlayer(playerid);
	    SetPlayerInterior(playerid, 1);
	    SetPlayerVirtualWorld(playerid, 1);
	}
	else if(pInfo[playerid][pMember] == TEAM_LCN && pInfo[playerid][pSpawnChange] == 2)
	{
		SetPlayerPos(playerid, 260.6152,1772.5627,575.3359, 1);// Спавн италия мафия
		SetPlayerFacingAngle(playerid, 179.7802);
		SetCameraBehindPlayer(playerid);
		SetPlayerInterior(playerid, 5);
		SetPlayerVirtualWorld(playerid, 1);
	}
	else if(pInfo[playerid][pMember] == TEAM_YAKUZA && pInfo[playerid][pSpawnChange] == 2)
	{
		SetPlayerPos(playerid, 2559.3193,-1845.4357,2522.8401, 1);// Спавн Якудзы
		SetPlayerFacingAngle(playerid, 179.7802);
		SetCameraBehindPlayer(playerid);
		SetPlayerInterior(playerid, 5);
		SetPlayerVirtualWorld(playerid, 2);
	}
	else if(pInfo[playerid][pMember] == TEAM_RM && pInfo[playerid][pSpawnChange] == 2)
	{
		SetPlayerPos(playerid, -2631.7493,2917.9336,2738.6201, 1);//Спавн Русская Мафия
		SetPlayerFacingAngle(playerid, 179.7802);
		SetCameraBehindPlayer(playerid);
		SetPlayerInterior(playerid, 5);
		SetPlayerVirtualWorld(playerid, 3);
	}
	else if(pInfo[playerid][pMember] == TEAM_LSNEWS && pInfo[playerid][pSpawnChange] == 2)
	{
		SetPlayerPos(playerid, -108.1242,461.7322,3013.1499, 1);
		SetPlayerFacingAngle(playerid, 359.0987);
		SetCameraBehindPlayer(playerid);
		SetPlayerInterior(playerid, 1);
		SetPlayerVirtualWorld(playerid, 1);
	}
	else if(pInfo[playerid][pMember] == TEAM_SFNEWS && pInfo[playerid][pSpawnChange] == 2)
	{
		SetPlayerPos(playerid, -1071.3462,2210.8601,1002.0000, 1);
		SetPlayerFacingAngle(playerid, 359.0987);
		SetCameraBehindPlayer(playerid);
		SetPlayerInterior(playerid, 1);
		SetPlayerVirtualWorld(playerid, 2);
	}
	else if(pInfo[playerid][pMember] == TEAM_LVNEWS && pInfo[playerid][pSpawnChange] == 2)
	{
		SetPlayerPos(playerid, -1742.6841,2593.1270,62.6659, 1);
		SetPlayerFacingAngle(playerid, 359.0987);
		SetCameraBehindPlayer(playerid);
		SetPlayerInterior(playerid, 1);
		SetPlayerVirtualWorld(playerid, 3);
	}
	else if(pInfo[playerid][pMember] == TEAM_LVPD && pInfo[playerid][pSpawnChange] == 2)
	{
		SetPlayerPos(playerid, 877.2130,2097.5388,2721.8101, 1);
	    SetPlayerFacingAngle(playerid, 269.9558);
		SetCameraBehindPlayer(playerid);
		SetPlayerInterior(playerid, 1);
		SetPlayerVirtualWorld(playerid, 3);
	}
	else if(pInfo[playerid][pMember] >= 1 && pInfo[playerid][pSpawnChange] == 0 || pInfo[playerid][pMember] == 0)
	{
		if(pInfo[playerid][pLevel] >= 1 && pInfo[playerid][pLevel] <= 3)
		{
		    switch(random(3))
		    {
				//ЖД-Вокзал
		        case 0:
				{
					SetPlayerPos(playerid, 2515.5547,-2119.0225,24.1524);
					SetPlayerFacingAngle(playerid, 270.0000);
				}
		        case 1:
				{
					SetPlayerPos(playerid, 2267.5657,-2189.0391,22.0084);
					SetPlayerFacingAngle(playerid, 270.0000);
				}
				//Автовокзал
				case 2:
				{
				    SetPlayerPos(playerid,2267.5657,-2189.0391,22.0084);
					SetPlayerFacingAngle(playerid,358.9097);
				}
		    }
			SetCameraBehindPlayer(playerid);
			SetPlayerInterior(playerid, 0);
			SetPlayerVirtualWorld(playerid, 0);
		}
		if(pInfo[playerid][pLevel] >= 4 && pInfo[playerid][pLevel] <= 7)
	    {
			SetPlayerPos(playerid, 1924.9647,2076.8179,15.7370);
			SetPlayerFacingAngle(playerid, 180.0000);
			SetCameraBehindPlayer(playerid);
			SetPlayerInterior(playerid, 0);
			SetPlayerVirtualWorld(playerid, 0);
		}
		if(pInfo[playerid][pLevel] >= 8)
	    {
			SetPlayerPos(playerid, 1820.8707,2524.4622,15.8179);
			SetPlayerFacingAngle(playerid, 123.9908);
			SetCameraBehindPlayer(playerid);
			SetPlayerInterior(playerid, 0);
			SetPlayerVirtualWorld(playerid, 0);
		}
	}
	gPlayerSpawned[playerid] = true;
	return 1;
}

 

 

Share this post


Link to post
Share on other sites

@Nekit-smi кинь все, что связано с pJail

Share this post


Link to post
Share on other sites
23 минуты назад, DEST сказал:

@Nekit-smi кинь все, что связано с pJail

Спойлер

CMD:jail(playerid, params[])
{
    IsAdmin(ADM_OLDER_MODER);
	else if(!gAdminLogged[playerid]) return SendClientMessage(playerid, COLOR_GREY, YouAreNotLoggedInAsAdmin);
	else if(sscanf(params, "ddds[32]", params[0], params[1], params[2],  params[3])) return SendClientMessage(playerid, COLOR_WHITE, "Введите: /jail [id игрока] [номер тюрьмы (1-3)] [время] [причина]");
	else if(params[0] == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, PlayerIsNotOnline);
	else if(!gPlayerLogged[params[0]]) return SendClientMessage(playerid, COLOR_GREY, PlayerIsNotAuthorized);
	else if(pInfo[params[0]][pJail] == 4) return SendClientMessage(playerid, COLOR_GREY, "Игрок уже находиться в деморгане!");
	else if(pInfo[params[0]][pJail] != 0 && pInfo[params[0]][pJail] < 4) return SendClientMessage(playerid, COLOR_GREY, "Игрок уже находиться в тюрьме!");
	else if(!(1 <= params[1] <= 3)) return SendClientMessage(playerid, COLOR_GREY, "Номер тюрьмы от 1 до 3!");
	else if(!(1 <= params[2] <= 180)) return SendClientMessage(playerid, COLOR_GREY, "Время от 1 до 180 минут!");
	ResetPlayerWeaponsEx(params[0]);
	pInfo[params[0]][pJailTime] = params[2]*60;
	pInfo[params[0]][pWanted] = 0;
	SetPlayerWantedLevel(params[0], pInfo[params[0]][pWanted]);
	if(pCuff[params[0]][pCuffer] != INVALID_PLAYER_ID)
	{
		new cuffer = pCuff[params[0]][pCuffer];
		SetPlayerSpecialAction(params[0], SPECIAL_ACTION_NONE);
		RemovePlayerAttachedObject(params[0], 0);
		pCuff[params[0]][pCuffer] = pCuff[params[0]][pCuffee] = pCuff[cuffer][pCuffee] = pCuff[cuffer][pCuffer] = INVALID_PLAYER_ID;
	}
	SetPlayerVirtualWorld(params[0], 1);
	new string[128];
	format(string, sizeof(string), "Администратор %s посадил Вас в тюрьму (%s)", GetName(playerid), params[3]);
	SendClientMessage(params[0], COLOR_GREEN, string);
	format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~JAILED: ~w~%d", pInfo[playerid][pJailTime]);
	GameTextForPlayer(params[0], string, 3000, 3);
	format(string, sizeof(string), "[A] %s[%i] посадил в тюрьму %s[%i] на %i минут (%s)", GetName(playerid), playerid, GetName(params[0]), params[0], params[2], params[3]);
	SendAdminMessage(COLOR_GRAD1, string);
	switch(params[1])
	{
	    case 1:
	    {
		    SetPlayerPos(params[0],2210.1938,-505.2677,-7.4141, 1);
			SetPlayerInterior(params[0], 1);
			SetPlayerVirtualWorld(params[0], 1);
			pInfo[params[0]][pJail] = 1;
	    }
	    case 2:
	    {
		    SetPlayerPos(params[0],2210.1938,-505.2677,-7.4141, 1);
			SetPlayerInterior(params[0], 1);
			SetPlayerVirtualWorld(params[0], 2);
			pInfo[params[0]][pJail] = 2;
	    }
	    case 3:
	    {
		    SetPlayerPos(params[0],2210.1938,-505.2677,-7.4141, 1);
			SetPlayerInterior(params[0], 1);
			SetPlayerVirtualWorld(params[0], 3);
			pInfo[params[0]][pJail] = 3;
		}
	}
	mysql_query_string[0] = EOS;
	format(mysql_query_string, 200, "UPDATE "T_ACCOUNTS" SET jail = %i, jailtime = %i, wanted = 0 WHERE id = %i", pInfo[params[0]][pJail], pInfo[params[0]][pJailTime], pInfo[params[0]][pID]);
	mysql_tquery(dbHandle, mysql_query_string, "", "");
	return 1;
}

 

Спойлер

CMD:unjail(playerid, params[])
{
    IsAdmin(ADM_OLDER_MODER);
	else if(!gAdminLogged[playerid]) return SendClientMessage(playerid, COLOR_GREY, YouAreNotLoggedInAsAdmin);
	else if(sscanf(params, "d", params[0])) return SendClientMessage(playerid, COLOR_WHITE, "Введите: /unjail [id игрока]");
	else if(params[0] == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, PlayerIsNotOnline);
	else if(!gPlayerLogged[params[0]]) return SendClientMessage(playerid, COLOR_GREY, PlayerIsNotAuthorized);
	else if(pInfo[params[0]][pJail] == 0) return SendClientMessage(playerid, COLOR_GREY, "Игрок не находиться в тюрьме!");
	pInfo[params[0]][pJailTime] = 1;
	MysqlUpdatePlayerInt(params[0], "jailtime", pInfo[params[0]][pJailTime]);
	ResetPlayerWeaponsEx(params[0]);
	new string[100];
	format(string, sizeof(string), "[A] %s[%i] выпустил из тюрьмы %s[%i]",GetName(playerid),playerid,GetName(params[0]),params[0]);
	SendAdminMessage(COLOR_GRAD1, string);
	SpawnPlayerEx(playerid);
	return 1;
}
Спойлер


CMD:jailtime(playerid, params[])
{
	if(!pInfo[playerid][pJailTime]) return SendClientMessage(playerid,COLOR_GREY,"Вы не находитесь под заключением в тюрьме!");
	new string[100];
	format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~JAILED: ~w~%d", pInfo[playerid][pJailTime]);
	GameTextForPlayer(playerid, string, 3000, 3);
	return 1;
}
Спойлер



mysql_query_string[0] = EOS;
format(mysql_query_string, 350, "UPDATE "T_ACCOUNTS" SET datavhod = CURDATE(), online = 1001, mute = %i, jail = %i, jailtime = %i WHERE id = %i LIMIT 1", pInfo[playerid][pMuted], pInfo[playerid][pJail], pInfo[playerid][pJailTime], pInfo[playerid][pID]);
mysql_tquery(dbHandle, mysql_query_string, "", "");

 

 

 

Спойлер

if(pCuff[playerid][pCuffee] != INVALID_PLAYER_ID && reason == 1)
	{
	    new cops;
		for(new i; i < MAX_PLAYERS; i++)
		{
			if((IsPlayerStream(15.0, playerid, i) && IsACop(i) && IsPlayerConnected(i) && gPlayerLogged[i])) cops++;
		}
	    new id = pCuff[playerid][pCuffee];
	    if(cops > 0 && id == playerid)
		{
		    new cuffer = pCuff[playerid][pCuffer];
		    new string[128];
			format(string, sizeof(string), "Игрок %s вышел при аресте и был отправлен в тюрьму", GetName(playerid));
			SendClientMessageToAll(COLOR_RED, string);
			pInfo[playerid][pJail] = 4;
			pInfo[playerid][pJailTime] = ((pInfo[playerid][pWanted]*10)*60)+(60*30);
			pInfo[playerid][pWanted] = 0;
			if(pInfo[playerid][pZakon] > 1) pInfo[playerid][pZakon] --;
   			mysql_query_string[0] = EOS;
			format(mysql_query_string, 200, "UPDATE "T_ACCOUNTS" SET jail = %i, jailtime = %i, wanted = 0, zakon = %i WHERE id = %i", pInfo[playerid][pJail], pInfo[playerid][pJailTime], pInfo[playerid][pZakon], pInfo[playerid][pID]);
			mysql_tquery(dbHandle, mysql_query_string, "", "");
			pCuff[cuffer][pCuffer] = pCuff[cuffer][pCuffee] = pCuff[playerid][pCuffee] = pCuff[playerid][pCuffer] = INVALID_PLAYER_ID;
		}

 

Спойлер

else if(pInfo[playerid][pJail] == 1)
	{
		new rand_coord = random(sizeof(JailSpawn));
	    SetPlayerPos(playerid, JailSpawn[rand_coord][0], JailSpawn[rand_coord][1], JailSpawn[rand_coord][2], 1);
	    SetPlayerFacingAngle(playerid, JailSpawn[rand_coord][3]);
		SetPlayerInterior(playerid, 1);
		SetPlayerVirtualWorld(playerid, 1);
		SetCameraBehindPlayer(playerid);
		format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~JAILED: ~w~%d", pInfo[playerid][pJailTime]);
		GameTextForPlayer(playerid, string, 3000, 3);
		SendClientMessage(playerid, COLOR_RED, "Вы еще не отсидели свой тюремный срок (/jailtime)");
	}

 

Спойлер

if(!GetString(pInfo[playerid][pJailReason], "None"))
		    {
		        format(string, sizeof(string), "[Информация] {FFFFFF}Вы были посажены в деморган в оффлайне. Причина: %s (/jailtime)", pInfo[playerid][pJailReason]);
				SendClientMessage(playerid, COLOR_YELLOW, string);
				strmid(pInfo[playerid][pJailReason], "None", 0, strlen("None"), 32);
				MysqlUpdatePlayerStr(playerid, "jailreason", pInfo[playerid][pJailReason]);
			}

 

Спойлер

if(!pInfo[playerid][pAdmin])
	{
		if(!pInfo[playerid][pJailTime])
		{
		    if(IsPlayerToSquare(playerid,-891.3302,-2950.0190,2915.9917,560.3257)) pInfo[playerid][pCity] = 1; // LS
			else if(IsPlayerToSquare(playerid,-2929.6589,-2889.1660,-1326.9077,1493.1770)) pInfo[playerid][pCity] = 2; // SF
			else pInfo[playerid][pCity] = 3; // LV
			PlayerDied[playerid] = true;
		}
	}

 

Спойлер

if(pInfo[playerid][pWanted] > 0)
		{
			if(!IsACop(killerid)) return 1;
			pInfo[playerid][pJailTime] = ((pInfo[playerid][pWanted]*10)*60);
			pInfo[playerid][pWanted] = 0;
			if(pInfo[playerid][pZakon] > 1) pInfo[playerid][pZakon] --;
			SetPlayerWantedLevel(playerid, pInfo[playerid][pWanted]);
			TogglePlayerControllable(playerid, 1);
			foreach(new i : Player)
			{
				if(!gPlayerLogged[i]) continue;
				if(IsACop(i))
				{
				    format(string, sizeof(string), "[Внимание] %s %s нейтрализовал преступника '%s'", Fraction_Rang[pInfo[killerid][pMember]][pInfo[killerid][pRank]], GetName(killerid), GetName(playerid));
					SendClientMessage(i, COLOR_RED, string);
				}
			}
			if(pInfo[killerid][pMember] == TEAM_DPS || pInfo[killerid][pMember] == TEAM_FBI)
			{
				SendClientMessage(playerid, COLOR_GRAD1, "Вы были посажены в камеру Полиции г.Южного (/jailtime)");
                new rand_coord = random(sizeof(JailSpawn));
			    SetPlayerPos(playerid, JailSpawn[rand_coord][0], JailSpawn[rand_coord][1], JailSpawn[rand_coord][2], 1);
			    SetPlayerFacingAngle(playerid, JailSpawn[rand_coord][3]);
				SetPlayerInterior(playerid, 1);
				pInfo[playerid][pJail] = 1;
			}
			if(pInfo[killerid][pMember] == TEAM_SFPD)
			{
				SendClientMessage(playerid, COLOR_GRAD1, "Вы были посажены в камеру Полиции пгт.Батырево (/jailtime)");
				new rand_coord = random(sizeof(JailSpawn));
			    SetPlayerPos(playerid, JailSpawn[rand_coord][0], JailSpawn[rand_coord][1], JailSpawn[rand_coord][2], 1);
			    SetPlayerFacingAngle(playerid, JailSpawn[rand_coord][3]);
				SetPlayerInterior(playerid, 1);
				pInfo[playerid][pJail] = 2;
			}
			if(pInfo[killerid][pMember] == TEAM_LVPD)
			{
			    SendClientMessage(playerid, COLOR_GRAD1, "Вы были посажены в камеру г.Арзамас (/jailtime)");
				new rand_coord = random(sizeof(JailSpawn));
			    SetPlayerPos(playerid, JailSpawn[rand_coord][0], JailSpawn[rand_coord][1], JailSpawn[rand_coord][2], 1);
			    SetPlayerFacingAngle(playerid, JailSpawn[rand_coord][3]);
				SetPlayerInterior(playerid, 1);
				pInfo[playerid][pJail] = 3;
			}
   			mysql_query_string[0] = EOS;
			format(mysql_query_string, 200, "UPDATE "T_ACCOUNTS" SET jail = %i, jailtime = %i, wanted = 0, zakon = %i WHERE id = %i", pInfo[playerid][pJail], pInfo[playerid][pJailTime], pInfo[playerid][pZakon], pInfo[playerid][pID]);
			mysql_tquery(dbHandle, mysql_query_string, "", "");
			SetPlayerVirtualWorld(playerid, pInfo[playerid][pJail]);
			format(string, 80, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~JAILED: ~w~%d", pInfo[playerid][pJailTime]);
			GameTextForPlayer(playerid, string, 3000, 3);
		}
		if(!pInfo[playerid][pJail])
		{
		    if(!pInfo[killerid][pAdmin])
		    {
				if(IsACop(killerid) || IsAArmy(killerid) || IsAGang(killerid) || IsAMafia(killerid)) { }
				else
				{
					pInfo[killerid][pWanted] += 2;
					if(pInfo[killerid][pWanted] >= 6) pInfo[killerid][pWanted] = 6;
					SetPlayerWantedLevel(killerid, pInfo[killerid][pWanted]);
					format(string, sizeof(string), "[A] %s[%d] был убит игроком %s[%d]", GetName(playerid),playerid,GetName(killerid),killerid);
					SendAdminMessage(COLOR_BLUE,string);
					SetPlayerCriminal(killerid, "Неизвестный", "Убийство", 2);
				}
			}
		}
	}
	return 1;
}

 

Спойлер

if(!pInfo[playerid][pWanted]) return SendClientMessage(playerid, COLOR_GREY, "[Ошибка] Вы не находитесь в розыске!");
					ResetPlayerWeaponsEx(playerid);
					pInfo[playerid][pJailTime] = (((pInfo[playerid][pWanted]*10)*60)/3)*2;
					pInfo[playerid][pWanted] = 0;
					SetPlayerWantedLevel(playerid, pInfo[playerid][pWanted]);
					if(pInfo[playerid][pZakon] < 100) pInfo[playerid][pZakon]++;
					if(pCuff[playerid][pCuffer] != INVALID_PLAYER_ID)
					{
						new cuffer = pCuff[playerid][pCuffer];
						SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
						RemovePlayerAttachedObject(playerid, 0);
						pCuff[playerid][pCuffer] = pCuff[playerid][pCuffee] = pCuff[cuffer][pCuffee] = pCuff[cuffer][pCuffer] = INVALID_PLAYER_ID;
					}
					SendClientMessage(playerid, COLOR_BLUE, "Вы добровольно сдались в полицию. Срок Вашего пребывания в тюрьме сокращён (/jailtime)");
			        new rand_coord = random(sizeof(JailSpawn));
				    SetPlayerPos(playerid, JailSpawn[rand_coord][0], JailSpawn[rand_coord][1], JailSpawn[rand_coord][2], 1);
				    SetPlayerFacingAngle(playerid, JailSpawn[rand_coord][3]);
  				    pInfo[playerid][pJail] = GetPlayerVirtualWorld(playerid);
					mysql_query_string[0] = EOS;
					format(mysql_query_string, 200, "UPDATE "T_ACCOUNTS" SET jail = %i, jailtime = %i, wanted = 0, zakon = %i WHERE id = %i", pInfo[playerid][pJail], pInfo[playerid][pJailTime], pInfo[playerid][pZakon], pInfo[playerid][pID]);
					mysql_tquery(dbHandle, mysql_query_string, "", "");
  				}
	        }
	    }

 

Спойлер

CMD:prison(playerid, params[])
{
	IsAdmin(ADM_OLDER_MODER);
	else if(!gAdminLogged[playerid]) return SendClientMessage(playerid, COLOR_GREY, YouAreNotLoggedInAsAdmin);
	else if(sscanf(params, "dds[32]", params[0], params[1],  params[2])) return SendClientMessage(playerid, COLOR_WHITE, "Введите: /prison [id игрока] [время] [причина]");
	else if(params[0] == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, PlayerIsNotOnline);
	else if(!gPlayerLogged[params[0]]) return SendClientMessage(playerid, COLOR_GREY, PlayerIsNotAuthorized);
	else if(pInfo[params[0]][pJail] == 4) return SendClientMessage(playerid, COLOR_GREY, "Игрок уже находиться в деморгане!");
	else if(!(1 <= params[1] <= 180)) return SendClientMessage(playerid, COLOR_GREY, "Время от 1 до 180 минут!");
	ResetPlayerWeaponsEx(params[0]);
	pInfo[params[0]][pJailTime] = params[1]*60;
	if(pCuff[params[0]][pCuffer] != INVALID_PLAYER_ID)
	{
		new cuffer = pCuff[params[0]][pCuffer];
		SetPlayerSpecialAction(params[0], SPECIAL_ACTION_NONE);
		RemovePlayerAttachedObject(params[0], 0);
		pCuff[params[0]][pCuffer] = pCuff[params[0]][pCuffee] = pCuff[cuffer][pCuffee] = pCuff[cuffer][pCuffer] = INVALID_PLAYER_ID;
	}
	new string[128];
	format(string, sizeof(string), "Администратор %s посадил Вас в деморган (%s)", GetName(playerid), params[2]);
	SendClientMessage(params[0], COLOR_GREEN, string);
	ShowPlayerDialog(params[0], dNull, DIALOG_STYLE_MSGBOX, "{F04245}Деморган", "{FFFFFF}Запрещено нарушение RP режима, где персонаж не поступил бы подобным способом в реальной жизни", "Закрыть", "");
	format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~JAILED: ~w~%d", pInfo[playerid][pJailTime]);
	GameTextForPlayer(params[0], string, 3000, 3);
	format(string, sizeof(string), "[A] %s[%i] посадил %s[%i] в деморган на %i минут (%s)", GetName(playerid), playerid, GetName(params[0]), params[0], params[1], params[2]);
	SendAdminMessage(COLOR_GRAD1, string);
	SetPlayerPos(params[0],5494.0488,1245.3721,23.1886);
	SetPlayerFacingAngle(params[0], 270.0000);
	SetPlayerInterior(params[0], 1);
	SetPlayerVirtualWorld(params[0], 1);
	pInfo[params[0]][pJail] = 4;
    mysql_query_string[0] = EOS;
	format(mysql_query_string, 200, "UPDATE "T_ACCOUNTS" SET jail = %i, jailtime = %i WHERE id = %i", pInfo[params[0]][pJail], pInfo[params[0]][pJailTime], pInfo[params[0]][pID]);
	mysql_tquery(dbHandle, mysql_query_string, "", "");
	return 1;
}

 

Спойлер

CMD:unprison(playerid, params[])
{
	IsAdmin(ADM_OLDER_MODER);
	else if(!gAdminLogged[playerid]) return SendClientMessage(playerid, COLOR_GREY, YouAreNotLoggedInAsAdmin);
	else if(sscanf(params, "d", params[0])) return SendClientMessage(playerid, COLOR_WHITE, "Введите: /unprison [id игрока]");
	else if(params[0] == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, PlayerIsNotOnline);
	else if(!gPlayerLogged[params[0]]) return SendClientMessage(playerid, COLOR_GREY, PlayerIsNotAuthorized);
	else if(pInfo[params[0]][pJail] == 0) return SendClientMessage(playerid, COLOR_GREY, "Игрок не находиться в деморгане!");
	pInfo[params[0]][pJailTime] = 1;
	MysqlUpdatePlayerInt(params[0], "jailtime", pInfo[params[0]][pJailTime]);
	ResetPlayerWeaponsEx(params[0]);
	new string[100];
	format(string, sizeof(string), "[A] %s[%i] выпустил из деморгана %s[%i]",GetName(playerid),playerid,GetName(params[0]),params[0]);
	SendAdminMessage(COLOR_GRAD1, string);
	SpawnPlayerEx(params[0]);
	return 1;
}

 

Спойлер

CMD:jail(playerid, params[])
{
    IsAdmin(ADM_OLDER_MODER);
	else if(!gAdminLogged[playerid]) return SendClientMessage(playerid, COLOR_GREY, YouAreNotLoggedInAsAdmin);
	else if(sscanf(params, "ddds[32]", params[0], params[1], params[2],  params[3])) return SendClientMessage(playerid, COLOR_WHITE, "Введите: /jail [id игрока] [номер тюрьмы (1-3)] [время] [причина]");
	else if(params[0] == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, PlayerIsNotOnline);
	else if(!gPlayerLogged[params[0]]) return SendClientMessage(playerid, COLOR_GREY, PlayerIsNotAuthorized);
	else if(pInfo[params[0]][pJail] == 4) return SendClientMessage(playerid, COLOR_GREY, "Игрок уже находиться в деморгане!");
	else if(pInfo[params[0]][pJail] != 0 && pInfo[params[0]][pJail] < 4) return SendClientMessage(playerid, COLOR_GREY, "Игрок уже находиться в тюрьме!");
	else if(!(1 <= params[1] <= 3)) return SendClientMessage(playerid, COLOR_GREY, "Номер тюрьмы от 1 до 3!");
	else if(!(1 <= params[2] <= 180)) return SendClientMessage(playerid, COLOR_GREY, "Время от 1 до 180 минут!");
	ResetPlayerWeaponsEx(params[0]);
	pInfo[params[0]][pJailTime] = params[2]*60;
	pInfo[params[0]][pWanted] = 0;
	SetPlayerWantedLevel(params[0], pInfo[params[0]][pWanted]);
	if(pCuff[params[0]][pCuffer] != INVALID_PLAYER_ID)
	{
		new cuffer = pCuff[params[0]][pCuffer];
		SetPlayerSpecialAction(params[0], SPECIAL_ACTION_NONE);
		RemovePlayerAttachedObject(params[0], 0);
		pCuff[params[0]][pCuffer] = pCuff[params[0]][pCuffee] = pCuff[cuffer][pCuffee] = pCuff[cuffer][pCuffer] = INVALID_PLAYER_ID;
	}
	SetPlayerVirtualWorld(params[0], 1);
	new string[128];
	format(string, sizeof(string), "Администратор %s посадил Вас в тюрьму (%s)", GetName(playerid), params[3]);
	SendClientMessage(params[0], COLOR_GREEN, string);
	format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~JAILED: ~w~%d", pInfo[playerid][pJailTime]);
	GameTextForPlayer(params[0], string, 3000, 3);
	format(string, sizeof(string), "[A] %s[%i] посадил в тюрьму %s[%i] на %i минут (%s)", GetName(playerid), playerid, GetName(params[0]), params[0], params[2], params[3]);
	SendAdminMessage(COLOR_GRAD1, string);
	switch(params[1])
	{
	    case 1:
	    {
		    SetPlayerPos(params[0],2210.1938,-505.2677,-7.4141, 1);
			SetPlayerInterior(params[0], 1);
			SetPlayerVirtualWorld(params[0], 1);
			pInfo[params[0]][pJail] = 1;
	    }
	    case 2:
	    {
		    SetPlayerPos(params[0],2210.1938,-505.2677,-7.4141, 1);
			SetPlayerInterior(params[0], 1);
			SetPlayerVirtualWorld(params[0], 2);
			pInfo[params[0]][pJail] = 2;
	    }
	    case 3:
	    {
		    SetPlayerPos(params[0],2210.1938,-505.2677,-7.4141, 1);
			SetPlayerInterior(params[0], 1);
			SetPlayerVirtualWorld(params[0], 3);
			pInfo[params[0]][pJail] = 3;
		}
	}
	mysql_query_string[0] = EOS;
	format(mysql_query_string, 200, "UPDATE "T_ACCOUNTS" SET jail = %i, jailtime = %i, wanted = 0 WHERE id = %i", pInfo[params[0]][pJail], pInfo[params[0]][pJailTime], pInfo[params[0]][pID]);
	mysql_tquery(dbHandle, mysql_query_string, "", "");
	return 1;
}

CMD:unjail(playerid, params[])
{
    IsAdmin(ADM_OLDER_MODER);
	else if(!gAdminLogged[playerid]) return SendClientMessage(playerid, COLOR_GREY, YouAreNotLoggedInAsAdmin);
	else if(sscanf(params, "d", params[0])) return SendClientMessage(playerid, COLOR_WHITE, "Введите: /unjail [id игрока]");
	else if(params[0] == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, PlayerIsNotOnline);
	else if(!gPlayerLogged[params[0]]) return SendClientMessage(playerid, COLOR_GREY, PlayerIsNotAuthorized);
	else if(pInfo[params[0]][pJail] == 0) return SendClientMessage(playerid, COLOR_GREY, "Игрок не находиться в тюрьме!");
	pInfo[params[0]][pJailTime] = 1;
	MysqlUpdatePlayerInt(params[0], "jailtime", pInfo[params[0]][pJailTime]);
	ResetPlayerWeaponsEx(params[0]);
	new string[100];
	format(string, sizeof(string), "[A] %s[%i] выпустил из тюрьмы %s[%i]",GetName(playerid),playerid,GetName(params[0]),params[0]);
	SendAdminMessage(COLOR_GRAD1, string);
	SpawnPlayerEx(playerid);
	return 1;
}

 

Спойлер

CMD:arrest(playerid, params[])
{
	if(!IsACop(playerid)) return SendClientMessage(playerid, COLOR_GREY, YouCanNot);
 	if(pInfo[playerid][pMember] == TEAM_DPS && (IsPlayerInRangeOfPoint(playerid,20.0,898.7244,2085.5872,2721.8101) && GetPlayerVirtualWorld(playerid)==1))
	{
		if(sscanf(params, "d", params[0])) return SendClientMessage(playerid, COLOR_WHITE, "Введите: /arrest [id игрока]");
		else if(params[0] == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, PlayerIsNotOnline);
		else if(!gPlayerLogged[params[0]]) return SendClientMessage(playerid, COLOR_GREY, PlayerIsNotAuthorized);
		else if(!IsPlayerStream(8.0, playerid, params[0], 1)) return SendClientMessage(playerid, COLOR_GREY, "Игрок слишком далеко!");
		else if(pInfo[params[0]][pJail] > 0) return SendClientMessage(playerid, COLOR_GREY, "Данный игрок уже находиться в тюрьме!");
		else if(params[0] == playerid) return SendClientMessage(playerid, COLOR_GREY, "Вы не можете арестовать самого себя!");
		else if(IsACop(params[0])) return SendClientMessage(playerid, COLOR_GREY, "Данный игрок полицейский/агент ФСБ!");
		else if(pInfo[params[0]][pWanted] == 0) return SendClientMessage(playerid, COLOR_GREY, "Игрок должен иметь хотя бы 1 уровень розыска!");
		ResetPlayerWeaponsEx(params[0]);
		pInfo[params[0]][pJailTime] = ((pInfo[params[0]][pWanted]*10)*60);
		pInfo[params[0]][pWanted] = 0;
		SetPlayerWantedLevel(params[0], pInfo[params[0]][pWanted]);
		if(pInfo[params[0]][pZakon] > 1) pInfo[params[0]][pZakon] --;
		if(pCuff[params[0]][pCuffer] != INVALID_PLAYER_ID)
		{
			new cuffer = pCuff[params[0]][pCuffer];
			SetPlayerSpecialAction(params[0], SPECIAL_ACTION_NONE);
			RemovePlayerAttachedObject(params[0], 0);
			pCuff[params[0]][pCuffer] = pCuff[params[0]][pCuffee] = pCuff[cuffer][pCuffee] = pCuff[cuffer][pCuffer] = INVALID_PLAYER_ID;
		}
		SendMes(playerid, COLOR_BLUE, "Вы посадили в камеру %s[%i] на %i мин", GetName(params[0]), params[0], pInfo[params[0]][pJailTime]/60);
		SendMes(params[0], COLOR_BLUE, "%s %s[%i] посадил Вас в камеру на %i мин", Fraction_Rang[pInfo[playerid][pMember]][pInfo[playerid][pRank]], GetName(playerid), playerid, pInfo[params[0]][pJailTime]/60);
        new rand_coord = random(sizeof(JailSpawn));
	    SetPlayerPos(params[0], JailSpawn[rand_coord][0], JailSpawn[rand_coord][1], JailSpawn[rand_coord][2], 1);
	    SetPlayerFacingAngle(params[0], JailSpawn[rand_coord][3]);
		SetPlayerInterior(params[0], 1);
		SetPlayerVirtualWorld(params[0], 1);
		pInfo[params[0]][pJail] = 1;
		mysql_query_string[0] = EOS;
		format(mysql_query_string, 200, "UPDATE "T_ACCOUNTS" SET jail = %i, jailtime = %i, wanted = 0, zakon = %i WHERE id = %i", pInfo[params[0]][pJail], pInfo[params[0]][pJailTime], pInfo[params[0]][pZakon], pInfo[params[0]][pID]);
		mysql_tquery(dbHandle, mysql_query_string, "", "");
	}
	else if(pInfo[playerid][pMember] == TEAM_SFPD && (IsPlayerInRangeOfPoint(playerid,20.0,2208.3813,-502.7921,-7.4141) && GetPlayerVirtualWorld(playerid)==2))
	{
		if(sscanf(params, "d", params[0])) return SendClientMessage(playerid, COLOR_WHITE, "Введите: /arrest [id игрока]");
		else if(params[0] == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, PlayerIsNotOnline);
		else if(!gPlayerLogged[params[0]]) return SendClientMessage(playerid, COLOR_GREY, PlayerIsNotAuthorized);
		else if(!IsPlayerStream(8.0, playerid, params[0], 1)) return SendClientMessage(playerid, COLOR_GREY, "Игрок слишком далеко!");
		else if(pInfo[params[0]][pJail] > 0) return SendClientMessage(playerid, COLOR_GREY, "Данный игрок уже находиться в тюрьме!");
		else if(params[0] == playerid) return SendClientMessage(playerid, COLOR_GREY, "Вы не можете арестовать самого себя!");
		else if(IsACop(params[0])) return SendClientMessage(playerid, COLOR_GREY, "Данный игрок полицейский/агент ФСБ!");
		else if(pInfo[params[0]][pWanted] == 0) return SendClientMessage(playerid, COLOR_GREY, "Игрок должен иметь хотя бы 1 уровень розыска!");
		ResetPlayerWeaponsEx(params[0]);
		pInfo[params[0]][pJailTime] = ((pInfo[params[0]][pWanted]*10)*60);
		pInfo[params[0]][pWanted] = 0;
		SetPlayerWantedLevel(params[0], pInfo[params[0]][pWanted]);
		if(pInfo[params[0]][pZakon] > 1) pInfo[params[0]][pZakon] --;
		if(pCuff[params[0]][pCuffer] != INVALID_PLAYER_ID)
		{
			new cuffer = pCuff[params[0]][pCuffer];
			SetPlayerSpecialAction(params[0], SPECIAL_ACTION_NONE);
			RemovePlayerAttachedObject(params[0], 0);
			pCuff[params[0]][pCuffer] = pCuff[params[0]][pCuffee] = pCuff[cuffer][pCuffee] = pCuff[cuffer][pCuffer] = INVALID_PLAYER_ID;
		}
		SendMes(playerid, COLOR_BLUE, "Вы посадили в камеру %s[%i] на %i мин", GetName(params[0]), params[0], pInfo[params[0]][pJailTime]/60);
		SendMes(params[0], COLOR_BLUE, "%s %s[%i] посадил Вас в камеру на %i мин", Fraction_Rang[pInfo[playerid][pMember]][pInfo[playerid][pRank]], GetName(playerid), playerid, pInfo[params[0]][pJailTime]/60);
		new rand_coord = random(sizeof(JailSpawn));
	    SetPlayerPos(params[0], JailSpawn[rand_coord][0], JailSpawn[rand_coord][1], JailSpawn[rand_coord][2], 1);
	    SetPlayerFacingAngle(params[0], JailSpawn[rand_coord][3]);
		SetPlayerInterior(params[0], 1);
		SetPlayerVirtualWorld(params[0], 2);
		pInfo[params[0]][pJail] = 2;
		mysql_query_string[0] = EOS;
		format(mysql_query_string, 200, "UPDATE "T_ACCOUNTS" SET jail = %i,jailtime = %i,wanted = 0,zakon = %i WHERE id = %i", pInfo[params[0]][pJail], pInfo[params[0]][pJailTime], pInfo[params[0]][pZakon], pInfo[params[0]][pID]);
		mysql_tquery(dbHandle, mysql_query_string, "", "");
	}
	else if(pInfo[playerid][pMember] == TEAM_LVPD && (IsPlayerInRangeOfPoint(playerid,20.0,898.7244,2085.5872,2721.8101) && GetPlayerVirtualWorld(playerid)==3))
	{
		if(sscanf(params, "d", params[0])) return SendClientMessage(playerid, COLOR_WHITE, "Введите: /arrest [id игрока]");
		else if(params[0] == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, PlayerIsNotOnline);
		else if(!gPlayerLogged[params[0]]) return SendClientMessage(playerid, COLOR_GREY, PlayerIsNotAuthorized);
		else if(!IsPlayerStream(8.0, playerid, params[0], 1)) return SendClientMessage(playerid, COLOR_GREY, "Игрок слишком далеко!");
		else if(pInfo[params[0]][pJail] > 0) return SendClientMessage(playerid, COLOR_GREY, "Данный игрок уже находиться в тюрьме!");
		else if(params[0] == playerid) return SendClientMessage(playerid, COLOR_GREY, "Вы не можете арестовать самого себя!");
		else if(IsACop(params[0])) return SendClientMessage(playerid, COLOR_GREY, "Данный игрок полицейский/агент ФСБ!");
		else if(pInfo[params[0]][pWanted] == 0) return SendClientMessage(playerid, COLOR_GREY, "Игрок должен иметь хотя бы 1 уровень розыска!");
		ResetPlayerWeaponsEx(params[0]);
		pInfo[params[0]][pJailTime] = ((pInfo[params[0]][pWanted]*10)*60);
		pInfo[params[0]][pWanted] = 0;
		SetPlayerWantedLevel(params[0], pInfo[params[0]][pWanted]);
		if(pInfo[params[0]][pZakon] > 1) pInfo[params[0]][pZakon] --;
		if(pCuff[params[0]][pCuffer] != INVALID_PLAYER_ID)
		{
			new cuffer = pCuff[params[0]][pCuffer];
			SetPlayerSpecialAction(params[0], SPECIAL_ACTION_NONE);
			RemovePlayerAttachedObject(params[0], 0);
			pCuff[params[0]][pCuffer] = pCuff[params[0]][pCuffee] = pCuff[cuffer][pCuffee] = pCuff[cuffer][pCuffer] = INVALID_PLAYER_ID;
		}
		SendMes(playerid, COLOR_BLUE, "Вы посадили в камеру %s[%i] на %i мин", GetName(params[0]), params[0], pInfo[params[0]][pJailTime]/60);
		SendMes(params[0], COLOR_BLUE, "%s %s[%i] посадил Вас в камеру на %i мин", Fraction_Rang[pInfo[playerid][pMember]][pInfo[playerid][pRank]], GetName(playerid), playerid, pInfo[params[0]][pJailTime]/60);
		new rand_coord = random(sizeof(JailSpawn));
	    SetPlayerPos(params[0], JailSpawn[rand_coord][0], JailSpawn[rand_coord][1], JailSpawn[rand_coord][2], 1);
	    SetPlayerFacingAngle(params[0], JailSpawn[rand_coord][3]);
		SetPlayerInterior(params[0], 1);
		SetPlayerVirtualWorld(params[0], 3);
		pInfo[params[0]][pJail] = 3;
		mysql_query_string[0] = EOS;
		format(mysql_query_string, 200, "UPDATE "T_ACCOUNTS" SET jail = %i, jailtime = %i, wanted = 0, zakon = %i WHERE id = %i", pInfo[params[0]][pJail], pInfo[params[0]][pJailTime], pInfo[params[0]][pZakon], pInfo[params[0]][pID]);
		mysql_tquery(dbHandle, mysql_query_string, "", "");
	}
	else if(pInfo[playerid][pMember] == TEAM_FBI && (
	IsPlayerInRangeOfPoint(playerid,20.0,898.7244,2085.5872,2721.8101) && GetPlayerVirtualWorld(playerid)==1 ||
	IsPlayerInRangeOfPoint(playerid,20.0,2208.3813,-502.7921,-7.4141) && GetPlayerVirtualWorld(playerid)==2 ||
	IsPlayerInRangeOfPoint(playerid,20.0,898.7244,2085.5872,2721.8101) && GetPlayerVirtualWorld(playerid)==3))
	{
		if(sscanf(params, "d", params[0])) return SendClientMessage(playerid, COLOR_WHITE, "Введите: /arrest [id игрока]");
		else if(params[0] == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, PlayerIsNotOnline);
		else if(!gPlayerLogged[params[0]]) return SendClientMessage(playerid, COLOR_GREY, PlayerIsNotAuthorized);
		else if(!IsPlayerStream(8.0, playerid, params[0], 1)) return SendClientMessage(playerid, COLOR_GREY, "Игрок слишком далеко!");
		else if(pInfo[params[0]][pJail] > 0) return SendClientMessage(playerid, COLOR_GREY, "Данный игрок уже находиться в тюрьме!");
		else if(params[0] == playerid) return SendClientMessage(playerid, COLOR_GREY, "Вы не можете арестовать самого себя!");
		else if(IsACop(params[0])) return SendClientMessage(playerid, COLOR_GREY, "Данный игрок полицейский/агент ФСБ!");
		else if(pInfo[params[0]][pWanted] == 0) return SendClientMessage(playerid, COLOR_GREY, "Игрок должен иметь хотя бы 1 уровень розыска!");
		ResetPlayerWeaponsEx(params[0]);
		pInfo[params[0]][pJailTime] = ((pInfo[params[0]][pWanted]*10)*60);
		pInfo[params[0]][pWanted] = 0;
		SetPlayerWantedLevel(params[0], pInfo[params[0]][pWanted]);
		if(pInfo[params[0]][pZakon] > 1) pInfo[params[0]][pZakon] --;
		if(pCuff[params[0]][pCuffer] != INVALID_PLAYER_ID)
		{
			new cuffer = pCuff[params[0]][pCuffer];
			SetPlayerSpecialAction(params[0], SPECIAL_ACTION_NONE);
			RemovePlayerAttachedObject(params[0], 0);
			pCuff[params[0]][pCuffer] = pCuff[params[0]][pCuffee] = pCuff[cuffer][pCuffee] = pCuff[cuffer][pCuffer] = INVALID_PLAYER_ID;
		}
		SendMes(playerid, COLOR_BLUE, "Вы посадили в камеру %s[%i] на %i мин", GetName(params[0]), params[0], pInfo[params[0]][pJailTime]/60);
		SendMes(params[0], COLOR_BLUE, "%s %s[%i] посадил Вас в камеру на %i мин", Fraction_Rang[pInfo[playerid][pMember]][pInfo[playerid][pRank]], GetName(playerid), playerid, pInfo[params[0]][pJailTime]/60);
		if(IsPlayerInRangeOfPoint(playerid,20.0,898.7244,2085.5872,2721.8101) && GetPlayerVirtualWorld(playerid)==1)
		{
			new rand_coord = random(sizeof(JailSpawn));
		    SetPlayerPos(params[0], JailSpawn[rand_coord][0], JailSpawn[rand_coord][1], JailSpawn[rand_coord][2], 1);
		    SetPlayerFacingAngle(params[0], JailSpawn[rand_coord][3]);
			SetPlayerInterior(params[0], 1);
			SetPlayerVirtualWorld(params[0], 1);
			pInfo[params[0]][pJail] = 1;
		}
		if(IsPlayerInRangeOfPoint(playerid,20.0,2208.3813,-502.7921,-7.4141) && GetPlayerVirtualWorld(playerid)==2)
		{
			new rand_coord = random(sizeof(JailSpawn));
		    SetPlayerPos(params[0], JailSpawn[rand_coord][0], JailSpawn[rand_coord][1], JailSpawn[rand_coord][2], 1);
		    SetPlayerFacingAngle(params[0], JailSpawn[rand_coord][3]);
			SetPlayerInterior(params[0], 1);
			SetPlayerVirtualWorld(params[0], 2);
			pInfo[params[0]][pJail] = 2;
		}
		if(IsPlayerInRangeOfPoint(playerid,20.0,898.7244,2085.5872,2721.8101) && GetPlayerVirtualWorld(playerid)==3)
		{
			new rand_coord = random(sizeof(JailSpawn));
		    SetPlayerPos(params[0], JailSpawn[rand_coord][0], JailSpawn[rand_coord][1], JailSpawn[rand_coord][2], 1);
		    SetPlayerFacingAngle(params[0], JailSpawn[rand_coord][3]);
			SetPlayerInterior(params[0], 1);
			SetPlayerVirtualWorld(params[0], 3);
			pInfo[params[0]][pJail] = 3;
		}
		mysql_query_string[0] = EOS;
		format(mysql_query_string, 200, "UPDATE "T_ACCOUNTS" SET jail = %i, jailtime = %i, wanted = 0, zakon = %i WHERE id = %i", pInfo[params[0]][pJail], pInfo[params[0]][pJailTime], pInfo[params[0]][pZakon], pInfo[params[0]][pID]);
		mysql_tquery(dbHandle, mysql_query_string, "", "");
	}
	else SendClientMessage(playerid, COLOR_GREY, "Вы должны находиться рядом с тюрьмой!");
	return 1;
}

 

Спойлер

if(pInfo[i][pJail] > 0)
		{
			pInfo[i][pJailTime]--;
			if(!pInfo[i][pJailTime])
			{
			    switch(pInfo[i][pJail])
			    {
			        case 1:
			        {
						SetPlayerPos(i, 1552.704467,-1675.532470,16.195312);
						SetPlayerFacingAngle(i, 13.8672);
					}
			        case 2:
           			{
						SetPlayerPos(i, -1605.4390,712.8561,13.8085);
						SetPlayerFacingAngle(i, 359.2197);
					}
			        case 3:
			        {
						SetPlayerPos(i, 2337.5330,2454.2747,14.9688);
						SetPlayerFacingAngle(i, 116.8034);
					}
			        case 4: SpawnPlayerEx(i);
			    }
			    SendClientMessage(i, COLOR_GRAD1, "Время заключения истекло, теперь Вы свободны");
				GameTextForPlayer(i, "~g~freedom", 5000, 1);
				pInfo[i][pJail] = 0;
				if(!GetString(pInfo[i][pJailReason], "None"))
				{
					strmid(pInfo[i][pJailReason], "None", 0, strlen("None"), 32);
					MysqlUpdatePlayerStr(i, "jailreason", pInfo[i][pJailReason]);
				}
				SetPlayerInterior(i, 0);
				SetPlayerVirtualWorld(i, 0);
			}
		}
		

 

Спойлер

cache_get_value_index_int(0, 33, pInfo[playerid][pJail]); // jail

pInfo[playerid][pJail] = cache_get_row_int(0, 33); // jail

strmid(pInfo[playerid][pJailReason], "None", 0, strlen("None"), 32);

 

Спойлер

static const stock Float:JailSpawn[4][4] = {
	{897.5146,2080.9880,2721.8101},
	{2210.1938,-505.2677,-7.4141},
	{1004.1040,576.0970,1010.5649,0.6477},
	{1001.0569,590.8435,1010.5649,179.5393}

 

 

Share this post


Link to post
Share on other sites

Этот код: 

Спойлер

if(pInfo[i][pJail] > 0)
		{
			pInfo[i][pJailTime]--;
			if(!pInfo[i][pJailTime])
			{
			    switch(pInfo[i][pJail])
			    {
			        case 1:
			        {
						SetPlayerPos(i, 1552.704467,-1675.532470,16.195312);
						SetPlayerFacingAngle(i, 13.8672);
					}
			        case 2:
           			{
						SetPlayerPos(i, -1605.4390,712.8561,13.8085);
						SetPlayerFacingAngle(i, 359.2197);
					}
			        case 3:
			        {
						SetPlayerPos(i, 2337.5330,2454.2747,14.9688);
						SetPlayerFacingAngle(i, 116.8034);
					}
			        case 4: SpawnPlayerEx(i);
			    }
			    SendClientMessage(i, COLOR_GRAD1, "Время заключения истекло, теперь Вы свободны");
				GameTextForPlayer(i, "~g~freedom", 5000, 1);
				pInfo[i][pJail] = 0;
				if(!GetString(pInfo[i][pJailReason], "None"))
				{
					strmid(pInfo[i][pJailReason], "None", 0, strlen("None"), 32);
					MysqlUpdatePlayerStr(i, "jailreason", pInfo[i][pJailReason]);
				}
				SetPlayerInterior(i, 0);
				SetPlayerVirtualWorld(i, 0);
			}
		}

 

замени на этот: 

if(pInfo[i][pJail] > 0)
		{
			pInfo[i][pJailTime]--;
			if(!pInfo[i][pJailTime])
			{
                SpawnPlayerEx(i); 
			    SendClientMessage(i, COLOR_GRAD1, "Время заключения истекло, теперь Вы свободны");
				GameTextForPlayer(i, "~g~freedom", 5000, 1);
				pInfo[i][pJail] = 0;
				if(!GetString(pInfo[i][pJailReason], "None"))
				{
					strmid(pInfo[i][pJailReason], "None", 0, strlen("None"), 32);
					MysqlUpdatePlayerStr(i, "jailreason", pInfo[i][pJailReason]);
				}
				SetPlayerInterior(i, 0);
				SetPlayerVirtualWorld(i, 0);
			}
		}

 

Share this post


Link to post
Share on other sites
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

    • _bogdan_
      By _bogdan_
      Доброго времени суток, такой вопрос, кто сталкивался с такой же проблемой?
       
      Error reporting going to be applied. GTA_ERROR_ATTEMPT_TO_LOAD_OBJECT_INSTANCE_WITH_UNDEFINED_ID enabled. GTA_ERROR_MODEL_DOES_NOT_HAVE_COLLISION_LOADED enabled. GTA_ERROR_IMG_ARCHIVE_NEEDS_REBUILDING enabled. Error reporting is applied now. Я так понимаю нету каких то обьектов.
      Подскажите пожалуйста. За ранее огромное спасибо.