09.12.2015, 13:22
Hi guys,I Put Reaction Test On My GM And It Doesn't Work Even It's A True Answer Can You Help Me? I Think The Problem Is At OnPlayerText So This Is The Script
P/S:Sorry For Bad English
P/S:Sorry For Bad English
PHP код:
public OnPlayerText(playerid, text[])
{
if(Enable && text[0] && Answer == strval(text))
{
new string[218];
Enable = false;
format(string, sizeof(string),""Red"[MATH]%s[%d] "Blue"Answered The Right Answer Of Math Quiz | "Red"REWARD: +%d XP & $%d!", IsPlayerName(playerid), playerid, EXP, Cash);
SendClientMessageToAll(-1, string);
GivePlayerMoney(playerid, Cash);
SetPlayerScore(playerid, GetPlayerScore(playerid) + EXP);
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
return 0;
}
switch (TestBusy)
{
case true:
{
if(!strcmp(Chars, text, false))
{
new string[218];
format(string, sizeof(string), ""Red"[REACTION]%s[%d] "Blue"Has Won The Reaction Test | "Red"REWARD: +%d XP & $%d!", IsPlayerName(playerid), playerid, EXP, Cash);
SendClientMessageToAll(0xADFF2FFF, string);
GivePlayerMoney(playerid, Cash);
SetPlayerScore(playerid, GetPlayerScore(playerid) + EXP);
ReactionTimer = SetTimer("ReactionTest", 60000, 1);
TestBusy = false;
}
}
}
return 1;
}