Код
#define COLOR_WHITE 0xFFFFFFAA
new pickup_Vstal;
new anticheat;
public OnGameModeInit()
{
pickup_Vstal = CreatePickup(1274, 2, 0.0, 0.0, 9.0);
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == pickup_Vstal)
{
ShowPlayerDialog(playerid,969,DIALOG_STYLE_MSGBOX,"Выбор","Хотите деееееенег?","Да","Нет");
}
return 1;
}
forward MoneyTime(playerid);
public MoneyTime(playerid)
{
new randmoney = 10 + random(140);
GivePlayerMoney(playerid, randmoney);
new string[32];
format(string,sizeof(string), "** Вы получили %d$ **",randmoney);
SendClientMessage(playerid, COLOR_WHITE, string);
KillTimer(timer1);
}
В паблик с диалогами:
Код
if(dialogid == 969)
{
if(response)
{
timer1 = SetTimerEx("MoneyTime",15000,0,"i",playerid);
return 1;
}
else
{
return 1;
}
}
Пробуй