Меню сайта
Мини-чат
500
Статистика

Онлайн всего: 2
Гостей: 2
Пользователей: 0
Форма входа
Главная » 2016 » Апрель » 2 »
19:07:35
Помогите как отключить здесь отключение других команд?
*/
#include <a_samp>
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_GREEN 0xFFFF00AA
#define COLOR_YELLOW 0xC2A2DAAA
new bomb[MAX_PLAYERS];
new object[MAX_PLAYERS];
new vaultdoor;
new start[MAX_PLAYERS];
new dim[MAX_PLAYERS];
new BankRobbed[MAX_PLAYERS];
new BankProbel;
new Rcr;
new Stopenrob[MAX_PLAYERS];
//bank
new Lom[MAX_PLAYERS];
new bank;
new banks;
enum pInfo
{
pMember,
pLeader,
pWanted,
};
new PlayerInfo[MAX_PLAYERS][pInfo];
forward dimstart(playerid);

public OnFilterScriptInit()
{
banks = CreatePickup(1318,2,2142.9326,1619.9785,1000.9688, -1); //object(arrow) (1)
bank = CreatePickup(1318,2,2315.6062,-0.4825,26.7422, -1); //object(arrow) (1) // in bank
// bank
CreateObject(8957,2146.1999500,1595.9000200,1005.2000100,0.0000000,0.0000000,0.0000000); //object(vgsespdr01) (1)
CreateObject(2970,2146.1001000,1598.0999800,1003.0000000,0.0000000,0.0000000,0.0000000); //object(dts_bbdoor) (1)
CreateObject(2963,2150.1999500,1602.3000500,1003.0000000,0.0000000,0.0000000,0.0000000); //object(freezer_door) (1)
//CreateObject(2634,2147.6001000,1595.9000200,1004.0999800,0.0000000,0.0000000,0.0000000); //object(ab_vaultdoor) (1)
vaultdoor = CreateObject(2634,2144.1999500,1626.9997600,994.2500000,0.0000000,0.0000000,182.0000000);
return 1;
}

public OnFilterScriptExit()
{

return 1;
}

public OnPlayerConnect(playerid)
{
SetPVarInt(playerid, "PType", 0);
SetPVarInt(playerid, "PColor", 0);
bomb[playerid] = 0;
return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/lom", true) == 0)
{
Lom[playerid] = 1;
SendClientMessage(playerid, 0xFF8000AA, "Вы взяли лом");
}
if(strcmp(cmdtext, "/forbomb", true) == 0)
{
bomb[playerid] = 2;
SetPVarInt(playerid, "pType", 4);
SendClientMessage(playerid, 0xFF8000AA, "Вы взяли бомбу");
}
if(strcmp(cmdtext, "/putbomb", true) == 0)
{
if(bomb[playerid] < 1) return SendClientMessage(playerid, 0xFF8000AA, "У Вас нет бомбы");
if(start[playerid] != 0) return SendClientMessage(playerid, 0xFF8000AA, "Подождите, пожалуйста...");
SendClientMessage(playerid, 0xFF8000AA, "{62B81F}Вы установили бомбу у вас 7 секунд что-бы отбежать");
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 2, 0, 0, 0, 0, 0);
new Float:x, Float:y, Float:z, Float:angle;
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, angle);
x += floatsin(-angle, degrees);
y += floatcos(-angle, degrees);
bomb[playerid] --; start[playerid] = 1;
switch(GetPVarInt(playerid, "pType"))
{
case 4:
{
object[playerid] = CreateObject(1654, x, y, z-0.5, 0, 0, 0);
SetTimerEx("startonee",6000,0,"d",playerid);
}
}
return 1;
}
if(strcmp(cmdtext, "/robbank", true) == 0)
{
if(BankProbel == 0)
{
BankProbel = 1;
if(BankRobbed[playerid] == 0)
{
if(PlayerToPoint(10.0, playerid,2141.5652,1637.5085,993.5761))
{
if(Lom[playerid] == 1)
{
if(PlayerInfo[playerid][pMember]==1||PlayerInfo[playerid][pLeader]==1||PlayerInfo[playerid][pMember]==2||PlayerInfo[playerid][pLeader]==2||PlayerInfo[playerid][pMember]==3||PlayerInfo[playerid][pLeader]==3||PlayerInfo[playerid][pMember]==3||PlayerInfo[playerid][pLeader]==3||PlayerInfo[playerid][pMember]==4||PlayerInfo[playerid][pLeader]==4||PlayerInfo[playerid][pMember]==7||PlayerInfo[playerid][pLeader]==7||PlayerInfo[playerid][pMember]==11||PlayerInfo[playerid][pLeader]==11)
{
SendClientMessage(playerid, COLOR_WHITE, "{3965D5} Cовсеть не позволяет вам совершить преступрение! !");
BankProbel = 0;
return 1;
}
if(PlayerInfo[playerid][pMember]==0&&PlayerInfo[playerid][pLeader]==0)
{
SendClientMessage(playerid, COLOR_WHITE, "{3965D5}Грабить могут только банды!");
BankProbel = 0;
return 1;
}
if(IsACop(playerid) < 2)
{
SendClientMessage(playerid, COLOR_WHITE, "{3965D5}Запрещенно грабить если на сервере меньше двух законников!!!");
BankProbel = 0;
return 1;
}
//SetTimer("StopGrab",10000,false);
SetTimerEx("StopGrab",2000,0,"d",playerid);
ApplyAnimation(playerid,"ROB_BANK","CAT_Safe_Rob",4.1,1,1,1,1,1);
TogglePlayerControllable(playerid,0);
Stopenrob[playerid] = 1;
if(Rcr == 0)
{
Rcr = 1;
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "{3965D5} Банк уже грабят!!!");
BankProbel = 0;
}
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "{3965D5} Вы не можите ломать банк руками, вам нужен лом !");
BankProbel = 0;
}
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "{3965D5} Вы не в банке!");
BankProbel = 0;
}
}
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "{3965D5} Вы не можите грабить банк так часто, подождите часок !");
BankProbel = 0;
}
}
return 1;
}
stock PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
if(IsPlayerConnected(playerid))
{
if (IsPlayerInRangeOfPoint(playerid, radi, x, y, z))
{
return 1;
}
}
return 0;
}
forward startonboom(playerid);
public startonboom(playerid)
{
new Float:oobjx, Float:oobjy, Float:oobjz;
new Float:ooobjx, Float:ooobjy, Float:ooobjz;
if(PlayerToPoint(20.0,playerid,2144.3025,1626.1572,993.6882))
{
GetObjectPos(vaultdoor, ooobjx, ooobjy, ooobjz);
CreateExplosion(ooobjx, ooobjy, ooobjz, 0, 5);
CreateExplosion(ooobjx, ooobjy, ooobjz, 0, 5);
DestroyObject(object[playerid]);
DestroyObject(vaultdoor);
DestroyObject(dim[playerid]);
SendClientMessage(playerid, COLOR_YELLOW, "Вы взорвали двери от хранилища банка");
SetTimerEx("vaultdoors",300000,0,"d",playerid);
}
GetObjectPos(object[playerid], oobjx, oobjy, oobjz);
CreateExplosion(oobjx, oobjy, oobjz, 0, 5);
DestroyObject(object[playerid]);
DestroyObject(dim[playerid]);
SendClientMessage(playerid, COLOR_YELLOW, "Бомба взорвалась");
start[playerid] = 0;
}
forward IsACop(playerid);
public IsACop(playerid)
{
if(IsPlayerConnected(playerid))
{
new leader = PlayerInfo[playerid][pLeader];
new member = PlayerInfo[playerid][pMember];
if(member==1||member==2||member==3)
{
return 1;
}
else if(leader==1||leader==2||leader==3)
{
return 1;
}
}
return 0;
}
forward vaultdoors(playerid);
public vaultdoors(playerid)
{
vaultdoor = CreateObject(2634,2144.1999500,1626.9997600,994.2500000,0.0000000,0.0000000,182.0000000);
}
public dimstart(playerid)
{
new Float:dimx, Float:dimy, Float:dimz;
GetObjectPos(object[playerid], dimx, dimy, dimz);
DestroyObject(object[playerid]);
object[playerid] = CreateObject(18715, dimx, dimy, dimz+2, 0, 0, 0);
SetTimerEx("destroyFlare",500,0,"d",playerid);
new Float:X, Float:Y, Float:Z; GetObjectPos(object[playerid], X, Y, Z);
PlaySoundForPlayersInRange(1141, 20.0, X, Y, Z);
}

stock PlaySoundForPlayersInRange(soundid, Float:range, Float:x, Float:y, Float:z)
{
for(new i; i < GetMaxPlayers(); i++)
{
if(!IsPlayerConnected(i) || !IsPlayerInRangeOfPoint(i,range,x,y,z)) continue;
PlayerPlaySound(i, soundid, x, y, z);
}
}
forward startonee(playerid);
public startonee(playerid)
{
new Float:objx, Float:objy, Float:objz;
GetObjectPos(object[playerid], objx, objy, objz);
dim[playerid] = CreateObject(18715, objx, objy, objz, 0, 0, 0);
AttachObjectToObject(dim[playerid],object[playerid],0,0,0,0,0,0,0);
SetTimerEx("startonboom",1200,0,"d",playerid);
}

public OnPlayerEnterCheckpoint(playerid)
{
return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == bank)
{
SetPlayerPos(playerid, 2143.8999000,1599.0999800,1003.7000100);
SetPlayerInterior(playerid, 1);
GameTextForPlayer(playerid, "~r~bank ~g~storage", 5000, 1);
SendClientMessage(playerid, COLOR_GREEN, "Вы внутри хранилища банка , осторожно вас может заметить сигнализация");
}
else if(pickupid == banks)
{
SetPlayerPos(playerid, 1427.5527,-966.8517,37.4224);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid,0);
}
return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
return 1;
}

public OnPlayerSpawn(playerid) ApplyAnimation(playerid, "BOMBER", "null",0.0,0,0,0,0,0);
Просмотров: 101 | Добавил: danyasorokin2012 | Рейтинг: 0.0/0
Всего комментариев: 0
Добавлять комментарии могут только зарегистрированные пользователи.
[ Регистрация | Вход ]
Поиск
Календарь
«  Апрель 2016  »
ПнВтСрЧтПтСбВс
    123
45678910
11121314151617
18192021222324
252627282930
Архив записей
Друзья сайта
  • Официальный блог
  • Сообщество uCoz
  • FAQ по системе
  • Инструкции для uCoz
  • Вверх
    12:21:00
    ОбновитьСмайлыУправление мини-чатом
    ЧАТ-PAWNO
    2010-2018

    vkontakte :samp-pawno.ru: