I need help!
#1

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?
Reply
#2

You must save all best times in the race.

And then someting like this

if(playertime < besttime)
{
SendClinetMessage(...)
}

and then rewrite best time
Reply
#3

Oh really? I know that I need help with Saving Record time for players!
Reply
#4

I don't know, what is in your script / GM.

Do you have dini? Or something else..?
Reply
#5

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.
Reply
#6

AnyWay Thank you<! I've fix it .
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)