SA-MP Forums Archive
Reaction Test dont tells the correct Response Time! - 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: Reaction Test dont tells the correct Response Time! (/showthread.php?tid=127347)



Reaction Test dont tells the correct Response Time! - [WSM]Deadly_Evil - 13.02.2010

When i won the reaction test after a long time it tells me that i done the reaction in 0.0 seconds ? Anybody know how to fix that?
Some of the Code of my Reaction Test:
Код:
new reactionstr[9];
new reactioninprog;
new rwinnerid;
new reactiongap;
new pResponseTime[MAX_PLAYERS];
public ReactionWin(playerid)
{
	GivePlayerMoney(playerid, 50000);
	SetPlayerScore(playerid, GetPlayerScore(playerid) +5);
	SetTimer("SetBack",30,0);
	new reactionwinner[256];
	rwinnerid = playerid;
	new tempstring[256];
	GetPlayerName(playerid,reactionwinner,sizeof(reactionwinner));
	format(tempstring, sizeof(tempstring), "%s(%d) has won the reaction test in %0.2f seconds", reactionwinner, playerid,pResponseTime[playerid]);
	SendClientMessageToAll(MARINE_BLUE, tempstring);
	reactiongap = SetTimer("ReactionTest",time1+random(time2),0);
}



Re: Reaction Test dont tells the correct Response Time! - mansonh - 13.02.2010

Код:
new reactionstr[9];
new reactioninprog;
new rwinnerid;
new reactiongap;
new Float:pResponseTime[MAX_PLAYERS];
public ReactionWin(playerid)
{
	GivePlayerMoney(playerid, 50000);
	SetPlayerScore(playerid, GetPlayerScore(playerid) +5);
	SetTimer("SetBack",30,0);
	new reactionwinner[256];
	rwinnerid = playerid;
	new tempstring[256];
	GetPlayerName(playerid,reactionwinner,sizeof(reactionwinner));
	format(tempstring, sizeof(tempstring), "%s(%d) has won the reaction test in %0.2f seconds", reactionwinner, playerid,pResponseTime[playerid]);
	SendClientMessageToAll(MARINE_BLUE, tempstring);
	reactiongap = SetTimer("ReactionTest",time1+random(time2),0);
}



Re: Reaction Test dont tells the correct Response Time! - [WSM]Deadly_Evil - 13.02.2010

Thanks i will test it...

AFTER TEST: Worked!


Re: Reaction Test dont tells the correct Response Time! - [AC]Flow - 18.06.2010

where bouts in gm i put that??


Re: Reaction Test dont tells the correct Response Time! - [SF]OutLawZ - 18.06.2010

well read mate OGS