Kazuki
Ученик
1-н нарко притон это чушь! * )) нужно в СФ и еще один в ЛВ толкнуть в казино, а я не в курсе как его вообще сделать из одного два xD
+сик с меня гарантирован!* заранее спасибо!
PHP:
if(strcmp(cmd,"/buydrugs",true)==0)// Сахарок
{
if(IsPlayerConnected(playerid))
{
if (!IsAGang(playerid)) return SendClientMessage(playerid,COLOR_GRAD1,"Вы не бандит!");
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, " Введите: /buydrugs [количество]");
if(PlayerToPoint(3.0,playerid,322.1280,1118.8314,1083.8828))
{
if(PlayerInfo[playerid][pCash] < 100) return SendClientMessage(playerid,COLOR_GRAD1,"У вас недостаточно денег");
new ammo;
ammo = strval(tmp);
if(PlayerInfo[playerid][pVak] >= 100) { SendClientMessage(playerid, COLOR_GREY, "Нельзя купить больше"); return 1; }
if(ammo > 100 || ammo < 1) { SendClientMessage(playerid, COLOR_GREY, "Нельзя меньше 1 или больше 100!"); return 1; }
if(PlayerInfo[playerid][pCash] < ammo) { SendClientMessage(playerid, COLOR_GREY, "У вас нет столько денег!"); return 1; }
PlayerInfo[playerid][pCash] -=ammo*35;
PlayerInfo[playerid][pVak] += ammo;
format(string, sizeof(string), "Вы купили %d грамм сахара за %d зелени", ammo,ammo*35);
SendClientMessage(playerid, 0x6495EDFF, string);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Вы не в притоне!");
return 1;
}
}
return 1;
}
Последнее редактирование:
