because im bored i got one for you here
PHP код:
new QuestionStarted;
PHP код:
new RandomQuestionMoney;
PHP код:
new MinQuestionMoney = 100;
new MaxQuestionMoney = 500;
forward SendQuestionForMoney();
PHP код:
SetTimer("SendQuestionForMoney", 900000, true);
PHP код:
public SendQuestionForMoney()
{
new string[128];
new qstring[32];
RandomQuestionMoney = MinQuestionMoney+random(MaxQuestionMoney-MinQuestionMoney);
format(qstring, sizeof(qstring), "%d%d%d%d%d%d%d%d", random(9), random(9), random(9), random(9), random(9), random(9), random(9), random(9));
strmid(Question, qstring, false, strlen(qstring), 32);
format(string, sizeof(string), "** First one to type %s will earn $%d,-!", qstring, RandomQuestionMoney);
SendClientMessageToAll(COLOR_ORANGE, string);
QuestionStarted = 1;
return 1;
}
PHP код:
public OnPlayerText(playerid, text[])
{
new string[ 128 ]
;
if(QuestionStarted == 1 && strfind(text[0], Question, false) == 0)
{
format(string, sizeof(string), "$$$ %s has answered the question the fastest, he won: $%d,-, 1 exp and 1 gram of drugs $$$", PlayerName[playerid], RandomQuestionMoney, Question);
SendClientMessageToAll(COLOR_GREEN, string);
GivePlayerMoney(playerid, RandomQuestionMoney);
PlayerInfo[playerid][pDrugs] ++;
PlayerInfo[playerid][pExp] ++;
QuestionStarted = 0;
return 0;
}
return 1;
}
PHP код:
CMD:question(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 1337 || IsPlayerAdmin(playerid))
{
SendQuestionForMoney();
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You are not allowed to use this command.");
}
return 1;
}
Reputation is welcome ! XD