20.05.2010, 16:39
hello, today i implented reaction test into my gamemode but it brought some problems to me with on playertext
i alreaddy had a script so when a player talks the id gets behind his name,but now it works when i restart the server but after the first reaction string comes up u can talk annymore for some reason
this is my script;
i alreaddy had a script so when a player talks the id gets behind his name,but now it works when i restart the server but after the first reaction string comes up u can talk annymore for some reason
this is my script;
Код:
public OnPlayerText(playerid, text[])
{
if(!IsPlayerConnected(playerid)) {
new textstring[128];
format(textstring, sizeof(textstring), "[%i] %s", playerid, text);
SendPlayerMessageToAll(playerid, textstring);
}
else if(!strcmp(text, reactionstr, false))
{
KillTimer(stopper2);
if(reactioninprog == 2) ReactionWin(playerid);
if(reactioninprog == 1)
{
if(reactionwinnerid == playerid)
{
SendClientMessage(playerid,0x247C1BFF,"You've already won!");
}
else
{
SendClientMessage(playerid,0x247C1BFF,"You are too slow!");
}
}
else
{
return 1;
}
}
return 0;
}

