Sign in to follow this  
Followers 0
RASTAMAN

Система Ограбление банка

1 post in this topic

Соответственно координаты и объекты меняете на свои :D

Автор - Витёк.

Спойлер

new bool:bank = false, banks[5][MAX_PLAYERS], picbank, bomba[3], dver[2];

 

Спойлер

dver[0] = CreateObject(2634, 2144.174316,1626.977172,994.257751, 0.000000,0.000000,179.399810);
picbank = CreatePickup(1550,23,X,Y,Z);// за место X.Y.Z ставим свои кординаты для ограбления

 

Спойлер

CreateObject(1533, 2129.691894,1625.005371,992.568298, 0.000000,0.000000,93.900024);

 

Спойлер

if(pickupid == picbank)
{
        if(bank == true) return SendClientMessage(playerid, COLOR_GREY, "[Ошибка] Банк уже ограбили!Повторно можно ограбить токо через 1час!");
        {
                bank = true;
                SendClientMessage(playerid, 0xFFFF00FF, "Отключите питание!");
                DisablePlayerCheckpoint(playerid);
                banks[0][playerid] = 1;
                SetPlayerCheckpoint(playerid,2142.9873,1619.9999,1000.9688, 5.0);
                SetPlayerPos(playerid,2148.2375,1597.6710,1003.9677);
                SetPlayerInterior(playerid,1);
        }
}

 

Спойлер

if(banks[0][playerid] == 1)
{
        DisablePlayerCheckpoint(playerid);
        banks[0][playerid] = 0;
        banks[1][playerid] = 1;
        SendClientMessage(playerid,0xFFFF00FF, "Вы успешно отключили питание!");
        SendClientMessage(playerid,0xFFFF00FF, "Идите установите бомбу!");
        SetPlayerCheckpoint(playerid,2144.1279,1625.8286,993.6882, 1.5);
        return 1;
}
if(banks[1][playerid] == 1)
{
        DisablePlayerCheckpoint(playerid);
        banks[1][playerid] = 0;
        banks[2][playerid] = 1;
        bomba[0] = CreateObject(1654, 2145.255859,1626.748168,995.377868, 0.000000,0.000000,0.000000);
        bomba[1] = CreateObject(1654, 2145.247558,1626.801025,994.208007, 0.000000,0.000000,0.000000);
        bomba[2] = CreateObject(1654, 2145.257812,1626.761962,993.158142, 0.000000,0.000000,0.00000);
        SelectObject(bomba[0]);
        SelectObject(bomba[1]);
        SelectObject(bomba[2]);
        SendClientMessage(playerid,0xFFFF00FF, "Вы установили бомбы на петли от бегите на безопасное растояние!");
        SetPlayerCheckpoint(playerid,2144.1572,1597.6097,995.5676, 1.5);
        return 1;
}
if(banks[2][playerid] == 1)
{
        DisablePlayerCheckpoint(playerid);
        banks[2][playerid] = 0;
        banks[3][playerid] = 1;
        DestroyObject(bomba[0]);
        DestroyObject(bomba[1]);
        DestroyObject(bomba[2]);
        DestroyObject(dver[0]);
        CreateExplosion(2144.1279,1625.8286,993.6882,2,5.0);
        dver[1] = CreateObject(2634, 2144.139892,1628.926513,992.669738, 90.899986,0.000000,178.599990);
        SelectObject(dver[1]);
        SendClientMessage(playerid,0xFFFF00FF, "Вы взорвали бомбы! Быстрей бегите забирать деньги!");
        SetPlayerCheckpoint(playerid,2146.3982,1637.4023,993.5761, 1.5);
        return 1;
}
if(banks[3][playerid] == 1)
{
        DisablePlayerCheckpoint(playerid);
        banks[3][playerid] = 0;
        banks[4][playerid] = 1;
        GivePlayerMoney(playerid, random(100000 - 500000));
        SendClientMessage(playerid,0xFFFF00FF, "Вы успешно ограбили банк!");
        SendClientMessage(playerid,0xFFFF00FF, "Вам пора сваливать!");
        SetPlayerCheckpoint(playerid,2131.2402,1625.6312,993.6882, 1.5);
        return 1;
}
if(banks[4][playerid] == 1)
{
        DisablePlayerCheckpoint(playerid);
        banks[4][playerid] = 0;
        SendClientMessage(playerid,0xFFFF00FF, "Вы успешно убежали с банка!");
        SetPlayerInterior(playerid,0);
        SetPlayerPos(playerid,X,Y,Z);// за место X,Y,Z ставим свои кординаты где хотим спавнить его после ограбление
        return 1;
}

 

Спойлер

bank = false;

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • fresko241
      By fresko241
      Привет, я только обучаюсь разработке. Хочу узнать у меня есть радио, музыка играет. Но как можно сделать чтобы музыка играла только в машине и слышна была и людям которые возле нее.