I need help! - 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)
+--- Thread: I need help! (
/showthread.php?tid=647336)
I need help! -
Thanks - 03.01.2018
I know I must created a code for you helping me guys BUT I really dont know how to create it!! Can you help me with it?
Race Record!: After player Finished Race Send him a message Like this: You have been finished race: Record: 00.312.43
How to I can do it?
Re: I need help! -
Baseball - 03.01.2018
You must save all best times in the race.
And then someting like this
if(playertime < besttime)
{
SendClinetMessage(...)
}
and then rewrite best time
Re: I need help! -
Thanks - 03.01.2018
Oh really? I know that I need help with Saving Record time for players!
Re: I need help! -
Baseball - 03.01.2018
I don't know, what is in your script / GM.
Do you have dini? Or something else..?
Re: I need help! -
RogueDrifter - 03.01.2018
use gettime in the beginning and end of the race, ex code: (EXAMPLE DONT COPY PASTE IT WONT MAGICALLY WORK):
PHP код:
new hour[MAX_PLAYERS],minute[MAX_PLAYERS],second[MAX_PLAYERS];
public OnRaceStart(playerid)//random
{
gettime(hour[playerid],minute[playerid],second[playerid]);
return 1;
}
public OnRaceEnd(playerid)
{
new hourx[MAX_PLAYERS],minutex[MAX_PLAYERS],secondx[MAX_PLAYERS],pname[26],string[80];
gettime(hourx[playerid],minutex[playerid],secondx[playerid]);
GetPlayerName(playerid,pname,sizeof(pname));
if(minutex[playerid] > minute[playerid] && secondx[playerid] => second[playerid]) format(string,sizeof(string),"Player %s finished the race in %d minute(s) and %d second(s) "pname,minutex[playerid]-minute[playerid],secondx[playerid]);
else format(string,sizeof(string),"Player %s finished the race in %d minute(s) and %d second(s) "pname,minute[playerid],secondx[playerid]-second[playerid]);
SendClientMessageToAll(-1,string);
return 1;
}
read that and comprehend the concept and apply it.
Re: I need help! -
Thanks - 03.01.2018
AnyWay Thank you<! I've fix it
.