Reaction Test with random letters BUG - 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)
+--- Thread: Reaction Test with random letters BUG (
/showthread.php?tid=546444)
Reaction Test with random letters BUG -
Stoyanov - 15.11.2014
My reaction test with random letters bugs. When the message show up that nobody won the test, and i type it, it says that i'm the winner. I don't know if someone understand it, but if u don't i'll post some pictures.
Some Code:
OnFilterScriptInit
Код:
xReactionTimer = SetTimer("xReactionTest", TIME, 1);
OnPlayerText
Код:
switch(xTestBusy)
{
case true:
{
if(!strcmp(xChars, text, false))
{
new
string[128],
pName[MAX_PLAYER_NAME]
;
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "{56ff00}%s won the test. %d$", pName, xCash);
SendClientMessageToAll(GREEN, string);
GivePlayerMoney(playerid, xCash);
xReactionTimer = SetTimer("xReactionTest", TIME, 1);
xTestBusy = false;
}
}
}
Function
Код:
function xReactionProgress()
{
switch(xTestBusy)
{
case true:
{
new
string[128]
;
format(string, sizeof(string), "No one won the test!");
SendClientMessageToAll(WHITE, string);
xReactionTimer = SetTimer("xReactionTest", TIME, 1);
}
}
return 1;
}
function xReactionTest()
{
new
xLength = (random(8) + 3),
string[128]
;
xCash = 8400;
format(xChars, sizeof(xChars), "");
Loop(x, xLength) format(xChars, sizeof(xChars), "%s%s", xChars, xCharacters[random(sizeof(xCharacters))][0]);
format(string, sizeof(string), "{ff00db}First who type {56ff00}%s {ff00db}wins {56ff00}%d$", xChars, xCash);
SendClientMessageToAll(YELLOW, string);
KillTimer(xReactionTimer);
xTestBusy = true;
SetTimer("xReactionProgress", 30000, 0);
return 1;
}
Re: Reaction Test with random letters BUG -
biker122 - 15.11.2014
Use mine? - Click me!
Re: Reaction Test with random letters BUG -
Stoyanov - 15.11.2014
Quote:
Originally Posted by biker122
|
Okay. I'll Test it.
Re: Reaction Test with random letters BUG -
Stoyanov - 15.11.2014
Your Reaction test doens't work.
Re: Reaction Test with random letters BUG -
FunnyBear - 15.11.2014
Try this,
https://sampforum.blast.hk/showthread.php?tid=150274
I use it and it works fine
Re: Reaction Test with random letters BUG -
Stoyanov - 15.11.2014
I've already tested it. It doesn't work.
Re: Reaction Test with random letters BUG -
FunnyBear - 15.11.2014
Quote:
Originally Posted by Stoyanov
I've already tested it. It doesn't work.
|
Did you add it to your filterscripts folder, then added it to the filterscripts line in your server.cfg file?
Re: Reaction Test with random letters BUG -
Stoyanov - 15.11.2014
Yes. I mean it bugs alot.