h3r0
Умник
Добавил в PayDay такой код, но когда даётся зарплата этот код не работает, может я не туда его всунул?
PHP:
new ahour, aminute, asecond;
new ranlotto, Jackpot;
gettime(ahour, aminute, asecond);
if( aminute == 0 && asecond == 30)
{
OOCOff(COLOR_WHITE,"Через 1 минуты начнется лотерейная партия. Для покупки билета введите:{f5deb3} /lotto{FFFFFF}.");
}
if(aminute == 1 && asecond == 30)
{
ranlotto = 99-random(98);
new winner[MAX_PLAYER_NAME];
format(string, sizeof(string), "{f5deb3}Лотерея: Сегодня выигрышный номер %d.", ranlotto);
OOCOff(COLOR_WHITE, string);
for(new l=0; l < GetMaxPlayers(); l++)
{
if(!IsPlayerConnected(l)) continue;
if(PlayerInfo[l][pLottoNr] > 0)
{
if(PlayerInfo[l][pLottoNr] == ranlotto)
{
Jackpot = 35000-random(15000);
GiveMoney(l, Jackpot);
GetPlayerName(l, winner, sizeof(winner));
format(string, sizeof(string), "{f5deb3}Лотерея: %s выиграл ДжекПот $%d.", winner, Jackpot);
OOCOff(COLOR_WHITE, string);
format(string, sizeof(string), "Вы выиграли %d$ в лотерее.", Jackpot);
SendClientMessage(l, COLOR_YELLOW, string);
PlayerInfo[l][pLottoNr] = 0;
}
else
{
SendClientMessage(l, COLOR_LIGHTBLUE, "Вы не выйграли сейчас, повезет в следующий раз.");
PlayerInfo[l][pLottoNr] = 0;
}
}
}
}
