Если Вы нашли ответ на вопрос, пожалуйста, пометьте необходимый ответ лучшим (галочка сбоку от сообщения) и поблагодарите автора этого ответа поднятием репутации (плюс в нижней правой части сообщения). Спасибо.
Подробнее:
FAQ по форуму
Как пометить ответ лучшим

Question

Здравствуйте пользователи форма, у меня есть несколько вопросов и проблем

1. Как убрать спавн в больнице после перезахода на сервер (каждого)
2. Как расставить чекпойнты для авто школы и финеш?

Share this post


Link to post

9 answers to this question

  • 0

@Daniil Roslyakov Ошибок я в данной системе не обнаружил. Значит, вы перезаходите в игру либо под фракцией медика, либо вы не прошли курс лечения в прошлый раз. Попробуйте пройти курс лечения, покинуть больницу, и опять перезайти. Если не получится, напишите. 

Share this post


Link to post
  • 0

Добрый день. 

1. Опишите подробнее. 

2. Для расставления чекпоинтов снимайте координаты через /save и прописывайте в моде. 

Share this post


Link to post
  • 0

@stibs 1. Перезахожу на сервер, и сразу появляюсь в больнице с потерей ХП
2. Можно скрипты?

Share this post


Link to post
  • 0

@Daniil Roslyakov 1. Вы все время там появляетесь или только тогда, когда погибли? 
2. Можно поискать мануалы на сторонних форумах, Если найду, сейчас сюда залью. 

Share this post


Link to post
  • 0

@stibs 1.все время при в ходи в игру
2. Хорошо, заранее спасибо!

Share this post


Link to post
  • 0

@stibs 

public OnPlayerSpawn(playerid)
{
    if(PI[playerid][pCash])
	{
		ResetPlayerMoney(playerid);
		GivePlayerMoney(playerid, PI[playerid][pCash]);
	}
	
    if(PI[playerid][pModel] == 0)
	{
		SetHealth(playerid,100);
		SetPlayerPosEx(playerid, 334.6500, -172.7800, 1002.9600);
	    SetPlayerFacingAngle(playerid, -26.1600);
	    SetPlayerCameraPos(playerid, 336.4800, -169.2100, 1003.5600);
		SetPlayerCameraLookAt(playerid, 336.2200, -170.1800, 1003.5000);
		TogglePlayerControllable(playerid, 0);
		SetPlayerVirtualWorld(playerid,playerid);
		SetPlayerInterior(playerid,5);
		for(new i; i < 10; i++) TextDrawShowForPlayer(playerid,Customization[i]);
		SetPVarInt(playerid,"SKIN-STEP",0);
		SelectTextDrawEx(playerid,0xcfcfcfAA);
		SCM(playerid, 0xcececeFF, "Сейчас Вам доступна функция {1383b4}\"Кастомизация\"");
		SCM(playerid, 0xcececeFF, "Система подобрала Вам внешность персонжа по указанному возрасту и полу при регистрации.");
		SCM(playerid, 0xcececeFF, "От Вас требуется выбрать наиболее подходящую одежду для Вашего персонажа.");
		return true;
	}
	if(GetPVarInt(playerid, "SpecBool") == 1)
        {
                DeletePVar(playerid, "SpecBool");
                new Float:X = GetPVarFloat(playerid, "SpecX"), Float:Y = GetPVarFloat(playerid, "SpecY"), Float:Z = GetPVarFloat(playerid, "SpecZ"),
                Float:FA = GetPVarFloat(playerid, "SpecFA"), inter = GetPVarInt(playerid, "SpecInt"), world = GetPVarInt(playerid, "SpecWorld");
                DeletePVar(playerid, "SpecX");
                DeletePVar(playerid, "SpecY");
                DeletePVar(playerid, "SpecZ");
                DeletePVar(playerid, "SpecFA");
                DeletePVar(playerid, "SpecInt");
                DeletePVar(playerid, "SpecWorld");
                SetPlayerPos(playerid, X, Y, Z);
                SetPlayerFacingAngle(playerid, FA);
                SetPlayerVirtualWorld(playerid, world);
                SetPlayerInterior(playerid, inter);
                SetPlayerScore(playerid, PI[playerid][pLevel]);
                if(PI[playerid][pWanted] > 0) SetPlayerWantedLevel(playerid, PI[playerid][pWanted]);
                if(PI[playerid][pSkin] > 0) SetPlayerSkin(playerid,PI[playerid][pSkin]);
                else SetPlayerSkin(playerid, PI[playerid][pModel]);
                return true;
        }
	if(ClothesRound[playerid] == true)
	{
		SetHealth(playerid,100);
		SetPlayerPosEx(playerid, 334.6500, -172.7800, 1002.9600);
	    SetPlayerFacingAngle(playerid, -26.1600);
	    SetPlayerCameraPos(playerid, 336.4800, -169.2100, 1003.5600);
		SetPlayerCameraLookAt(playerid, 336.2200, -170.1800, 1003.5000);
		TogglePlayerControllable(playerid, 0);
		SetPlayerVirtualWorld(playerid,playerid);
		SetPlayerInterior(playerid,5);
		for(new i; i < 10; i++) TextDrawShowForPlayer(playerid, SkinShopBox[i]);
		PlayerTextDrawShow(playerid,SkinShopDraw[playerid]);
		SelectTextDrawEx(playerid,0xcfcfcfAA);
		
		if(PI[playerid][pSex] == 1) SetPlayerSkin(playerid, SkinShopM[SelectCharPlace[playerid]][0]);
		else SetPlayerSkin(playerid, SkinShopZ[SelectCharPlace[playerid]][0]);
		
		new russtring[64];
		f(russtring,"Стоимость: 2000 руб."),RussianString(russtring);
		PlayerTextDrawSetString(playerid,SkinShopDraw[playerid],russtring);
		return true;
	}
	
	if(ShowProgress[playerid] == false) ShowProgress[playerid] = true;
	
	if(PI[playerid][pSetting][4] == 1)
	{
		for(new i; i<6; i++) TextDrawShowForPlayer(playerid, PotrebBox[i]);
		PlayerTextDrawShow(playerid, PotrebDraw[playerid][0]);
		PlayerTextDrawShow(playerid, PotrebDraw[playerid][1]);
	}
	
	if(PI[playerid][pSetting][6] == 1)
	{
		for(new i; i<5; i++) TextDrawShowForPlayer(playerid, InfoBox[i]);
		PlayerTextDrawShow(playerid, InfoDraw[playerid]);
	}
	
	if(UseWork[playerid])
	{
		UseWork[playerid] = 0;
		for(new i; i < 6; i++) PlayerTextDrawHide(playerid, StatusWork[playerid][i]);
	}
	
	if(PI[playerid][pFightStyle]) SetPlayerFightingStyle(playerid, PI[playerid][pFightStyle]);
	else SetPlayerFightingStyle(playerid, 0);
	
	if(PI[playerid][pWanted]) SetPlayerWantedLevel(playerid, PI[playerid][pWanted]);
	
	SetHealth(playerid, PI[playerid][pHeal]);
    TogglePlayerControllable(playerid, true);
 	DisablePlayerCheckpoint(playerid);
	SetPlayerScore(playerid, PI[playerid][pLevel]);
	PlayerPlaySound(playerid, 1184, 0.0, 0.0, 0.0);
	SetPVarInt(playerid, "K_Times", 0);
    SetPVarInt(playerid, "AC_Protection", 1);
    Air_Gettime(playerid, 6);
    SetPlayerSkills(playerid);
    
	if(GetPVarInt(playerid, "Connected")) // Если заспавнился впервый раз
	{
		for(new i; i < 13; i++)
		{
			if(!PI[playerid][pGun][i] || !PI[playerid][pAmmo][i]) continue;
			GivePlayerWeaponAC(playerid, PI[playerid][pGun][i], PI[playerid][pAmmo][i]);
		}
		new gun_string[56], ammo_string[56], string[256];
		settext(gun_string,"0,0,0,0,0,0,0,0,0,0,0,0,0");
		settext(ammo_string,"0,0,0,0,0,0,0,0,0,0,0,0,0");
		format(string, sizeof(string), "UPDATE "T_ACCOUNTS" SET `guns` = '%s', `ammos` = '%s' WHERE `name` = '%s'", gun_string, ammo_string, PI[playerid][pName]);
		mysql_tquery(dbHandle, string, "", "");
		DeletePVar(playerid, "Connected");
		PreloadAnimLibs(playerid);
		
		LoadMyCar(playerid);
	}

	if(PI[playerid][pMember]) SetPlayerSkin(playerid, PI[playerid][pMemberSkin]);
	else SetPlayerSkin(playerid, PI[playerid][pModel]);
	SetPlayerColorEx(playerid, TeamColors[GetTeamID(playerid)]);
	
	if(PI[playerid][Spectating] != INVALID_PLAYER_ID)
	{
	    SetPlayerPosEx(playerid, GetPVarFloat(playerid, "SpecX"), GetPVarFloat(playerid, "SpecY"), GetPVarFloat(playerid, "SpecZ"));
	    SetPlayerFacingAngle(playerid, GetPVarFloat(playerid, "SpecA"));
		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");
		PI[playerid][Spectating] = INVALID_PLAYER_ID;
		SetPlayerColorEx(playerid, TeamColors[GetTeamID(playerid)]);
		SetPlayerScore(playerid, PI[playerid][pLevel]);
		if(PI[playerid][pWanted]) SetPlayerWantedLevel(playerid, PI[playerid][pWanted]);
		if(PI[playerid][pMember]) SetPlayerSkin(playerid, PI[playerid][pMemberSkin]);
		else if(Oldskin2[playerid] > 0) SetPlayerSkin(playerid, Oldskin2[playerid]);
		else SetPlayerSkin(playerid, PI[playerid][pModel]);
		return true;
	}
	
	SetPVarInt(playerid, "AntiBreik", 10);
	new stringss[10];
    GetPlayerVersion(playerid, stringss, sizeof(stringss));
    if(strfind(stringss, "LoL4" ) != -1)
	{
		ShowPlayerDialog(playerid,D_NULL,DIALOG_STYLE_MSGBOX,"{FF0404}Античит","\
		{109DE8}[!] {FFFFFF}Вы были кикнуты с сервера. Причина: подозрение на использование читов(Sobeit)\n\
		Для продолжения игры на сервере следует удалить все читерские программы,\n\
		на Вашем компьютере. Не пытайтесь зайти на сервер...","Закрыть","");
		return Kick(playerid);
	}
	if(GetPlayerHotel(playerid) != 0)
	{
		FreezePlayer(playerid, 7);
		new id = GetPlayerHotel(playerid);
		switch(hotel[id][hVirtualworld])
		{
			case 1: SetPlayerPositionAdvanced(playerid, HOTEL_POS, hotel[id][hVirtualworld]-id, 12+id);
			case 2: SetPlayerPositionAdvanced(playerid, HOTEL_POS, hotel[id][hVirtualworld]-id, 13+id);
			case 3: SetPlayerPositionAdvanced(playerid, HOTEL_POS, hotel[id][hVirtualworld]-id, 14+id);
			case 4: SetPlayerPositionAdvanced(playerid, HOTEL_POS, hotel[id][hVirtualworld]-id, 15+id);
			case 5: SetPlayerPositionAdvanced(playerid, HOTEL_POS, hotel[id][hVirtualworld]-id, 16+id);
		}
		SetPVarInt(playerid, "hotelid", id);
	}
	switch(PI[playerid][pJail])
	{
		case 1:
		{
			if(PI[playerid][pHeal] < 10) SetHealth(playerid, 50);
			SetPlayerInterior(playerid, 0);
			SetPlayerVirtualWorld(playerid, 0);
			SetPlayerPosEx(playerid,897.5291,2081.3577,2721.8101);
			SetPlayerFacingAngle(playerid, 0.0000);
			SetCameraBehindPlayer(playerid);
			new string[80];
			format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~JAILED: ~w~%d", PI[playerid][pJailTime]);
			GameTextForPlayer(playerid, string, 3000, 3);
			SCM(playerid, COLOR_RED, "Вы еще не отсидели свой тюремный срок");
			return true;
		}
		case 2:
		{
		    if(PI[playerid][pHeal] < 10) SetHealth(playerid, 50);
		    SetPlayerInterior(playerid, 0);
		    SetPlayerVirtualWorld(playerid, 0);
			SetPlayerPosEx(playerid,830.4164,1311.4521,421.0300);
			SetPlayerFacingAngle(playerid, 0.4590);
			SetCameraBehindPlayer(playerid);
			new string[80];
			format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~JAILED: ~w~%d", PI[playerid][pJailTime]);
			GameTextForPlayer(playerid, string, 3000, 3);
			SCM(playerid, COLOR_RED, "Вы еще не отсидели свой тюремный срок");
			return true;
		}
	}
	
	if(PlayerDied[playerid] == true || PI[playerid][pHeal] < 5)
	{
	    InHospital[playerid] = true;
	    SetHealth(playerid, 20);
	    SetPlayerFacingAngle(playerid, 270);
	    SetPlayerVirtualWorld(playerid,4);
	    SetPlayerInterior(playerid,0);
	    FreezePlayer(playerid, 2000);
		new Random = random(sizeof(MedicSpawn));
        SetPlayerPosEx(playerid, MedicSpawn[Random][0], MedicSpawn[Random][1], MedicSpawn[Random][2]);
        SCM(playerid,COLOR_WHITE,"Вам придется пройти курс лечения или вылечиться у медика. Войдите в палату и делайте процедуру.");
        return true;
	}
	
	if(!GetPlayerHouse(playerid) && PI[playerid][pSpawnChange] == 1) PI[playerid][pSpawnChange] = 0;
	if(!PI[playerid][pMember] && PI[playerid][pSpawnChange] == 2) PI[playerid][pSpawnChange] = 0;
	
	switch(PI[playerid][pSpawnChange])
	{
		case 0:
		{
			SetPlayerPosEx(playerid, SpawnCoord[0][0], SpawnCoord[0][1], SpawnCoord[0][2]);//2565.0808, -1800.3978, 21.9918);
			SetPlayerFacingAngle(playerid, 90.0);
			SetCameraBehindPlayer(playerid);
			SetPlayerInterior(playerid, 0);
			SetPlayerVirtualWorld(playerid, 0);
		}
        case 1:
		{
		    new i = GetPVarInt(playerid, "PlayerHouse");
			SetPlayerPosEx(playerid, HouseInfo[i][hExitx],HouseInfo[i][hExity], HouseInfo[i][hExitz]);
			SetPlayerInterior(playerid, HouseInfo[i][hInt]);
			SetPlayerVirtualWorld(playerid, HouseInfo[i][hVirtual]);
		}
		case 2:
		{
			switch(PI[playerid][pMember])
			{
				case TEAM_MERIA:
				{
					SetPlayerPosEx(playerid, -938.1777,873.6743,2512.9500);
					SetPlayerFacingAngle(playerid, 270.0);
					SetCameraBehindPlayer(playerid);
					SetPlayerInterior(playerid, 0);
					SetPlayerVirtualWorld(playerid, 0);
				}
				case TEAM_FBI:
				{
					SetPlayerPosEx(playerid, 211.1413, -450.7908, 1006.3767);
					SetPlayerFacingAngle(playerid, 270.0);
					SetCameraBehindPlayer(playerid);
					SetPlayerInterior(playerid, 0);
					SetPlayerVirtualWorld(playerid, 0);
				}
				case TEAM_DPS:
				{
					SetPlayerPosEx(playerid, -665.9310, 2602.5171, 1004.0374);
					SetPlayerFacingAngle(playerid, 270.0);
					SetCameraBehindPlayer(playerid);
					SetPlayerInterior(playerid, 0);
					SetPlayerVirtualWorld(playerid, 0);
				}
				case TEAM_POLICIA:
				{
					SetPlayerInterior(playerid, 0);
				    SetPlayerPosEx(playerid,877.3240, 2095.3572, 2721.7163);
				    SetPlayerFacingAngle(playerid, 90.3590);
				    SetCameraBehindPlayer(playerid);
				    SetPlayerVirtualWorld(playerid, 0);
				}
				case TEAM_BOLNICA:
				{
					SetPlayerPosEx(playerid, 1611.4752,1216.7136,2513.4299);
					SetPlayerFacingAngle(playerid, 236.6010);
					SetCameraBehindPlayer(playerid);
					FreezePlayer(playerid, 2000);
					SetPlayerInterior(playerid, 0);
					SetPlayerVirtualWorld(playerid, 0);
					InHospital[playerid] = true;
				}
				case TEAM_ARMIYA:
				{
				    SetPlayerPosEx(playerid, -328.8514,326.8230,2213.0000);
					SetPlayerFacingAngle(playerid, 260.9382);
					SetCameraBehindPlayer(playerid);
					FreezePlayer(playerid, 2000);
				    SetPlayerInterior(playerid, 0);
				    SetPlayerVirtualWorld(playerid, 0);
				}
				case TEAM_OPG1:
				{
					SetPlayerPosEx(playerid, -2625.4299,2914.8960,2738.6201);
					SetPlayerFacingAngle(playerid, 277.8666);
					SetCameraBehindPlayer(playerid);
					FreezePlayer(playerid, 2000);
					SetPlayerInterior(playerid, 5);
					SetPlayerVirtualWorld(playerid, 5);
				}
				case TEAM_RM:
				{
					SetPlayerPosEx(playerid, -2542.4685, 911.7820, 1004.3563);
					SetPlayerFacingAngle(playerid, 0.0);
					SetCameraBehindPlayer(playerid);
					FreezePlayer(playerid, 2000);
					SetPlayerInterior(playerid, 0);
					SetPlayerVirtualWorld(playerid, 0);
				}
				case TEAM_AUTOSCHOOL:
				{
					SetPlayerPosEx(playerid, 2294.6746,-1925.9036,2022.9600);
					SetPlayerFacingAngle(playerid, 277.8666);
					SetCameraBehindPlayer(playerid);
					FreezePlayer(playerid, 2000);
					SetPlayerInterior(playerid, 0);
					SetPlayerVirtualWorld(playerid, 0);
				}
				case TEAM_ITALYM:
				{
					SetPlayerPosEx(playerid, 2121.7405,-1800.3630,23.9157);
					SetPlayerFacingAngle(playerid, 277.8666);
					SetCameraBehindPlayer(playerid);
					FreezePlayer(playerid, 2000);
					SetPlayerInterior(playerid, 0);
					SetPlayerVirtualWorld(playerid, 0);
				}
				case TEAM_OPG2:
				{
					SetPlayerPosEx(playerid, 2569.7114,-1845.6210,2522.8401);
					SetPlayerFacingAngle(playerid, 180.8666);
					SetCameraBehindPlayer(playerid);
					FreezePlayer(playerid, 2000);
					SetPlayerInterior(playerid, 5);
					SetPlayerVirtualWorld(playerid, 5);
				}
				case TEAM_SMI:
				{
					SetPlayerPosEx(playerid, -96.1380,453.6070,3013.1499);
					SetPlayerFacingAngle(playerid, 15.0987);
					SetCameraBehindPlayer(playerid);
					FreezePlayer(playerid, 2000);
					SetPlayerInterior(playerid, 1);
					SetPlayerVirtualWorld(playerid, 0);
				}
			}
		}
	}
	return 1;
}

stock нету

Share this post


Link to post
  • 0

@Daniil Roslyakov Покажите все, что связано с переменной PlayerDied. Также, на сервер вы не входите случайно с 5 хп и меньше? Также скиньте все, что связано с InHospital

Share this post


Link to post
  • 0

@stibs 

	if(PlayerDied[playerid] == true || PI[playerid][pHeal] < 5)
	{
	    InHospital[playerid] = true;
	    SetHealth(playerid, 20);
	    SetPlayerFacingAngle(playerid, 270);
	    SetPlayerVirtualWorld(playerid,4);
	    SetPlayerInterior(playerid,0);
	    FreezePlayer(playerid, 2000);
		new Random = random(sizeof(MedicSpawn));
        SetPlayerPosEx(playerid, MedicSpawn[Random][0], MedicSpawn[Random][1], MedicSpawn[Random][2]);
        SCM(playerid,COLOR_WHITE,"Вам придется пройти курс лечения или вылечиться у медика. Войдите в палату и делайте процедуру.");
        return true;
	}
				case TEAM_BOLNICA:
				{
					SetPlayerPosEx(playerid, 1611.4752,1216.7136,2513.4299);
					SetPlayerFacingAngle(playerid, 236.6010);
					SetCameraBehindPlayer(playerid);
					FreezePlayer(playerid, 2000);
					SetPlayerInterior(playerid, 0);
					SetPlayerVirtualWorld(playerid, 0);
					InHospital[playerid] = true;
				}
stock HospitalHealth(playerid)
{
    if(GetPVarInt(playerid, "lechenie") > 0 && InHospital[playerid])
    {
       if(PI[playerid][pHeal] < 99.00)
       {
			if(PI[playerid][pVip])
			{
			    GameTextForPlayer(playerid,"~w~+ 3 HP",300,4);
				SetHealth(playerid,PI[playerid][pHeal] + 3.0);
			}
			else
			{
			    GameTextForPlayer(playerid,"~w~+ 1 HP",300,4);
			    SetHealth(playerid,PI[playerid][pHeal] + 1.0);
			}
			PlayerPlaySound(playerid, 17803, 0.0, 0.0, 0.0);
       }
       else
	   {
           BedDefault(playerid);
           SetPVarInt(playerid, "lechenie", 0);
           PI[playerid][pBed] = 0;
           PI[playerid][pCity] = 0;
           PlayerDied[playerid] = false;
           SCM(playerid, 0x6ab1ffaa, "Курс лечения пройден!");
	   }
	}
	return 1;
}
	if(PlayerDied[playerid] == true || PI[playerid][pHeal] < 5)
	{
	    InHospital[playerid] = true;
	    SetHealth(playerid, 20);
	    SetPlayerFacingAngle(playerid, 270);
	    SetPlayerVirtualWorld(playerid,4);
	    SetPlayerInterior(playerid,0);
	    FreezePlayer(playerid, 2000);
		new Random = random(sizeof(MedicSpawn));
        SetPlayerPosEx(playerid, MedicSpawn[Random][0], MedicSpawn[Random][1], MedicSpawn[Random][2]);
        SCM(playerid,COLOR_WHITE,"Âàì ïðèäåòñÿ ïðîéòè êóðñ ëå÷åíèÿ èëè âûëå÷èòüñÿ ó ìåäèêà. Âîéäèòå â ïàëàòó è äåëàéòå ïðîöåäóðó.");
        return true;
	}
	if(PI[playerid][pJailTime] == 0)
	{
	    if(IsPlayerToSquare(playerid,-891.3302,-2950.0190,2915.9917,560.3257)) PI[playerid][pCity] = 1;
		else if(IsPlayerToSquare(playerid,-2929.6589,-2889.1660,-1326.9077,1493.1770)) PI[playerid][pCity] = 2;
		else PI[playerid][pCity] = 3;
		PlayerDied[playerid] = true;
	}
	//SetHunger(playerid, 40);
	DisablePlayerCheckpoint(playerid);
	if(pickupid == bolnicapick[1]) // ìåäèêè âõîä ls+ bolnicapick
	{
        if(PlayerDied[playerid] == true || GetPVarInt(playerid, "lechenie") > 0) return SCM(playerid,COLOR_YELLOW,"Âû íå ïðîøëè êóðñ ëå÷åíèÿ.");
		SetPlayerInterior(playerid,0);
		SetPlayerPosEx(playerid,-286.6343,581.7749,12.1118);
		SetPlayerFacingAngle(playerid, 355.0);
		SetPlayerVirtualWorld(playerid, 0);
        FreezePlayer(playerid, 2000);
	}
CMD:sethp(playerid, params[])
{
	if(PI[playerid][pAdmin] < 3) return 1;
	else if(AdminLogged[playerid] == false) return SCM(playerid, COLOR_GREY, YouAreNotLoggedInAsAdmin);
	else if(sscanf(params, "ui", params[0], params[1])) return SCM(playerid, COLOR_WHITE, "• {66CC00}[ Подсказка ] {ffffff}Введите: /sethp [id игрока] [кол-во жизней]");
	else if(!IsPlayerConnected(params[0])) return SCM(playerid, COLOR_GREY, PlayerIsNotOnline);
	else if(PlayerLogged[params[0]] == false) return SCM(playerid, COLOR_GREY, PlayerIsNotAuthorized);
	else if(params[1] > 100 || params[1] < 0) return SCM(playerid, COLOR_GREY, "Количество жизней от 0 до 100!");
	PI[params[0]][pHealthS] = PI[params[0]][pHeal] = params[1];
	BedDefault(params[0]);
	SetPVarInt(params[0], "lechenie", 0);
	PI[params[0]][pBed] = PI[params[0]][pCity] = 0;
	PlayerDied[params[0]] = false;
	SetHealth(params[0], params[1]);
	new string[128];
	format(string, sizeof(string), "Администратор %s[%d] изменил Вам показатель здоровья на %i", GetName(playerid), playerid, params[1]);
	SCM(params[0], COLOR_WHITE, string);
	format(string, sizeof(string), "[A] %s[%d] изменил показатель здоровья игроку %s[%d] на %i", GetName(playerid), playerid, GetName(params[0]), params[0], params[1]);
	SendAdminMessage(COLOR_GREY, string);
	return 1;
}
   if(PlayerDied[params[0]] == true)
	{
		BedDefault(params[0]);
		SetPVarInt(params[0], "lechenie", 0);
		PI[params[0]][pBed] = 0;
		PI[params[0]][pCity] = 0;
		PlayerDied[params[0]] = false;
	}
stock HospitalHealth(playerid)
{
    if(GetPVarInt(playerid, "lechenie") > 0 && InHospital[playerid])
    {
       if(PI[playerid][pHeal] < 99.00)
       {
			if(PI[playerid][pVip])
			{
			    GameTextForPlayer(playerid,"~w~+ 3 HP",300,4);
				SetHealth(playerid,PI[playerid][pHeal] + 3.0);
			}
			else
			{
			    GameTextForPlayer(playerid,"~w~+ 1 HP",300,4);
			    SetHealth(playerid,PI[playerid][pHeal] + 1.0);
			}
			PlayerPlaySound(playerid, 17803, 0.0, 0.0, 0.0);
       }
       else
	   {
           BedDefault(playerid);
           SetPVarInt(playerid, "lechenie", 0);
           PI[playerid][pBed] = 0;
           PI[playerid][pCity] = 0;
           PlayerDied[playerid] = false;
           SCM(playerid, 0x6ab1ffaa, "Курс лечения пройден!");
	   }
	}
	return 1;
}

 

Share this post


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