Сис-ма полностью переведена на мод Cherbet'a.
Цитата
Ко всем #define добавляем:
Код
if(strcmp(cmd, "/safe", true) == 0){
new string5[500];
new gun = PlayerInfo[playerid][pSSd];
new gun1 = PlayerInfo[playerid][pSDeag];
new gun2 = PlayerInfo[playerid][pSShot];
new gun3 = PlayerInfo[playerid][pSSMG];
new gun4 = PlayerInfo[playerid][pSAK];
new gun5 = PlayerInfo[playerid][pSM4];
new gun6 = PlayerInfo[playerid][pSReaf];
new nark = PlayerInfo[playerid][pSNark];
new bouse = PlayerInfo[playerid][pPHousekey];
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername));
if (bouse != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPHousekey]][hOwner], true) == 0){
if(PlayerToPoint(20, playerid,HouseInfo[bouse][hExitx], HouseInfo[bouse][hExity], HouseInfo[bouse][hExitz])){
format(string5,sizeof(string5),"{bbbbbb}П{ffffff}оложить оружие\n{bbbbbb}П{ffffff}оложить наркотики\n{ffff1f}Оружие Патроны{FFFFFF}\nSdPistol %d\nDeagle %d\nShotGun %d\nSMG %d\nAK-\
47 %d\nM4 %d\nReafle %d\n{ffff1f}Наркотики %d",gun,gun1,gun2,gun3,gun4,gun5,gun6,nark);
ShowPlayerDialog(playerid,SEIF,DIALOG_STYLE_LIST,"Сейф",string5,"Выбрать","Назад");}
else return SendClientMessage(playerid, COLOR_WHITE, "{bbbbbb}В{ffffff}ы не у себя в доме");}
else return SendClientMessage(playerid, COLOR_WHITE, "{bbbbbb}В{ffffff}ы не владелец дома");
return true;}
Код
case SEIF:
{
if(!response) return 0;
switch(listitem)
{
case 0:
{
if(PlayerInfo[playerid][pSlot][2] == 24)
{
PlayerInfo[playerid][pSDeag] += PlayerInfo[playerid][pSlotammo][2];
PlayerInfo[playerid][pSlotammo][2] = 0;
PlayerInfo[playerid][pSlot][2] = 0;
}
if(PlayerInfo[playerid][pSlot][2] == 23)
{
PlayerInfo[playerid][pSSd] += PlayerInfo[playerid][pSlotammo][2];
PlayerInfo[playerid][pSlotammo][2] = 0;
PlayerInfo[playerid][pSlot][2] = 0;
}
PlayerInfo[playerid][pSShot] += PlayerInfo[playerid][pSlotammo][3];
PlayerInfo[playerid][pSlotammo][3] = 0;
PlayerInfo[playerid][pSlot][3] = 0;
PlayerInfo[playerid][pSReaf] += PlayerInfo[playerid][pSlotammo][6];
PlayerInfo[playerid][pSlotammo][6] = 0;
PlayerInfo[playerid][pSlot][6] = 0;
if(PlayerInfo[playerid][pSlot][5] == 30)
{
PlayerInfo[playerid][pSAK] += PlayerInfo[playerid][pSlotammo][5];
PlayerInfo[playerid][pSlotammo][5] = 0;
PlayerInfo[playerid][pSlot][5] = 0;
}
if(PlayerInfo[playerid][pSlot][5] == 31)
{
PlayerInfo[playerid][pSM4] += PlayerInfo[playerid][pSlotammo][5];
PlayerInfo[playerid][pSlotammo][5] = 0;
PlayerInfo[playerid][pSlot][5] = 0;
}
PlayerInfo[playerid][pSSMG] += PlayerInfo[playerid][pSlotammo][5];
PlayerInfo[playerid][pSlotammo][4] = 0;
PlayerInfo[playerid][pSlot][4] = 0;
ResetPlayerWeapons(playerid);
OnPlayerUpdateAc(playerid);
}
case 1:
{
PlayerInfo[playerid][pSNark] = PlayerInfo[playerid][pDrugs];
PlayerInfo[playerid][pDrugs] = 0;
OnPlayerUpdateAc(playerid);
}
case 3:
{
if(PlayerInfo[playerid][pSSd] >=100)
{
PlayerInfo[playerid][pSSd] -= 100;
gun = 23; ammo += 100;
}
if(PlayerInfo[playerid][pSSd] < 100)
{
gun = 23; ammo += PlayerInfo[playerid][pSSd];
PlayerInfo[playerid][pSSd] = 0;
}
OnPlayerUpdateAc(playerid);
}
case 4:
{
if(PlayerInfo[playerid][pSDeag] >=100)
{
PlayerInfo[playerid][pSDeag] -= 100;
gun = 24; ammo += 100;
}
if(PlayerInfo[playerid][pSDeag] < 100)
{
gun = 24; ammo += PlayerInfo[playerid][pSDeag];
PlayerInfo[playerid][pSDeag] = 0;
}
OnPlayerUpdateAc(playerid);
}
case 5:
{
if(PlayerInfo[playerid][pSShot] >=100)
{
PlayerInfo[playerid][pSShot] -= 100;
gun = 25; ammo += 100;
}
if(PlayerInfo[playerid][pSShot] < 100)
{
gun = 25; ammo += PlayerInfo[playerid][pSShot];
PlayerInfo[playerid][pSShot] = 0;
}
OnPlayerUpdateAc(playerid);
}
case 6:
{
if(PlayerInfo[playerid][pSSMG] >=100)
{
PlayerInfo[playerid][pSSMG] -= 100;
gun = 29; ammo += 100;
}
if(PlayerInfo[playerid][pSSMG] < 100)
{
gun = 29; ammo += PlayerInfo[playerid][pSSMG];
PlayerInfo[playerid][pSSMG] = 0;
}
OnPlayerUpdateAc(playerid);
}
case 7:
{
if(PlayerInfo[playerid][pSAK] >=100)
{
PlayerInfo[playerid][pSAK] -= 100;
gun = 30; ammo += 100;
}
if(PlayerInfo[playerid][pSAK] < 100)
{
gun = 30; ammo += PlayerInfo[playerid][pSAK];
PlayerInfo[playerid][pSAK] = 0;
}
OnPlayerUpdateAc(playerid);
}
case 8:
{
if(PlayerInfo[playerid][pSM4] >=100)
{
PlayerInfo[playerid][pSM4] -= 100;
gun = 31; ammo += 100;
}
if(PlayerInfo[playerid][pSM4] < 100)
{
gun = 31; ammo += PlayerInfo[playerid][pSM4];
PlayerInfo[playerid][pSM4] = 0;
}
OnPlayerUpdateAc(playerid);
}
case 9:
{
if(PlayerInfo[playerid][pSReaf] >=100)
{
PlayerInfo[playerid][pSReaf] -= 100;
gun = 33; ammo += 100;
}
if(PlayerInfo[playerid][pSReaf] < 100)
{
PlayerInfo[playerid][pSReaf] = 0;
gun = 33; ammo += PlayerInfo[playerid][pSReaf];
}
OnPlayerUpdateAc(playerid);
}
case 10:
{
if(PlayerInfo[playerid][pSNark] >=150)
{
PlayerInfo[playerid][pSNark] -= 150;
PlayerInfo[playerid][pDrugs] += 150;
}
if(PlayerInfo[playerid][pSNark] < 150)
{
PlayerInfo[playerid][pDrugs] += PlayerInfo[playerid][pSNark];
PlayerInfo[playerid][pSNark] = 0;
}
OnPlayerUpdateAc(playerid);
}
}
new playa;
GetWeaponName(gun, gunname, sizeof(gunname));
GiveWeapon(playa, gun, ammo);
OnPlayerUpdateAc(playerid);
return 1;
}
Код
pSSd,
pSDeag,
pSShot,
pSSMG,
pSAK,
pSM4,
pSReaf,
pSNark,