Fast Event - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Fast Event (
/showthread.php?tid=123061)
Fast Event -
DokerJr - 24.01.2010
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
Re: Fast Event -
Nero_3D - 24.01.2010
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 ?
Re: Fast Event -
Akkan - 25.01.2010
can you post a .pwn please? i have errors
Re: Fast Event -
On_Top_Non_Stop - 25.01.2010
Want this Reaction test?
Re: Fast Event -
Akkan - 27.01.2010
yes men...omg thank you very much !!!!
and one question...how i cand make a command admin with this ? like : /reaction aSHhjjsAydy 10000
Re: Fast Event -
On_Top_Non_Stop - 27.01.2010
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.
Re: Fast Event -
Akkan - 28.01.2010
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
Re: Fast Event -
WrathOfGenesis - 28.01.2010
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 )
Re: Fast Event -
Akkan - 28.01.2010
doesn`t work...i don`t know how
Re: Fast Event -
Akkan - 30.01.2010
i can`t make a command who don`t need rcon...help please