Доступ к готовым решениям

Переход в группу "Пользователь"

300.00 ₽
Одноразовый платёж
Быстрый переход в группу "Пользователи", без надобности написания постов и ожидания.

Покупка дает возможность:
Быть полноправным участником форума
Нормальное копирование кода
Создавать темы
Скачивать файлы
Доступ к архиву Pawno-Info

Мануал Работа Дровосека [№2]

Статус
В этой теме нельзя размещать новые ответы.

Merlin

Умник



Ко всем new
PHP:
//=====================Лес
new bool:JobWood[MAX_PLAYERS];
new Wood[MAX_PLAYERS];
new TextDrawWood[MAX_PLAYERS];
new PickupWoodJob;
new Text:WoodJob[7];
В public OnPlayerSpawn(playerid)//Вызывается при спавне игрока.
PHP:
if(JobWood[playerid] == true)
	{
  		DisablePlayerCheckpoint(playerid);
		Wood[playerid] = 0;
  		JobWood[playerid] = false;
  		TextDrawWood[playerid] = 0;
  		clicktd[playerid] = false;
  		if(IsPlayerAttachedObjectSlotUsed(playerid,2)) RemovePlayerAttachedObject(playerid,2);
   		if(IsPlayerAttachedObjectSlotUsed(playerid,3)) RemovePlayerAttachedObject(playerid,3);
  		TextDrawHideForPlayer(playerid, WoodJob[0]);
  		TextDrawHideForPlayer(playerid, WoodJob[1]);
  		TextDrawHideForPlayer(playerid, WoodJob[2]);
  		TextDrawHideForPlayer(playerid, WoodJob[3]);
  		TextDrawHideForPlayer(playerid, WoodJob[4]);
  		TextDrawHideForPlayer(playerid, WoodJob[5]);
  		TextDrawHideForPlayer(playerid, WoodJob[6]);
  		CancelSelectTextDraw(playerid);
 		SendClientMessage(playerid,COLOR_RED,"Работа была прервана. Вы не получили заработок!");
	}
В public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)// Вызывается, когда игрок садится в транспорт
PHP:
if(JobWood[playerid] == true)
	{
		if(IsPlayerAttachedObjectSlotUsed(playerid,2) || IsPlayerAttachedObjectSlotUsed(playerid,3))
		{
    		clicktd[playerid] = false;
     		TextDrawWood[playerid] = 0;
     		ApplyAnimation(playerid, "OTB", "wtchrace_lose", 4.0999, 0, 1, 1, 1, 1, 0);
     		switch(random(4))
     		{
    			case 0: SetPlayerCheckpoint(playerid,-444.8168,-113.8276,62.3616,1.0);
				case 1: SetPlayerCheckpoint(playerid,-458.3859,-105.4889,61.6412,1.0);
				case 2: SetPlayerCheckpoint(playerid,-456.8175,-120.6333,64.1732,1.0);
				case 3: SetPlayerCheckpoint(playerid,-439.8764,-129.6427,65.7628,1.0);
			}
 			SendClientMessage(playerid,COLOR_RED,"Вы разбили тележку.");
 			if(IsPlayerAttachedObjectSlotUsed(playerid,2)) RemovePlayerAttachedObject(playerid,2);
			if(IsPlayerAttachedObjectSlotUsed(playerid,3)) RemovePlayerAttachedObject(playerid,3);
    	}
 	}
В public OnPlayerEnterCheckpoint(playerid)// Наступление игроком на Чекпоинт
PHP:
if(PlayerToPoint(1.0, playerid,-444.8168,-113.8276,62.3616))
    {
 		if(JobWood[playerid] == true)
        {
	    	ClearAnimations(playerid);
	    	DisablePlayerCheckpoint(playerid);
	    	TogglePlayerControllable(playerid, 0);
	    	TextDrawShowForPlayer(playerid, WoodJob[0]);
	    	TextDrawShowForPlayer(playerid, WoodJob[1]);
	    	TextDrawShowForPlayer(playerid, WoodJob[2]);
	    	TextDrawShowForPlayer(playerid, WoodJob[3]);
	    	TextDrawShowForPlayer(playerid, WoodJob[4]);
	    	TextDrawShowForPlayer(playerid, WoodJob[5]);
	    	TextDrawShowForPlayer(playerid, WoodJob[6]);
        	SelectTextDraw(playerid, 0xA3B4C5FF);
        	clicktd[playerid] = true;
        	GivePlayerWeapon(playerid, 9, 1);
	    	ApplyAnimation(playerid,"CHAINSAW","CSAW_1",4.1,1,0,0,1,1111000);
	    }
	    return true;
    }
    if(PlayerToPoint(1.0, playerid,-458.3859,-105.4889,61.6412))
    {
        if(JobWood[playerid] == true)
        {
	    	ClearAnimations(playerid);
	    	DisablePlayerCheckpoint(playerid);
	    	TogglePlayerControllable(playerid, 0);
	    	TextDrawShowForPlayer(playerid, WoodJob[0]);
	    	TextDrawShowForPlayer(playerid, WoodJob[1]);
	    	TextDrawShowForPlayer(playerid, WoodJob[2]);
	    	TextDrawShowForPlayer(playerid, WoodJob[3]);
	    	TextDrawShowForPlayer(playerid, WoodJob[4]);
	    	TextDrawShowForPlayer(playerid, WoodJob[5]);
	    	TextDrawShowForPlayer(playerid, WoodJob[6]);
        	SelectTextDraw(playerid, 0xA3B4C5FF);
        	clicktd[playerid] = true;
        	GivePlayerWeapon(playerid, 9, 1);
	    	ApplyAnimation(playerid,"CHAINSAW","CSAW_1",4.1,1,0,0,1,1111000);
	    }
	    return true;
    }
    if(PlayerToPoint(1.0, playerid,-456.8175,-120.6333,64.1732))
    {
        if(JobWood[playerid] == true)
        {
	    	ClearAnimations(playerid);
	    	DisablePlayerCheckpoint(playerid);
	    	TogglePlayerControllable(playerid, 0);
	    	TextDrawShowForPlayer(playerid, WoodJob[0]);
	    	TextDrawShowForPlayer(playerid, WoodJob[1]);
	    	TextDrawShowForPlayer(playerid, WoodJob[2]);
	    	TextDrawShowForPlayer(playerid, WoodJob[3]);
	    	TextDrawShowForPlayer(playerid, WoodJob[4]);
	    	TextDrawShowForPlayer(playerid, WoodJob[5]);
	    	TextDrawShowForPlayer(playerid, WoodJob[6]);
        	SelectTextDraw(playerid, 0xA3B4C5FF);
        	clicktd[playerid] = true;
        	GivePlayerWeapon(playerid, 9, 1);
	    	ApplyAnimation(playerid,"CHAINSAW","CSAW_1",4.1,1,0,0,1,1111000);
	    }
	    return true;
    }
    if(PlayerToPoint(1.0, playerid,-439.8764,-129.6427,65.7628))
    {
        if(JobWood[playerid] == true)
        {
	    	ClearAnimations(playerid);
	    	DisablePlayerCheckpoint(playerid);
	    	TogglePlayerControllable(playerid, 0);
	    	TextDrawShowForPlayer(playerid, WoodJob[0]);
	    	TextDrawShowForPlayer(playerid, WoodJob[1]);
	    	TextDrawShowForPlayer(playerid, WoodJob[2]);
	    	TextDrawShowForPlayer(playerid, WoodJob[3]);
	    	TextDrawShowForPlayer(playerid, WoodJob[4]);
	    	TextDrawShowForPlayer(playerid, WoodJob[5]);
	    	TextDrawShowForPlayer(playerid, WoodJob[6]);
        	SelectTextDraw(playerid, 0xA3B4C5FF);
        	clicktd[playerid] = true;
        	GivePlayerWeapon(playerid, 9, 1);
	    	ApplyAnimation(playerid,"CHAINSAW","CSAW_1",4.1,1,0,0,1,1111000);
	    }
	    return true;
    }
    if(PlayerToPoint(1.0, playerid,-456.2800,-48.9314,59.9215) && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
    {
        if(JobWood[playerid] == true)
        {
			new string[145];
			Wood[playerid] += 1;
			TextDrawWood[playerid] = 0;
			switch(random(4))
	        {
	            case 0: SetPlayerCheckpoint(playerid,-444.8168,-113.8276,62.3616,1.0);
	            case 1: SetPlayerCheckpoint(playerid,-458.3859,-105.4889,61.6412,1.0);
	            case 2: SetPlayerCheckpoint(playerid,-456.8175,-120.6333,64.1732,1.0);
	            case 3: SetPlayerCheckpoint(playerid,-439.8764,-129.6427,65.7628,1.0);
	        }
	     	format(string,sizeof(string),""G"Вы доставили тележку древесины на склад. Всего доставлено "S"%d"G".",Wood[playerid]);
	 		SendClientMessage(playerid,-1, string);
	 		ApplyAnimation(playerid,"PED","IDLE_tired",4.1,1,0,0,0,2500);
	 		if(IsPlayerAttachedObjectSlotUsed(playerid,2)) RemovePlayerAttachedObject(playerid,2);
		    if(IsPlayerAttachedObjectSlotUsed(playerid,3)) RemovePlayerAttachedObject(playerid,3);
		    return true;
		 }
    }
В public OnPlayerPickUpPickup(playerid, pickupid)
PHP:
if(pickupid == PickupWoodJob)
    {
		if(JobWood[playerid] == false) return ShowPlayerDialog(playerid,6,DIALOG_STYLE_MSGBOX,"{00ffa6}Работа лесоруб{ffffff}","{cdf93e}Вы желаете начать рабочий день?","Начать","Отмена");
		if(JobWood[playerid] == true) return ShowPlayerDialog(playerid,7,DIALOG_STYLE_MSGBOX,"{00ffa6}Работа лесоруб{ffffff}","{cdf93e}Вы желаете завершить рабочий день?","Завершить","Отмена");
	}
ИДЁМ В public OnPlayerUpdate(playerid)
PHP:
if(JobWood[playerid] == true)
	{
		if(IsPlayerAttachedObjectSlotUsed(playerid,2) || IsPlayerAttachedObjectSlotUsed(playerid,3))
		{
    		if(IsPlayerApplyAnimation(playerid, "FALL_back", "FALL_collapse", "FALL_fall","FALL_front","FALL_glide","FALL_land","FALL_skyDive","JUMP_glide","JUMP_land","JUMP_launch","JUMP_launch_R"))
	  		{
                clicktd[playerid] = false;
              	TextDrawWood[playerid] = 0;
            	ApplyAnimation(playerid, "OTB", "wtchrace_lose", 4.0999, 0, 1, 1, 1, 1, 0);
            	switch(random(4))
  	        	{
  		    		case 0: SetPlayerCheckpoint(playerid,-444.8168,-113.8276,62.3616,1.0);
 			 		case 1: SetPlayerCheckpoint(playerid,-458.3859,-105.4889,61.6412,1.0);
     				case 2: SetPlayerCheckpoint(playerid,-456.8175,-120.6333,64.1732,1.0);
     				case 3: SetPlayerCheckpoint(playerid,-439.8764,-129.6427,65.7628,1.0);
     			}
	        	SendClientMessage(playerid,COLOR_RED,"Вы разбили тележку.");
	        	if(IsPlayerAttachedObjectSlotUsed(playerid,2)) RemovePlayerAttachedObject(playerid,2);
	    		if(IsPlayerAttachedObjectSlotUsed(playerid,3)) RemovePlayerAttachedObject(playerid,3);
			}
    	}
 	}
В public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
PHP:
case 6:
		{
		    if(response)
		    {
                ResetPlayerWeapons(playerid);
                if(PlayerInfo[playerid][pSex] == 1)
				{
                	SetPlayerSkin(playerid,72);
            	}
            	else
            	{
                	SetPlayerSkin(playerid,131);
            	}
            	switch(random(4))
         	    {
                    case 0: SetPlayerCheckpoint(playerid,-444.8168,-113.8276,62.3616,1.0);
			        case 1: SetPlayerCheckpoint(playerid,-458.3859,-105.4889,61.6412,1.0);
			        case 2: SetPlayerCheckpoint(playerid,-456.8175,-120.6333,64.1732,1.0);
			        case 3: SetPlayerCheckpoint(playerid,-439.8764,-129.6427,65.7628,1.0);
                }
				JobWood[playerid] = true;
				TextDrawWood[playerid] = 0;
				SendClientMessage(playerid,-1,""G"Вы начали рабочий день!");
				PreloadAnimLib(playerid,"PED");
				PreloadAnimLib(playerid,"OTB");
				PreloadAnimLib(playerid,"CHAINSAW");
				ClearAnimations(playerid);
		    }
		    else return true;
		}
		case 7:
		{
		    if(response)
		    {
                new string[145];
				new money = Wood[playerid]*250;
				GivePlayerCash(playerid,money);
				new skin = PlayerInfo[playerid][pChar];
				new memberskin = PlayerInfo[playerid][pMemberSkin];
				if(PlayerInfo[playerid][pMember] == 0)
				{
					SetPlayerSkin(playerid,skin);
				}
				else
				{
					SetPlayerSkin(playerid,memberskin);
				}
				DisablePlayerCheckpoint(playerid);
				Wood[playerid] = 0;
                JobWood[playerid] = false;
                TextDrawWood[playerid] = 0;
                clicktd[playerid] = false;
                if(IsPlayerAttachedObjectSlotUsed(playerid,2)) RemovePlayerAttachedObject(playerid,2);
            	if(IsPlayerAttachedObjectSlotUsed(playerid,3)) RemovePlayerAttachedObject(playerid,3);
		    	format(string,sizeof(string),""G"Вы завершили рабочий день. Заработано "S"%d "G"вирт.",money);
 				SendClientMessage(playerid,-1, string);
		    }
		    else return true;
		}
В public OnPlayerClickTextDraw(playerid, Text:clickedid)
PHP:
if(JobWood[playerid] == true)
	{
		if(clickedid == WoodJob[1])
		{
        	TextDrawWood[playerid] += 1;
        	TextDrawHideForPlayer(playerid, WoodJob[1]);
        	if(TextDrawWood[playerid] == 6)
        	{
    			TogglePlayerControllable(playerid, 1);
    			TextDrawHideForPlayer(playerid, WoodJob[0]);
    			TextDrawHideForPlayer(playerid, WoodJob[1]);
	      		TextDrawHideForPlayer(playerid, WoodJob[2]);
    			TextDrawHideForPlayer(playerid, WoodJob[3]);
    			TextDrawHideForPlayer(playerid, WoodJob[4]);
    			TextDrawHideForPlayer(playerid, WoodJob[5]);
    			TextDrawHideForPlayer(playerid, WoodJob[6]);
    			CancelSelectTextDraw(playerid);
    			clicktd[playerid] = false;
    			SetPlayerCheckpoint(playerid,-456.2800,-48.9314,59.9215,1.0);
    			ApplyAnimation(playerid,"PED","IDLE_chat",4.1,0,0,0,1,3150);
 		    	ResetPlayerWeapons(playerid);
 		    	SetPlayerAttachedObject(playerid,2, 1458, 1, -1.034844, 1.116571, -0.065124, 76.480148, 75.781570, 280.952545, 0.575599, 0.604554, 0.624122);
 		  		SetPlayerAttachedObject(playerid,3, 1463, 1, -0.205007, 1.545087, -0.014800, 171.406829, 96.114616, 0.066009, 0.403667, 1.000000, 1.021239 );
		    }
		}
		else if(clickedid == WoodJob[2])
		{
        	TextDrawWood[playerid] += 1;
        	TextDrawHideForPlayer(playerid, WoodJob[2]);
        	if(TextDrawWood[playerid] == 6)
        	{
            	TogglePlayerControllable(playerid, 1);
    			TextDrawHideForPlayer(playerid, WoodJob[0]);
    			TextDrawHideForPlayer(playerid, WoodJob[1]);
    			TextDrawHideForPlayer(playerid, WoodJob[2]);
    			TextDrawHideForPlayer(playerid, WoodJob[3]);
    			TextDrawHideForPlayer(playerid, WoodJob[4]);
    			TextDrawHideForPlayer(playerid, WoodJob[5]);
    			TextDrawHideForPlayer(playerid, WoodJob[6]);
    			CancelSelectTextDraw(playerid);
    			clicktd[playerid] = false;
    			SetPlayerCheckpoint(playerid,-456.2800,-48.9314,59.9215,1.0);
    			ApplyAnimation(playerid,"PED","IDLE_chat",4.1,0,0,0,1,3150);
	         	ResetPlayerWeapons(playerid);
        		SetPlayerAttachedObject(playerid,2, 1458, 1, -1.034844, 1.116571, -0.065124, 76.480148, 75.781570, 280.952545, 0.575599, 0.604554, 0.624122);
        	  	SetPlayerAttachedObject(playerid,3, 1463, 1, -0.205007, 1.545087, -0.014800, 171.406829, 96.114616, 0.066009, 0.403667, 1.000000, 1.021239 );
    		}
		}
		else if(clickedid == WoodJob[3])
		{
        	TextDrawWood[playerid] += 1;
        	TextDrawHideForPlayer(playerid, WoodJob[3]);
        	if(TextDrawWood[playerid] == 6)
        	{
            	TogglePlayerControllable(playerid, 1);
    			TextDrawHideForPlayer(playerid, WoodJob[0]);
    			TextDrawHideForPlayer(playerid, WoodJob[1]);
    			TextDrawHideForPlayer(playerid, WoodJob[2]);
    			TextDrawHideForPlayer(playerid, WoodJob[3]);
    			TextDrawHideForPlayer(playerid, WoodJob[4]);
    			TextDrawHideForPlayer(playerid, WoodJob[5]);
    			TextDrawHideForPlayer(playerid, WoodJob[6]);
    			CancelSelectTextDraw(playerid);
    			clicktd[playerid] = false;
    			SetPlayerCheckpoint(playerid,-456.2800,-48.9314,59.9215,1.0);
    			ApplyAnimation(playerid,"PED","IDLE_chat",4.1,0,0,0,1,3150);
	         	ResetPlayerWeapons(playerid);
        		SetPlayerAttachedObject(playerid,2, 1458, 1, -1.034844, 1.116571, -0.065124, 76.480148, 75.781570, 280.952545, 0.575599, 0.604554, 0.624122);
        	  	SetPlayerAttachedObject(playerid,3, 1463, 1, -0.205007, 1.545087, -0.014800, 171.406829, 96.114616, 0.066009, 0.403667, 1.000000, 1.021239 );
    		}
		}
        else if(clickedid == WoodJob[4])
		{
        	TextDrawWood[playerid] += 1;
        	TextDrawHideForPlayer(playerid, WoodJob[4]);
        	if(TextDrawWood[playerid] == 6)
        	{
            	TogglePlayerControllable(playerid, 1);
    			TextDrawHideForPlayer(playerid, WoodJob[0]);
    			TextDrawHideForPlayer(playerid, WoodJob[1]);
    			TextDrawHideForPlayer(playerid, WoodJob[2]);
    			TextDrawHideForPlayer(playerid, WoodJob[3]);
    			TextDrawHideForPlayer(playerid, WoodJob[4]);
    			TextDrawHideForPlayer(playerid, WoodJob[5]);
    			TextDrawHideForPlayer(playerid, WoodJob[6]);
    			CancelSelectTextDraw(playerid);
    			clicktd[playerid] = false;
    			SetPlayerCheckpoint(playerid,-456.2800,-48.9314,59.9215,1.0);
    			ApplyAnimation(playerid,"PED","IDLE_chat",4.1,0,0,0,1,3150);
	         	ResetPlayerWeapons(playerid);
        		SetPlayerAttachedObject(playerid,2, 1458, 1, -1.034844, 1.116571, -0.065124, 76.480148, 75.781570, 280.952545, 0.575599, 0.604554, 0.624122);
        	  	SetPlayerAttachedObject(playerid,3, 1463, 1, -0.205007, 1.545087, -0.014800, 171.406829, 96.114616, 0.066009, 0.403667, 1.000000, 1.021239 );
    		}
		}
        else if(clickedid == WoodJob[5])
		{
        	TextDrawWood[playerid] += 1;
        	TextDrawHideForPlayer(playerid, WoodJob[5]);
        	if(TextDrawWood[playerid] == 6)
        	{
				if(PlayerInfo[playerid][pExp] == 0)
        		{
	            	new lvlup = PlayerInfo[playerid][pLevel];
	            	new string[128];
					format(string, sizeof(string),"Поздравляем ваш уровень повысился (уровень: %d)", lvlup);
            		SendClientMessage(playerid, COLOR_BLUE, string);
  				}
     			TogglePlayerControllable(playerid, 1);
   				TextDrawHideForPlayer(playerid, WoodJob[0]);
    			TextDrawHideForPlayer(playerid, WoodJob[1]);
    			TextDrawHideForPlayer(playerid, WoodJob[2]);
    			TextDrawHideForPlayer(playerid, WoodJob[3]);
    			TextDrawHideForPlayer(playerid, WoodJob[4]);
    			TextDrawHideForPlayer(playerid, WoodJob[5]);
    			TextDrawHideForPlayer(playerid, WoodJob[6]);
    			CancelSelectTextDraw(playerid);
    			clicktd[playerid] = false;
    			SetPlayerCheckpoint(playerid,-456.2800,-48.9314,59.9215,1.0);
    			ApplyAnimation(playerid,"PED","IDLE_chat",4.1,0,0,0,1,3150);
      			ResetPlayerWeapons(playerid);
       			SetPlayerAttachedObject(playerid,2, 1458, 1, -1.034844, 1.116571, -0.065124, 76.480148, 75.781570, 280.952545, 0.575599, 0.604554, 0.624122);
      	  		SetPlayerAttachedObject(playerid,3, 1463, 1, -0.205007, 1.545087, -0.014800, 171.406829, 96.114616, 0.066009, 0.403667, 1.000000, 1.021239 );
			}
		}
        else if(clickedid == WoodJob[6])
		{
        	TextDrawWood[playerid] += 1;
        	TextDrawHideForPlayer(playerid, WoodJob[6]);
        	if(TextDrawWood[playerid] == 6)
        	{
            	TogglePlayerControllable(playerid, 1);
    			TextDrawHideForPlayer(playerid, WoodJob[0]);
    			TextDrawHideForPlayer(playerid, WoodJob[1]);
    			TextDrawHideForPlayer(playerid, WoodJob[2]);
    			TextDrawHideForPlayer(playerid, WoodJob[3]);
    			TextDrawHideForPlayer(playerid, WoodJob[4]);
    			TextDrawHideForPlayer(playerid, WoodJob[5]);
    			TextDrawHideForPlayer(playerid, WoodJob[6]);
    			CancelSelectTextDraw(playerid);
    			clicktd[playerid] = false;
    			SetPlayerCheckpoint(playerid,-456.2800,-48.9314,59.9215,1.0);
    			ApplyAnimation(playerid,"PED","IDLE_chat",4.1,0,0,0,1,3150);
	         	ResetPlayerWeapons(playerid);
        		SetPlayerAttachedObject(playerid,2, 1458, 1, -1.034844, 1.116571, -0.065124, 76.480148, 75.781570, 280.952545, 0.575599, 0.604554, 0.624122);
        	  	SetPlayerAttachedObject(playerid,3, 1463, 1, -0.205007, 1.545087, -0.014800, 171.406829, 96.114616, 0.066009, 0.403667, 1.000000, 1.021239 );
    		}
		}
 	}
 	if(clickedid == Text:INVALID_TEXT_DRAW && clicktd[playerid] == true)
	{
    	if(JobWood[playerid] == true)
    	{
         	TogglePlayerControllable(playerid, 1);
        	TextDrawHideForPlayer(playerid, WoodJob[0]);
         	TextDrawHideForPlayer(playerid, WoodJob[1]);
        	TextDrawHideForPlayer(playerid, WoodJob[2]);
         	TextDrawHideForPlayer(playerid, WoodJob[3]);
          	TextDrawHideForPlayer(playerid, WoodJob[4]);
          	TextDrawHideForPlayer(playerid, WoodJob[5]);
          	TextDrawHideForPlayer(playerid, WoodJob[6]);
         	CancelSelectTextDraw(playerid);
          	clicktd[playerid] = false;
          	TextDrawWood[playerid] = 0;
          	ApplyAnimation(playerid, "OTB", "wtchrace_lose", 4.0999, 0, 1, 1, 1, 1, 0);
         	ResetPlayerWeapons(playerid);
          	switch(random(4))
         	{
            	case 0: SetPlayerCheckpoint(playerid,-444.8168,-113.8276,62.3616,1.0);
				case 1: SetPlayerCheckpoint(playerid,-458.3859,-105.4889,61.6412,1.0);
			 	case 2: SetPlayerCheckpoint(playerid,-456.8175,-120.6333,64.1732,1.0);
				case 3: SetPlayerCheckpoint(playerid,-439.8764,-129.6427,65.7628,1.0);
         	}
      		SendClientMessage(playerid,COLOR_RED,"Вы нарушили режим работы.");
		}
	}
В Конце
PHP:
stock PreloadAnimLib(playerid, animlib[])
{
    ApplyAnimation(playerid,animlib,"null",0.0,0,0,0,0,0);
}
stock IsPlayerApplyAnimation(id, ...)
{
    new n = numargs(), anim[32], animlib[32], animname[32];
    new id_anim = GetPlayerAnimationIndex(id);
    if(id_anim == 0) return false;
    else GetAnimationName(id_anim, animlib, sizeof(animlib), animname, sizeof(animname));
    for (new a = 0; a < n; a++)
    {
        new index = 0;
        for(;;)
        {
            anim[index] = getarg(a, index);
            if(anim[index] == 0) break;
            index++;
        }
        if(index != 0 && strcmp(animname, anim, true) == 0) return true;
    }
    return false;
}
В public OnGameModeInit()//события, когда загружается мод
PHP:
// Работа лесоруб
    WoodJob[0] = TextDrawCreate(641.199951, 1.500000, "usebox");
	TextDrawLetterSize(WoodJob[0], 0.000000, 49.378147);
	TextDrawTextSize(WoodJob[0], -2.000000, 0.000000);
	TextDrawAlignment(WoodJob[0], 1);
	TextDrawColor(WoodJob[0], 255);
	TextDrawUseBox(WoodJob[0], true);
	TextDrawBoxColor(WoodJob[0], 102);
	TextDrawSetShadow(WoodJob[0], 0);
	TextDrawSetOutline(WoodJob[0], 0);
	TextDrawBackgroundColor(WoodJob[0], 255);
	TextDrawFont(WoodJob[0], 0);

	WoodJob[1] = TextDrawCreate(147.199996, 182.933334, "LD_SPAC:white");
	TextDrawLetterSize(WoodJob[1], 0.000000, 0.000000);
	TextDrawTextSize(WoodJob[1], 60.800003, 52.266647);
	TextDrawAlignment(WoodJob[1], 1);
	TextDrawColor(WoodJob[1], -5963521);
	TextDrawSetShadow(WoodJob[1], 0);
	TextDrawSetOutline(WoodJob[1], 0);
	TextDrawFont(WoodJob[1], 4);
	TextDrawSetSelectable(WoodJob[1], true);

	WoodJob[2] = TextDrawCreate(208.199981, 329.533355, "LD_SPAC:white");
	TextDrawLetterSize(WoodJob[2], 0.000000, 0.000000);
	TextDrawTextSize(WoodJob[2], 60.800003, 52.266647);
	TextDrawAlignment(WoodJob[2], 1);
	TextDrawColor(WoodJob[2], -5963521);
	TextDrawSetShadow(WoodJob[2], 0);
	TextDrawSetOutline(WoodJob[2], 0);
	TextDrawFont(WoodJob[2], 4);
	TextDrawSetSelectable(WoodJob[2], true);

	WoodJob[3] = TextDrawCreate(273.199981, 214.799972, "LD_SPAC:white");
	TextDrawLetterSize(WoodJob[3], 0.000000, 0.000000);
	TextDrawTextSize(WoodJob[3], 60.800003, 52.266647);
	TextDrawAlignment(WoodJob[3], 1);
	TextDrawColor(WoodJob[3], -5963521);
	TextDrawSetShadow(WoodJob[3], 0);
	TextDrawSetOutline(WoodJob[3], 0);
	TextDrawFont(WoodJob[3], 4);
	TextDrawSetSelectable(WoodJob[3], true);

	WoodJob[4] = TextDrawCreate(378.199981, 312.866699, "LD_SPAC:white");
	TextDrawLetterSize(WoodJob[4], 0.000000, 0.000000);
	TextDrawTextSize(WoodJob[4], 60.800003, 52.266647);
	TextDrawAlignment(WoodJob[4], 1);
	TextDrawColor(WoodJob[4], -5963521);
	TextDrawSetShadow(WoodJob[4], 0);
	TextDrawSetOutline(WoodJob[4], 0);
	TextDrawFont(WoodJob[4], 4);
	TextDrawSetSelectable(WoodJob[4], true);

	WoodJob[5] = TextDrawCreate(367.199981, 119.733367, "LD_SPAC:white");
	TextDrawLetterSize(WoodJob[5], 0.000000, 0.000000);
	TextDrawTextSize(WoodJob[5], 60.800003, 52.266647);
	TextDrawAlignment(WoodJob[5], 1);
	TextDrawColor(WoodJob[5], -5963521);
	TextDrawSetShadow(WoodJob[5], 0);
	TextDrawSetOutline(WoodJob[5], 0);
	TextDrawFont(WoodJob[5], 4);
	TextDrawSetSelectable(WoodJob[5], true);

	WoodJob[6] = TextDrawCreate(228.199981, 75.933403, "LD_SPAC:white");
	TextDrawLetterSize(WoodJob[6], 0.000000, 0.000000);
	TextDrawTextSize(WoodJob[6], 60.800003, 52.266647);
	TextDrawAlignment(WoodJob[6], 1);
	TextDrawColor(WoodJob[6], -5963521);
	TextDrawSetShadow(WoodJob[6], 0);
	TextDrawSetOutline(WoodJob[6], 0);
	TextDrawFont(WoodJob[6], 4);
	TextDrawSetSelectable(WoodJob[6], true);
К new
PHP:
new bool:clicktd[MAX_PLAYERS]; // проверка на нажатие ClickTextDraw
В public OnPlayerConnect(playerid)
PHP:
	// Стандартные обьекты с лесорубки
	RemoveBuildingForPlayer(playerid, 3423, -435.8438, -63.5234, 57.8672, 0.25);
	RemoveBuildingForPlayer(playerid, 12807, -478.1875, -100.4141, 64.4609, 0.25);
	RemoveBuildingForPlayer(playerid, 3415, -435.8438, -63.5234, 57.8672, 0.25);
	RemoveBuildingForPlayer(playerid, 832, -526.2188, -54.5781, 62.8828, 0.25);
	RemoveBuildingForPlayer(playerid, 847, -482.5859, -45.3594, 60.6016, 0.25);
	RemoveBuildingForPlayer(playerid, 834, -490.9688, -39.3672, 61.6328, 0.25);
	RemoveBuildingForPlayer(playerid, 13004, -510.6719, -177.9141, 78.5703, 0.25);
Ко всем Object
PHP:
// лесопилка
	CreateObject(1684, -435.64, -63.63, 59.47,   0.00, 0.00, -90.00);
	CreateObject(13435, -434.38, -88.79, 60.38,   3.14, 0.00, 90.00);
	CreateObject(3403, -439.57, -77.72, 61.36,   356.86, 0.00, 0.00);
	CreateObject(3403, -439.78, -88.55, 61.36,   356.86, 0.00, 0.00);
	CreateObject(3474, -467.75, -46.27, 65.11,   0.00, 0.00, 0.00);
	CreateObject(694, -490.50, -26.71, 56.40,   356.86, 0.00, 3.14);
	CreateObject(694, -491.85, -101.30, 59.19,   356.86, 0.00, 3.14);
	CreateObject(694, -455.99, -10.71, 58.10,   356.86, 0.00, 3.14);
	CreateObject(791, -444.24, -115.38, 55.09,   356.86, 0.00, -0.01);
	CreateObject(3403, -457.07, -48.03, 61.36,   356.86, 0.00, 89.34);
	CreateObject(18609, -454.01, -44.15, 59.98,   0.00, 0.00, 91.80);
	CreateObject(18609, -453.98, -46.40, 59.98,   0.00, 0.00, 92.76);
	CreateObject(18609, -453.96, -45.13, 59.98,   0.00, 0.00, 92.76);
	CreateObject(18609, -453.90, -45.74, 60.34,   0.00, 0.00, 92.76);
	CreateObject(18609, -453.89, -44.42, 60.34,   0.00, 0.00, 92.76);
	CreateObject(18609, -453.92, -45.11, 60.80,   0.00, 0.00, 92.76);
	CreateObject(18609, -458.65, -50.43, 58.56,   36.00, 0.00, 0.00);
	CreateObject(4084, -437.48, -60.69, 58.00,   0.00, 90.00, 0.00);
	CreateObject(4084, -433.91, -60.69, 58.00,   0.00, 90.00, 0.00);
	CreateObject(4084, -433.93, -66.57, 58.00,   0.00, 90.00, 0.00);
	CreateObject(4084, -437.50, -66.55, 58.00,   0.00, 90.00, 0.00);
	CreateObject(18609, -438.73, -77.82, 59.40,   0.00, 0.00, 95.40);
К пикапам
PHP:
PickupWoodJob = CreatePickup(1275, 23, -438.0905,-66.9683,59.0859,-1);
Проблемы если будут пишите сюда помогу ​
 
Последнее редактирование:
Статус
В этой теме нельзя размещать новые ответы.
Сверху Снизу