Need help and hope you understand. - 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: Need help and hope you understand. (
/showthread.php?tid=72062)
Need help and hope you understand. -
speedruntrainer - 05.04.2009
well, I need some help because im a noob at scripting. I know the wiki but it doesn't help me for what I need :/ I need help with the reactiontest script because I want to time it who has won.
it has to be like this: [player] has won the reactintest in [seconds.miliseconds] he/she won [amount] times before.
with my pawn code I only have this: [player] has won the reactiontest!
I make a reactiontest training server so I need it.
This is the whole pawn code with the timer added but it doesn't work because i need to add something or so. %d doesn't work, i tried that. well, can seomeone Help me? this is the code: (I have a warning about the timer)
Код:
//where you want to know time difference:
new time_diff = GetTickCount() - time_start;
GivePlayerMoney(playerid, 10000);
SetTimer("SetBack",30,0); // required delay, for some reason.
new reactionwinner[256];
reactionwinnerid = playerid;
new tempstring[256];
GetPlayerName(playerid,reactionwinner,sizeof(reactionwinner));
SendClientMessage(playerid,0x247C1BFF,"You have won the reactiontest!");
format(tempstring,sizeof(tempstring),"%s has won the reactiontest!",reactionwinner);
SendClientMessageToAll(0xFFFF00FF,tempstring);
reactiongap = SetTimer("ReactionTest",time1+random(time2),0); // sets the timer to restart ReactionTest()
return 1;
}
public SetBack()
{
reactioninprog = 1;
}
Re: Need help and hope you understand. -
speedruntrainer - 05.04.2009
Bump :O