Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //============================
- // Created by Edward Rose |
- //============================
- #include <a_samp>
- #define DGREEN "{004000}"
- #define GREY "{808080}"
- #define WHITE "{FFFFFF}"
- #define SC "{494EF5}"
- #define RED "{FF0000}"
- #define Edward "{B8B8B8}"
- #define Rose "{37F906}"
- #if !defined Loop
- #define Loop(%0,%1) for(new %0 = 0; %0 != %1; %0++)
- #endif
- #if !defined function
- #define function%0(%1) forward%0(%1); public%0(%1)
- #endif
- #if !defined TIME
- #define TIME 180000
- #endif
- new xCharacters[][] =
- {
- "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M",
- "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z",
- "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m",
- "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z",
- "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"
- },
- xChars[16] = "",
- xReactionTimer,
- xCash,
- xScore,
- bool: xTestBusy;
- public OnFilterScriptInit()
- {
- xReactionTimer = SetTimer("xReactionTest", TIME, 1);
- return 1;
- }
- public OnFilterScriptExit()
- {
- KillTimer(xReactionTimer);
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- switch(xTestBusy) {
- case true: {
- if(!strcmp(xChars, text, false)) {
- new string[256], pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pName, sizeof(pName));
- format(string, sizeof(string), "{FF0000}[REAKCIJA]:{FFFFFF} Igracot {B8B8B8}%s{FFFFFF} beshe najbrz, toj osvoi odreden broj na pari.", pName);
- SendClientMessageToAll(-1, string);
- format(string, sizeof(string), "{FFFFFF}[REAKCIJA]:{FF0000} Cestitki! Bese najbrz i osvoi{FFFFFF} %d$", xCash);
- SendClientMessage(playerid, -1, string);
- GivePlayerMoney(playerid, xCash);
- xReactionTimer = SetTimer("xReactionTest", TIME, 1);
- xTestBusy = false; } } }
- return 1; }
- function xReactionProgress() {
- switch(xTestBusy) {
- case true: {
- new string[128] ;
- format(string, sizeof(string), "{004000}[REAKCIJA]: Nikoj ne go napisa zborot kako sto treba!", (TIME/60000));
- SendClientMessageToAll(-1, string);
- xReactionTimer = SetTimer("xReactionTest", TIME, 1); } }
- return 1; }
- function xReactionTest() {
- new xLength = (random(8) + 2), string[256] ;
- xCash = (random(10000) + 20000);
- xScore = (random(2)+1);
- format(xChars, sizeof(xChars), "");
- Loop(x, xLength) format(xChars, sizeof(xChars), "%s%s", xChars, xCharacters[random(sizeof(xCharacters))][0]);
- format(string, sizeof(string), "{FFFFFF}[REAKCIJA]: Igrata zapocna! Koj prv ke napise {004000}%s{FFFFFF} osvojuva {FF0000}%d$", xChars, xCash);
- SendClientMessageToAll(-1, string);
- KillTimer(xReactionTimer);
- xTestBusy = true;
- SetTimer("xReactionProgress", 30000, 0);
- return 1; }
Add Comment
Please, Sign In to add comment