Szerző Téma: GTA5 bankrablás  (Megtekintve 4683 alkalommal)

GTA5 bankrablás
« Válasz #15 Dátum: 2015. augusztus 21. - 22:31:03 »
0 Show voters
Linket plíííz

ᗩωєѕσмє

  • Vendég
GTA5 bankrablás
« Válasz #16 Dátum: 2015. augusztus 21. - 22:42:18 »
0 Show voters
#include <a_samp>
#include <zcmd>
new bool:BankRobToggle;
#define COLOR_GREEN 0x33AA33AA
#define COLOR_GREY 0xAFAFAFAA
#define BankRobMoney 10000
stock pName(playerid)
{
new name[100];
GetPlayerName(playerid,name,sizeof(name));
return name;
}
public OnFilterScriptInit()
{
CreateMap();
BankRobToggle = false;
ConnectNPC(\"Bank_NPC\", \"bot\");
return 1;
}
forward CreateMap();
public CreateMap()
{
CreateObject(4571,2164.8999000,-518.7999900,433.2000100,0.0000000,0.0000000,0.0000000); //object(stolenbuilds09) (1)
CreateObject(2173,2183.3000000,-520.9000200,497.5000000,90.0000000,0.0000000,180.0000000); //object(med_office_desk_3) (2)
CreateObject(2173,2185.2000000,-520.9000200,497.5000000,90.0000000,0.0000000,179.9950000); //object(med_office_desk_3) (3)
CreateObject(2173,2187.1001000,-520.9000200,497.5000000,90.0000000,0.0000000,179.9950000); //object(med_office_desk_3) (4)
CreateObject(2173,2183.3000000,-520.5000000,497.2000100,0.0000000,0.0000000,180.0000000); //object(med_office_desk_3) (6)
CreateObject(2173,2185.2000000,-520.5000000,497.2000100,0.0000000,0.0000000,179.9950000); //object(med_office_desk_3) (7)
CreateObject(2173,2187.1001000,-520.5000000,497.2000100,0.0000000,0.0000000,179.9950000); //object(med_office_desk_3) (8)
CreateObject(2174,2187.1001000,-520.5999800,497.2000100,0.0000000,0.0000000,270.0000000); //object(med_office4_desk_2) (1)
CreateObject(2190,2185.8000000,-520.4000200,498.0000000,0.0000000,0.0000000,0.0000000); //object(pc_1) (1)
CreateObject(2190,2183.6001000,-520.4000200,498.0000000,0.0000000,0.0000000,0.0000000); //object(pc_1) (2)
CreateObject(2174,2184.8000000,-520.7000100,497.2000100,0.0000000,0.0000000,270.0000000); //object(med_office4_desk_2) (3)
CreateObject(2173,2187.3000000,-522.9000200,497.2000100,90.0000000,0.0000000,179.9950000); //object(med_office_desk_3) (9)
CreateObject(2173,2185.3999000,-522.9000200,497.2000100,90.0000000,0.0000000,179.9950000); //object(med_office_desk_3) (10)
CreateObject(2173,2183.5000000,-522.9000200,497.2000100,90.0000000,0.0000000,179.9950000); //object(med_office_desk_3) (11)
CreateObject(2174,2182.6001000,-520.5999800,497.2000100,0.0000000,0.0000000,270.0000000); //object(med_office4_desk_2) (4)
CreateObject(2173,2187.3000000,-522.9000200,498.0000000,90.0000000,0.0000000,179.9950000); //object(med_office_desk_3) (13)
CreateObject(2173,2187.3000000,-522.9000200,498.7999900,90.0000000,0.0000000,179.9950000); //object(med_office_desk_3) (14)
CreateObject(2173,2185.3999000,-522.9000200,498.0000000,90.0000000,0.0000000,179.9950000); //object(med_office_desk_3) (15)
CreateObject(2173,2185.3999000,-522.9000200,498.7999900,90.0000000,0.0000000,179.9950000); //object(med_office_desk_3) (16)
CreateObject(2173,2183.5000000,-522.9000200,498.0000000,90.0000000,0.0000000,179.9950000); //object(med_office_desk_3) (17)
CreateObject(2173,2183.5000000,-522.9000200,498.7999900,90.0000000,0.0000000,179.9950000); //object(med_office_desk_3) (18)
CreateObject(2173,2188.3999000,-520.5999800,498.8999900,90.0000000,0.0000000,269.9950000); //object(med_office_desk_3) (19)
CreateObject(2173,2182.3000000,-521.5999800,498.7999900,90.0000000,0.0000000,89.9890000); //object(med_office_desk_3) (20)
CreateObject(2173,2189.0000000,-520.9000200,497.5000000,90.0000000,0.0000000,179.9950000); //object(med_office_desk_3) (21)
CreateObject(2173,2189.1001000,-520.9000200,498.2999900,90.0000000,0.0000000,179.9950000); //object(med_office_desk_3) (22)
CreateObject(2173,2189.1001000,-520.9000200,499.1000100,90.0000000,0.0000000,179.9950000); //object(med_office_desk_3) (23)
CreateObject(2173,2182.6001000,-520.9000200,498.2999900,90.0000000,0.0000000,179.9950000); //object(med_office_desk_3) (24)
CreateObject(2173,2182.6001000,-520.9000200,499.1000100,90.0000000,0.0000000,179.9950000); //object(med_office_desk_3) (25)
CreateObject(16150,2185.5000000,-518.9000200,496.7000100,0.0000000,0.0000000,0.0000000); //object(ufo_barinterior) (1)
CreateObject(2173,2189.1001000,-520.9000200,499.8999900,90.0000000,0.0000000,179.9950000); //object(med_office_desk_3) (26)
CreateObject(2173,2188.3999000,-520.5999800,499.7000100,90.0000000,0.0000000,269.9890000); //object(med_office_desk_3) (27)
CreateObject(2173,2187.3000000,-522.9000200,499.6000100,90.0000000,0.0000000,179.9950000); //object(med_office_desk_3) (28)
CreateObject(2173,2185.3999000,-522.9000200,499.6000100,90.0000000,0.0000000,179.9950000); //object(med_office_desk_3) (29)
CreateObject(2173,2183.5000000,-522.9000200,499.6000100,90.0000000,0.0000000,179.9950000); //object(med_office_desk_3) (30)
CreateObject(2173,2182.3000000,-521.5999800,499.6000100,90.0000000,0.0000000,89.9890000); //object(med_office_desk_3) (31)
CreateObject(2173,2182.6001000,-520.9000200,499.8999900,90.0000000,0.0000000,179.9950000); //object(med_office_desk_3) (32)
CreateObject(1522,2184.5000000,-513.0000000,497.1000100,0.0000000,0.0000000,0.0000000); //object(gen_doorshop3) (1)
}
public OnPlayerSpawn(playerid)
{
if (IsPlayerNPC(playerid))
    {
        if ( !strcmp ( pName(playerid), \"Bank_NPC\", true ) )
    {
   SetPlayerSkin(playerid,194);
   return 1;
    }
}
return 1;
}
public OnPlayerUpdate(playerid)
{
if(!IsPlayerNPC(playerid))
{
    if(GetPlayerWeapon(playerid) <34 && GetPlayerWeapon(playerid) >21)
    {
    new target = GetPlayerTargetPlayer(playerid);
    if (BankRobToggle == false)
    {
        if(IsPlayerNPC(target))
        {
         if ( !strcmp ( pName(target), \"Bank_NPC\", true ) )
         {
                 ApplyAnimation(target,\"ped\",\"handsup\",4.1,0,1,1,1,1,1);
            BankRobToggle = true;
            new Float:x,Float:y,Float:z,string[280];
            GetPlayerPos(playerid,x,y,z);
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
               if (IsPlayerInRangeOfPoint(i,10.0,x,y,z))
               {
                  format(string,sizeof(string),\"%s kiabálja: Fegyveres rablás! Mindenki a földre!\",pName(playerid));
                  SendClientMessage(i,-1,string);
                  format(string,sizeof(string),\"%s kiabálja: Hé, Bankos! Pakold a pénzt kifelé!\",pName(playerid));
                  SendClientMessage(i,-1,string);
               }
            }
            SetTimerEx(\"BankRobStart\",1500,false,\"dd\",playerid,target);
         }
      }
   }
}
}
return 1;
}
forward BankRobStart(playerid,target);
public BankRobStart(playerid,target)
{
new Float:x,Float:y,Float:z;
    GetPlayerPos(target,x,y,z);
    if(IsPlayerNPC(target))
{
if ( !strcmp ( pName(target), \"Bank_NPC\", true ) )
{
    ApplyAnimation(target, \"BOMBER\", \"BOM_Plant\", 4.0, 1, 0, 0, 0, 0);
    SetTimerEx(\"BankRobReady\",15000,false,\"dd\",playerid,target);
   for(new i = 0; i < MAX_PLAYERS; i++)
   {
      if (IsPlayerInRangeOfPoint(i,8.0,x,y,z))
      {
         SendClientMessage(i,-1,\"Bankos hebegi: Odaadom a pénzt, csak egy...egy pillanat...\");
         SendClientMessage(i,COLOR_GREEN,\"*Bankos nekiállt kipakolni a pénzt a széfből.*\");
      }
   }
}
}
}
forward BankRobReady(playerid,targetid);
public BankRobReady(playerid,targetid)
{
    if(IsPlayerConnected(playerid))
    {
    if(IsPlayerConnected(targetid))
    {
    new Float:x,Float:y,Float:z;
    GetPlayerPos(playerid,x,y,z);
    ClearAnimations(targetid);
    GivePlayerMoney(playerid,BankRobMoney);
    BankRobToggle = false;
   for(new i = 0; i < MAX_PLAYERS; i++)
   {
      if (IsPlayerInRangeOfPoint(i,5.0,x,y,z))
      {
         SendClientMessage(i,-1,\"*A rabló leszedi a pultról a pénzt*\");
      }
      else if(IsPlayerInRangeOfPoint(i,8.0,x,y,z))
      {
         SendClientMessage(i,-1,\"*A rabló leszedi a pultról a pénzt*\");
      }
   }
}
}
}
CMD:bank(playerid,params[])
{
SetPlayerPos(playerid,2185.2363,-513.9238,498.2156);
SetPlayerInterior(playerid,1);
SendClientMessage(playerid,-1,\"Beléptél a bankba!\");
return 1;
}

GTA5 bankrablás
« Válasz #17 Dátum: 2015. augusztus 21. - 22:45:56 »
0 Show voters
Szeretlek <3 Amúgy köszi :D

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal