Работа дровесека CRMP

Description: Всё что относится к Criminal Russia

Sprite M
Topic author, Сержант
Сержант
Avatar
Sprite M
Topic author, Сержант
Сержант
Reputation: 27
Posts: 71
Joined: 5 Jun 2013
With us: 6 years 2 months

#1by Sprite » 30 Jun 2014, 19:00

Работа дровесека CRMP .jpg
Работа дровесека CRMP .jpg (158.17 KiB) Viewed 2348 times


Работа дровесека CRMP 2.jpg
Работа дровесека CRMP 2.jpg (156.51 KiB) Viewed 2348 times


Работа дровесека CRMP 3.jpg
Работа дровесека CRMP 3.jpg (120.69 KiB) Viewed 2348 times


Работа дровесека CRMP 4.jpg
Работа дровесека CRMP 4.jpg (159.26 KiB) Viewed 2348 times


Работа дровесека CRMP 5.jpg
Работа дровесека CRMP 5.jpg (108.1 KiB) Viewed 2348 times


Ко всем new

Code: Select all

new francjobodej,francdrevlog;
new francdrev1,francdrev2,francdrev3;
new franclesorub[MAX_PLAYERS];
new francderevo[MAX_PLAYERS];
new francbrevnozp[MAX_PLAYERS];


В public OnPlayerPickUpPickup(playerid, pickupid) добавляем :

Code: Select all

if(pickupid == francjobodej)
{
         if(PlayerInfo[playerid][pMember] != 0 || PlayerInfo[playerid][pLeader] != 0) return true;
         if(franclesorub[playerid] == 0) ShowPlayerDialog(playerid,125,DIALOG_STYLE_MSGBOX,"Раздевалка лесорубов","Хотите начать?","Да","Нет");
         else ShowPlayerDialog(playerid,126,DIALOG_STYLE_MSGBOX,"Раздевалка лесорубов","Хотите завершить работу?","Да","Нет");
}
if(
pickupid == francdrev1)
{
         if(franclesorub[playerid] == 1)
         {
                 if(francderevo[playerid] == 0)
                 {
                         francderevo[playerid] = 1;
                         ApplyAnimation(playerid, "CARRY", "liftup", 4.0, 0, 0, 0, 1, 1);
                         SetTimerEx("ClearAnimText2", 1000, false, "d", playerid);
                         SetPlayerAttachedObject(playerid, 4, 1463, 1, 0.184699, 0.426247, 0.000000, 259.531341, 80.949592, 0.000000, 0.476124, 0.468181, 0.470769);
                         return true;
                 }
                 else
                 
{
                         SendClientMessage(playerid,COLOR_GREY,"У вас уже есть брёвна!");
                 }
         }
         else
         
{
                 SendClientMessage(playerid,COLOR_GREY,"Вы не можете взять брёвна, для начала работы переоденьтесь в одежду {00FFFF}лесоруба.");
         }
}
if(
pickupid == francdrev2)
{
         if(franclesorub[playerid] == 1)
         {
                 if(francderevo[playerid] == 0)
                 {
                         francderevo[playerid] = 1;
                         ApplyAnimation(playerid, "CARRY", "liftup", 4.0, 0, 0, 0, 1, 1);
                         SetTimerEx("ClearAnimText2", 1000, false, "d", playerid);
                         SetPlayerAttachedObject(playerid, 4, 1463, 1, 0.184699, 0.426247, 0.000000, 259.531341, 80.949592, 0.000000, 0.476124, 0.468181, 0.470769);
                         return true;
                 }
                 else
                 
{
                         SendClientMessage(playerid,COLOR_GREY,"У вас уже есть брёвна!");
                 }
         }
         else
         
{
                 SendClientMessage(playerid,COLOR_GREY,"Вы не можете взять брёвна, для начала работы переоденьтесь в одежду {00FFFF}лесоруба.");
         }
}
if(
pickupid == francdrev3)
{
         if(franclesorub[playerid] == 1)
         {
                 if(francderevo[playerid] == 0)
                 {
                         francderevo[playerid] = 1;
                         ApplyAnimation(playerid, "CARRY", "liftup", 4.0, 0, 0, 0, 1, 1);
                         SetTimerEx("ClearAnimText2", 1000, false, "d", playerid);
                         SetPlayerAttachedObject(playerid, 4, 1463, 1, 0.184699, 0.426247, 0.000000, 259.531341, 80.949592, 0.000000, 0.876124, 0.868181, 0.870769);
                         return true;
                 }
                 else
                 
{
                         SendClientMessage(playerid,COLOR_GREY,"У вас уже есть бревна!");
                 }
         }
         else
         
{
                 SendClientMessage(playerid,COLOR_GREY,"Вы не можете взять бревна, для начала работы переоденьтесь в одежду {00FFFF}лесоруба.");
         }
}
if(
pickupid == francdrevlog)
{
         if(francderevo[playerid] == 0)
         {
                 SendClientMessage(playerid,COLOR_GREY,"У вас нет брёвен!");
                 return true;
         }
         else
         
{
                 if(francderevo[playerid] == 1)
                 {
                         francderevo[playerid] = 0;
                         RemovePlayerAttachedObject(playerid, 4);
                         ApplyAnimation(playerid,"CARRY","putdwn",4.1,0,1,1,1,1);
                         SendClientMessage(playerid,COLOR_WHITE,"Вы принесли брёвна");
                         SetTimerEx("ClearAnimText", 1400, false, "d", playerid);
                         francbrevnozp[playerid]++;

}
                                 }
}


в public OnGameModeInit :

Code: Select all

francdrevlog = CreatePickup(3798,23,2736,-1621.80005,22.6);
francjobodej = CreatePickup(1275,23,2750.69995,-1585.30005,22.3);
francdrev1 = CreatePickup(19197,23,2751.8999,-1572.90002,20.9);
francdrev2 = CreatePickup(19197,23,2741.8999,-1563.30005,20.6);
francdrev3 = CreatePickup(19197,23,2725.30005,-1569.90002,22.4);


Теперь для начала и завершения работы добавляем в OnDialogResponse

Code: Select all

if(dialogid == 125)
         {
                 if(response)
                 {
                         SetPlayerSkin(playerid,16);
                         franclesorub[playerid] = 1;
                         SendClientMessage(playerid,COLOR_WHITE,"Вы начали рабочий день лесоруба. {A41C1C}Отправляйтесь за брёвнами!");
                         return true;
                 }
                 else
                 
{
                         return true;
                 }
         }
if(
dialogid == 126)
         {
                 if(response)
                 {
                         new strings[256];
new string[256];
                         new stri[256];
                         francderevo[playerid] = 0;
                         franclesorub[playerid] = 0;
                         RemovePlayerAttachedObject(playerid, 4);
                         ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.0, 0, 0, 0, 0, 1);
                         if(PlayerInfo[playerid][pMember] >= 1 || PlayerInfo[playerid][pLeader] >= 1)
                         {
                                 SetPlayerSkin(playerid,PlayerInfo[playerid][pChar]);
                         }
                         if(PlayerInfo[playerid][pMember] == 0 || PlayerInfo[playerid][pLeader] == 0)
                         {
                                 SetPlayerSkin(playerid,PlayerInfo[playerid][pChar]);
                         }
                         format(string, sizeof(string), "Вы закончили работу. Ваш заработок: {00FF00}$%d", francbrevnozp[playerid]*50);
                         SendClientMessage(playerid, COLOR_WHITE, string);
                         format(stri, sizeof(stri), "Вы принесли {A41C1C}%d{FFFFFF}свзок брёвен ",francbrevnozp[playerid]);
                         PlayerInfo[playerid][pCash] +=francbrevnozp[playerid]*50;
                         SendClientMessage(playerid, COLOR_WHITE, stri);
                         francbrevnozp[playerid] = 0;
                         GivePlayerMoney(playerid, 100);
                         format(strings, sizeof(strings), "~r~Pay", francbrevnozp[playerid]*50);
                         GameTextForPlayer(playerid,strings,3000,1);
                         return true;
                 }
                 else
                 
{
                 }
         }


Маппинг для лесоруба - склад и раздевалка.

Code: Select all

CreateObject(4214,2749.6001000,-1586.3000500,22.3000000,0.0000000,0.0000000,355.0000000); //object(lanitewin3_lan) (1)
CreateObject(9160,2743.8999000,-1622.0000000,22.5000000,0.0000000,0.0000000,184.9990000); //object(lodaseroad143) (1)      

! ! !


  • Similar Topics
    Replies
    Views
    Last post

Return to “CR:MP”