08.08.2012, 11:54
Hi guys,
I added a reaction test to my script and I added this function to my OnPlayerText:
When a person wins the reaction test, they can spam it over and over. How can I fix this problem ?
Kind regards,
Sean
I added a reaction test to my script and I added this function to my OnPlayerText:
pawn Код:
public OnPlayerText(playerid, text[])
{
if(strval(text) == ReactionAnswer && ReactionAnswer != -1)
{
OnPlayerWinReactionTest(playerid);
return 0;
}
if(PlayerInfo[playerid][pAdmin] && text[0] == '@')
{
new msg[128];
format(msg, sizeof(msg), "[Admin Chat]: %s [ID:%d]: %s", GetName(playerid), playerid, msg);
SendAdminMessage(COLOR_ADMCMDCOLOR, msg);
}
if(PlayerInfo[playerid][pVIP] && text[0] == '!')
{
new msg[128];
format(msg, sizeof(msg), "[VIP Chat]: %s [ID:%d]: %s", GetName(playerid), playerid, msg);
SendVIPMessage(COLOR_YELLOW, msg);
}
new txt[128];
format(txt, sizeof(txt), "[ID:%d]: %s", playerid, text);
SendPlayerMessageToAll(playerid, txt);
return 0;
}
Kind regards,
Sean