[FilterScript] [FS] KRace
#36

hey [HiC]TheKiller

can you help me quickly

i want to make a automaticly race stop after one minute if the first player finish the race i use this I use iht with a timer whish activeds the RaceEnd Public but it didnt work i pud the timer in the OnPlayerEnterRaceCheckpoint public


if(LastCP[playerid] == 1)
{
new TimeM, TimeS;
TimeS = RaceTime[playerid];
while(TimeS > 59)
{
TimeS = TimeS - 60;
TimeM ++;
}
DisablePlayerRaceCheckpoint(playerid);

RacePos ++;
new Str[150], Str2[150];
if(TimeM < 1)
{
format(Str, 100, "~g~Youll have finished the race!~n~~y~Position: %d Time:%d seconds", RacePos, TimeS);
format(Str2, 100, "You have finished the race! Position:%d Time:%d seconds", RacePos, TimeS);
}
if(TimeM > 0)
{
if(TimeS < 10)
{
format(Str, 100, "~g~Youaa have finished the race!~n~~y~Position: %d Time:%d:0%d", RacePos, TimeM, TimeS);
format(Str2, 100, "You have finished the race! Position: %d Time:%d:0%d", RacePos, TimeM, TimeS);
}
if(TimeS > 9)
{
format(Str, 100, "~g~Youee have finished the race!~n~~y~Position: %d Time:%d:%d", RacePos, TimeM, TimeS);
format(Str2, 100, "You have finished the race! Position: %d Time:%d:%d", RacePos, TimeM, TimeS);
}
}
SendClientMessage(playerid, 0x00D300AA, Str2);
GameTextForPlayer(playerid, Str, 3000, 3);
InRace[playerid] = 0;
LastCP[playerid] = 0;
RaceCPS[playerid] = -2;
new Yesss;
for(new i; i<MAX_PLAYERS; i++)
{
if(InRace[i] == 1) Yesss = 1;
}
if(Yesss == 0)
{
CurrentRace = -1;
KillTimer(Time53);
KillTimer(Racee);
SetTimerEx("RaceEnd",60000 , false, "ii", playerid);

}
SetVehicleVirtualWorld(GetPlayerVehicleID(playerid ), 0);
SetPlayerVirtualWorld(playerid, 0);
RaceTime[playerid] = 0;
}
if(RaceCPS[playerid] != 0 && RaceCPS[playerid] != RaceI[CurrentRace][CPNUM] -1)
{
SetPlayerRaceCheckpoint(playerid, 0, RaceI[CurrentRace][X][RaceCPS[playerid] + 1], RaceI[CurrentRace][Y][RaceCPS[playerid] + 1], RaceI[CurrentRace][Z][RaceCPS[playerid] + 1], RaceI[CurrentRace][X][RaceCPS[playerid]+ 2], RaceI[CurrentRace][Y][RaceCPS[playerid] +2], RaceI[CurrentRace][Z][RaceCPS[playerid]+2], ;
RaceCPS[playerid] ++;
}
if(RaceCPS[playerid] == 0)
{
GameTextForPlayer(playerid, "~y~Welcome to the race!~n~~r~Stay in the red checkpoint!", 3000, 3);

}
if(RaceCPS[playerid] == RaceI[CurrentRace][CPNUM]-1)
{
SetPlayerRaceCheckpoint(playerid, 1, RaceI[CurrentRace][X][RaceCPS[playerid]], RaceI[CurrentRace][Y][RaceCPS[playerid]], RaceI[CurrentRace][Z][RaceCPS[playerid]], RaceI[CurrentRace][X][RaceCPS[playerid]+ 1], RaceI[CurrentRace][Y][RaceCPS[playerid] +1], RaceI[CurrentRace][Z][RaceCPS[playerid]+1], ;
LastCP[playerid] = 1;
}

return 1;
}



SetTimerEx("RaceEnd",60000 , false, "ii", playerid);


is the timer
Reply


Messages In This Thread
[FS] KRace - by [HiC]TheKiller - 25.02.2010, 03:36
Re: [FS] KRace - by Jontay - 25.02.2010, 04:43
Re: [FS] KRace - by [HiC]TheKiller - 25.02.2010, 04:52
Re: [FS] KRace - by morris91 - 25.02.2010, 06:43
Re: [FS] KRace - by [HiC]TheKiller - 25.02.2010, 08:10
Re: [FS] KRace - by Jontay - 25.02.2010, 09:09
Re: [FS] KRace - by [03]Garsino - 25.02.2010, 10:17
Re: [FS] KRace - by »»»Hakam - 25.02.2010, 13:59
Re: [FS] KRace - by AiVAMAN - 25.02.2010, 14:32
Re: [FS] KRace - by [HiC]TheKiller - 25.02.2010, 17:54
Re: [FS] KRace - by DiddyBop - 26.02.2010, 10:06
Re: [FS] KRace - by [MWR]Blood - 19.03.2010, 14:06
Re: [FS] KRace - by GunFight - 19.03.2010, 14:25
Re: [FS] KRace - by Lorenc_ - 06.04.2010, 23:46
Re: [FS] KRace - by MrEnd - 07.04.2010, 11:12
Re: [FS] KRace - by Cardinaal - 15.04.2010, 13:52
Re: [FS] KRace - by Adil - 15.04.2010, 13:54
Re: [FS] KRace - by Cardinaal - 15.04.2010, 14:10
Re: [FS] KRace - by [MWR]Blood - 15.04.2010, 14:28
Re: [FS] KRace - by Cardinaal - 15.04.2010, 14:30
Re: [FS] KRace - by Haji - 15.04.2010, 17:09
Re: [FS] KRace - by [HiC]TheKiller - 23.04.2010, 05:19
Re: [FS] KRace - by Cardinaal - 23.04.2010, 05:40
Re: [FS] KRace - by [HiC]TheKiller - 23.04.2010, 12:13
Re: [FS] KRace - by Cardinaal - 23.04.2010, 14:41
Re: [FS] KRace - by GabryIIPazzo2 - 24.04.2010, 06:50
Re: [FS] KRace - by [CripZ]SERCH - 19.05.2010, 08:51
Re: [FS] KRace - by ViruZZzZ_ChiLLL - 19.05.2010, 09:04
Re: [FS] KRace - by [HiC]TheKiller - 19.05.2010, 10:38
Re: [FS] KRace - by vitalij931 - 19.05.2010, 10:51
Re: [FS] KRace - by Deat_Itself - 19.05.2010, 15:48
Re: [FS] KRace - by bRn - 19.05.2010, 20:30
Re: [FS] KRace - by Polpettina - 18.06.2010, 00:23
Re: [FS] KRace - by zSuYaNw - 18.06.2010, 00:43
Re: [FS] KRace - by Polpettina - 29.07.2010, 17:49
Re: [FS] KRace - by a-day - 27.12.2010, 21:28
Re: [FS] KRace - by jaksimaksi - 24.01.2011, 18:29
Re: [FS] KRace - by Davz*|*Criss - 21.08.2011, 08:42
Re: [FS] KRace - by Fnatic. - 27.06.2012, 17:49
Respuesta: [FS] KRace - by lvlaid - 15.09.2012, 09:57
Re: [FS] KRace - by karolis1478 - 18.12.2012, 09:21
Re: [FS] KRace - by karolis1478 - 20.12.2012, 17:20
Respuesta: [FS] KRace - by Mogudan2 - 25.02.2013, 15:14
Re: Respuesta: [FS] KRace - by karolis1478 - 25.02.2013, 19:17
Re: [FS] KRace - by Razer1 - 20.04.2013, 09:04
Re : [FS] KRace - by Sueep - 27.05.2015, 17:20

Forum Jump:


Users browsing this thread: 16 Guest(s)