Fast Event
#1

Hey guys

Help me with my gamemode

How to make 'fast event'

Example:
Who writes first hT62dbY6jd - will win $ 10,000

Thanks ~~

Sorry for my fucking english ! I am roumanian
Reply
#2

Here would be an explained example
pawn Код:
new EventText[(10 + 1)]; //10 is the size of the text + 1 for the EOS mark (you can write 11, too)
pawn Код:
//Where you want to start the event (often used in some timer)
for(new c = 1; c < sizeof EventText; c++) //fills the array with random letters or numbers
    EventText[c - 1] = ((random(2)) ? ((random(2)) ? ('a' + random(26)) : ('A' + random(26))) : ('0' + random(10)));
SendClientMessageToAll(0x0000FFAA, "***** Who types the word as fastest gets 10_000$:");
SendClientMessageToAll(0x0000FFAA, EventText);
pawn Код:
//OnPlayerText
if(EventText[0] != EOS) //checks if the first cell isnt the end of the string
    if(strcmp(text, EventText, false) == 0) //checks if the typed text match
    {
        SendClientMessage(playerid, 0xFFFFFFAA, "*** You were the fastest!");
        GivePlayerMoney(playerid, 10_000);
        EventText[0] = EOS; //sets the first cell to END OF STRING (mark it as empty)
    }
Offtopic: Did you made the avatar by yourself ?
Reply
#3

can you post a .pwn please? i have errors
Reply
#4

Want this Reaction test?
Reply
#5

yes men...omg thank you very much !!!!

and one question...how i cand make a command admin with this ? like : /reaction aSHhjjsAydy 10000
Reply
#6

Ok, re-download it.

I'v made a quick edit and you can use /RSet to set a reaction test. You MUST be RCON admin.
Reply
#7

thx very much man and last question can you make the command without need rcon ? i want for example admin level 3 or higher to use this command,who don`t need rcon.thanks
Reply
#8

Quote:

Sorry for my fucking english ! I am roumanian

excuse your french, too... lol




To link it to a variable such as Admin, replace IsPlayerAdmin to if ( Variable [ playerid ] >= val )
Reply
#9

doesn`t work...i don`t know how
Reply
#10

i can`t make a command who don`t need rcon...help please
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)