Доступ к архиву

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

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

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

Работа грузчика

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

Joker

Умник
Конечно есть скрипты, но некоторые допускают ошибки, когда вшивают скрипт в мод. Если не сочтёте тему нужной, удалите.
Для начала ко всем new:
PHP:
new PlayerInJob[MAX_PLAYERS];
new Meshki[MAX_PLAYERS];
new Meshok[MAX_PLAYERS];
new gryz1;
new gryz2;
new Oldskin2[MAX_PLAYERS];
#define COLOR_SYSTEM 0xEFEFF7AA
В public OnPlayerUpdate
PHP:
new animlib[32];
   new animname[32];

 if(Meshok[playerid] == 1 && !PlayerToPoint(2.0,playerid,2230.8132324219,-2285.7043457031,13.531787872314)){
 GetAnimationName(GetPlayerAnimationIndex(playerid),animlib,32,animname,32);
 if(strcmp(animname, "IDLE_STANCE", true) != 0 && strcmp(animname, "RUN_CIVI", true) != 0 && strcmp(animname, "WALK_CIVI", true) != 0 && strcmp(animname, "crry_prtial", true) != 0 && strcmp(animname, "SPRINT_PANIC", true) != 0 && strcmp(animname, "RUN_PLAYER", true) != 0 && strcmp(animname, "WALK_PLAYER", true) != 0 && strcmp(animname, "SPRINT_CIVI", true) != 0){
 Meshok[playerid] = 0;
 SendClientMessage(playerid, COLOR_RED, "Вы уронили мешок!");
 if(IsPlayerAttachedObjectSlotUsed(playerid,2)) RemovePlayerAttachedObject(playerid,2);
 ApplyAnimation(playerid,"PED","IDLE_tired",4.1,0,1,1,0,1);
 SetPlayerCheckpoint(playerid,2230.8132324219,-2285.7043457031,13.531787872314,2.0);
  }
 }
В public OnGameModeInit
PHP:
	CreateObject(2060,2172.89526367,-2256.86108398,12.46142387,0.00000000,0.00000000,44.00000000);
   CreateObject(2060,2172.89453125,-2256.86035156,12.46142387,0.00000000,0.00000000,43.99475098);
   CreateObject(2060,2172.42309570,-2256.42822266,12.46099281,0.00000000,0.00000000,47.25003052);
   CreateObject(2060,2173.31835938,-2257.36694336,12.46148300,0.00000000,0.00000000,43.75000000);
   CreateObject(2060,2172.75854492,-2256.49853516,12.77687645,0.00000000,0.00000000,315.24987793);
   CreateObject(2060,2172.41381836,-2256.85815430,12.77693558,0.00000000,0.00000000,316.25000000);
   CreateObject(2060,2173.61865234,-2257.31201172,12.77693558,0.00000000,0.00000000,136.00000000);
   CreateObject(2060,2173.29321289,-2257.70800781,12.77693558,0.00000000,0.00000000,134.00000000);
   CreateObject(2060,2173.73193359,-2257.77856445,12.46504116,0.00000000,0.00000000,42.00000000);
   CreateObject(2060,2172.61962891,-2256.63281250,13.09232903,0.00000000,0.00000000,0.00000000);
   CreateObject(2060,2229.29809570,-2286.05883789,13.53178787,0.00000000,0.00000000,226.00000000);
   CreateObject(2060,2229.61987305,-2286.45825195,13.53178787,0.00000000,0.00000000,45.00000000);
   CreateObject(2060,2230.00610352,-2286.81738281,13.53178787,0.00000000,0.00000000,44.00000000);
   CreateObject(2060,2230.39746094,-2287.23168945,13.53178787,0.00000000,0.00000000,44.00000000);
   CreateObject(2060,2229.35400391,-2286.54858398,13.80724049,0.00000000,0.00000000,134.00000000);
   CreateObject(2060,2230.20898438,-2286.95312500,13.82723999,0.00000000,0.00000000,102.00000000);
   gryz1 = CreatePickup(1239, 23, 2137.8227539063,-2282.4379882813,20.671875, -1);
   gryz2 = CreatePickup(1239, 23, 2127.6430664063,-2275.4113769531,20.671875, -1);
   Create3DTextLabel("[Раздевалка]\nВстань на иконку чтобы надеть рабочую одежду",0x0000FFAA,2137.8227539063,-2282.4379882813,20.671875,40.0,0, 1);
   Create3DTextLabel("[Касса]\nВстань на иконку чтобы получить зарплату",0x0000FFAA,2127.6430664063,-2275.4113769531,20.671875,40.0,0, 1);
В public OnPlayerEnterCheckpoint(playerid)
PHP:
  else if(PlayerToPoint(2.0, playerid,2230.8132324219,-2285.7043457031,13.531787872314))
	  {
	  Meshok[playerid] = 1;
	  ApplyAnimation(playerid,"CARRY","crry_prtial",4.1,0,1,1,1,1);
	  SetPlayerAttachedObject(playerid, 2, 2060, 5, 0.01, 0.1, 0.2, 100, 10, 85);
    SetPlayerCheckpoint(playerid,2172.1313476563,-2255.2292480469,12.454199790955,2.0);
    }

   else if(PlayerToPoint(2.0, playerid,2172.1313476563,-2255.2292480469,12.454199790955))
	  {
	  Meshok[playerid] = 0;
	  ApplyAnimation(playerid,"PED","IDLE_tired",4.1,0,1,1,0,1);
	  Meshki[playerid]++;
	  if(IsPlayerAttachedObjectSlotUsed(playerid,2)) RemovePlayerAttachedObject(playerid,2);
	  format(string, sizeof(string), "Мешков перетащено {A52A2A}%d",Meshki[playerid]);
	  SendClientMessage(playerid, COLOR_SYSTEM, string);
    SetPlayerCheckpoint(playerid,2230.8132324219,-2285.7043457031,13.531787872314,2.0);
    }
В public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
PHP:
   	 if(dialogid == 103) // касса
    {
    new string[128];
    if(response){
    if(!PlayerInJob[playerid]){
    SendClientMessage(playerid, COLOR_RED, "Вы не на работе!");
    SendClientMessage(playerid, COLOR_RED, "Переоденьтесь для начала работы");
	return 1;
	}
    PlayerInJob[playerid] = 0;
	SetPlayerSkin(playerid, Oldskin2[playerid]);
    DisablePlayerCheckpoint(playerid);
    GivePlayerMoney(playerid, Meshki[playerid]*150);
    format(string, sizeof(string), "{FFFAFA}Вы получили {228B22}%d$ {FFFAFA}за {A52A2A}%d {FFFAFA}мешка(-ов)",Meshki[playerid]*150,Meshki[playerid]);
    SendClientMessage(playerid, COLOR_SYSTEM, string);
    Meshki[playerid] = 0;
	}
	return 1;
  }

     if(dialogid == 102) //раздевалка
    {
    if(response){
    if(PlayerInJob[playerid]){
    SendClientMessage(playerid, COLOR_RED, "Вы уже на работе");
    SendClientMessage(playerid, COLOR_RED, "Чтобы окончить работу, идите в кассу!");
	return 1;
	}
    PlayerInJob[playerid] = 1;
	Oldskin2[playerid] = GetPlayerSkin(playerid);
	SetPlayerSkin(playerid, 16);
	SetPlayerCheckpoint(playerid,2230.8132324219,-2285.7043457031,13.531787872314,2.0);
	SendClientMessage(playerid, COLOR_LIGHTBLUE, "На вашей карте отмечен чекпоинт");
	SendClientMessage(playerid, COLOR_LIGHTBLUE, "Идите к нему за мешком");
	}
	return 1;
  }
В public OnPlayerPickUpPickup(playerid, pickupid)
PHP:
if(pickupid == gryz1) {
    ShowPlayerDialog(playerid,102,DIALOG_STYLE_MSGBOX,"Раздевалка","Вы хотите переодеться для начала работы","Да","Нет");
	}

	if(pickupid == gryz2) {
    ShowPlayerDialog(playerid,103,DIALOG_STYLE_MSGBOX,"Касса","Вы хотите получить зарплату и уйти домой?","Да","Нет");
	}
 
Последнее редактирование:
Статус
В этой теме нельзя размещать новые ответы.
Сверху Снизу