SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 04/09/2012, 12:10 PM   #11
Luis-
High-roller
 
Luis-'s Avatar
 
Join Date: Jan 2010
Location: England
Posts: 2,653
Reputation: 185
Default Re: Race System

Bump.
__________________

GAMINGFREAK
YouTube | Twitter | Facebook
----------------------------------

Github Profile | City Life Role Play
Luis- is offline   Reply With Quote
Old 04/09/2012, 04:59 PM   #12
Luis-
High-roller
 
Luis-'s Avatar
 
Join Date: Jan 2010
Location: England
Posts: 2,653
Reputation: 185
Default Re: Race System

Can someone help me with this, it's urgent.
__________________

GAMINGFREAK
YouTube | Twitter | Facebook
----------------------------------

Github Profile | City Life Role Play
Luis- is offline   Reply With Quote
Old 04/09/2012, 11:23 PM   #13
Luis-
High-roller
 
Luis-'s Avatar
 
Join Date: Jan 2010
Location: England
Posts: 2,653
Reputation: 185
Default Re: Race System

Anyone?
__________________

GAMINGFREAK
YouTube | Twitter | Facebook
----------------------------------

Github Profile | City Life Role Play
Luis- is offline   Reply With Quote
Old 04/09/2012, 11:29 PM   #14
DonWade
Huge Clucker
 
DonWade's Avatar
 
Join Date: Nov 2011
Location: Bosna i Hercegovina || ZENICA 032 ||
Posts: 204
Reputation: 17
Default Re: Race System

Check out for some race systems , and take a look at it.
__________________
DonWade is offline   Reply With Quote
Old 05/09/2012, 09:26 AM   #15
Luis-
High-roller
 
Luis-'s Avatar
 
Join Date: Jan 2010
Location: England
Posts: 2,653
Reputation: 185
Default Re: Race System

I already have.
__________________

GAMINGFREAK
YouTube | Twitter | Facebook
----------------------------------

Github Profile | City Life Role Play
Luis- is offline   Reply With Quote
Old 05/09/2012, 06:50 PM   #16
Luis-
High-roller
 
Luis-'s Avatar
 
Join Date: Jan 2010
Location: England
Posts: 2,653
Reputation: 185
Default Re: Race System

I really need this being fixed.
__________________

GAMINGFREAK
YouTube | Twitter | Facebook
----------------------------------

Github Profile | City Life Role Play
Luis- is offline   Reply With Quote
Old 06/09/2012, 10:12 AM   #17
Luis-
High-roller
 
Luis-'s Avatar
 
Join Date: Jan 2010
Location: England
Posts: 2,653
Reputation: 185
Default Re: Race System

Bump
__________________

GAMINGFREAK
YouTube | Twitter | Facebook
----------------------------------

Github Profile | City Life Role Play
Luis- is offline   Reply With Quote
Old 06/09/2012, 11:30 PM   #18
Luis-
High-roller
 
Luis-'s Avatar
 
Join Date: Jan 2010
Location: England
Posts: 2,653
Reputation: 185
Default Re: Race System

It appears that the last checkpoint isn't showing. How can I make it show as the finishing checkpoint? I've tried but it failed. Thanks.
__________________

GAMINGFREAK
YouTube | Twitter | Facebook
----------------------------------

Github Profile | City Life Role Play
Luis- is offline   Reply With Quote
Old 06/09/2012, 11:46 PM   #19
Jefff
High-roller
 
Join Date: Dec 2007
Posts: 1,597
Reputation: 112
Default Re: Race System

I would suggest you do something like that

pawn Code:
new RaceCPID[MAX_RACE_CHECKPOINTS];

start race

pawn Code:
for(new d; d < ChosenRace_TotalCP; d++)
{
    if(d != ChosenRace_TotalCP-1)
        RaceCPID[d] = CreateDynamicRaceCP(OtherRaceInfo[ChosenRace][MarkerType], AroundTheCountry[d][X], AroundTheCountry[d][Y], AroundTheCountry[d][Z], AroundTheCountry[d][X], AroundTheCountry[d][Y], AroundTheCountry[d][Z], OtherRaceInfo[ChosenRace][CheckpointSize], -1, -1, -1, 500.0);
    else
        RaceCPID[d] = CreateDynamicRaceCP(OtherRaceInfo[ChosenRace][MarkerType], AroundTheCountry[d][X], AroundTheCountry[d][Y], AroundTheCountry[d][Z],0,0,0,OtherRaceInfo[ChosenRace][CheckpointSize], -1, -1, -1, 500.0);
}

for(new d; d < ChosenRace_Players; d++)
{
    TogglePlayerAllDynamicRaceCPs(racerid[d],0);
    TogglePlayerDynamicRaceCP(racerid[d],RaceCPID[0],1);
    PlayerCheckpoint[racerid[d]] = 0;
}


pawn Code:
bool:race_OPEDRCP(playerid,checkpointid)
{
    if(!IsPlayerInRace(playerid)) return false;

    for(new d = PlayerCheckpoint[playerid]; d < ChosenRace_TotalCP; d++)
        if(RaceCPID[d] == checkpointid)
        {
            PlayerCheckpoint[playerid] = d;
            if((d+1) == ChosenRace_TotalCP)
            {
                for(new i=0; i < ChosenRace_TotalCP; i++)
                {
                    if(IsValidDynamicRaceCP(RaceCPID[i]))
                        DestroyDynamicRaceCP(RaceCPID[i]);
                }
                return true;
            }
            TogglePlayerDynamicRaceCP(playerid, checkpointid, 0);
            TogglePlayerDynamicRaceCP(playerid, RaceCPID[d+1], 1);
            return true;
        }

    return false;
}

public OnPlayerEnterDynamicRaceCP(playerid, checkpointid)
{

    if(IsRaceOn == true && race_OPEDRCP(playerid,checkpointid)) return 1;

    return 0;
}
Jefff is offline   Reply With Quote
Old 07/09/2012, 03:32 PM   #20
Luis-
High-roller
 
Luis-'s Avatar
 
Join Date: Jan 2010
Location: England
Posts: 2,653
Reputation: 185
Default Re: Race System

Is there anything faster than that? The checkpoints are loading pretty slow.
__________________

GAMINGFREAK
YouTube | Twitter | Facebook
----------------------------------

Github Profile | City Life Role Play
Luis- is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Race system P<3TS Server Support 0 04/08/2012 04:10 PM
Looking for Race System. petrolhead General 6 18/03/2012 07:15 AM
Race system wumpyc Scripting Help 6 26/10/2011 02:19 PM
Race system AzTeCaS Help Archive 4 03/12/2010 05:08 PM
about race system xExpressx Help Archive 1 20/10/2010 05:28 AM


All times are GMT. The time now is 12:27 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.