SA-MP Forums Archive
how to make race any vehicle - 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: how to make race any vehicle (/showthread.php?tid=628884)



how to make race any vehicle - crukk11 - 16.02.2017

how to make race any vehicle


Re: how to make race any vehicle - JesterlJoker - 16.02.2017

Quote:
Originally Posted by crukk11
Посмотреть сообщение
how to make race any vehicle
Please elaborate what you want?

No one would give you an answer with what you just said


Re: how to make race any vehicle - crukk11 - 16.02.2017

i meant how to get any filterscripts race or something


Re: how to make race any vehicle - JesterlJoker - 16.02.2017

You could search it on ******.

or on the sa-mp filterscript section


Re: how to make race any vehicle - crukk11 - 16.02.2017

yes. i search everything all and my gamemode not support

sorry for my bad english


Re: how to make race any vehicle - JesterlJoker - 16.02.2017

You could just make by using
PHP код:
SetPlayerRaceCheckpoint(playeridtypeFloat:xFloat:yFloat:zFloat:nextxFloat:nextyFloat:nextzFloat:size// the basic one
CreateDynamicRaceCP(typeFloat:xFloat:yFloat:zFloat:nextxFloat:nextyFloat:nextzFloat:sizeworldid = -1interiorid = -1playerid = -1Float:streamdistance STREAMER_RACE_CP_SDSTREAMER_TAG_AREA areaid STREAMER_TAG_AREA -1//and the advance one 
I basically don't have an idea how to use this but it's what the basic is.

Then you can use this
PHP код:
OnPlayerEnterRaceCheckpoint(playerid)//basic one
OnPlayerEnterDynamicRaceCP(playeridSTREAMER_TAG_RACE_CP checkpointid)// advance one 
like to reset the timer or add time when a player enter checkpoint. this is for dynamic checkpoints


Re: how to make race any vehicle - crukk11 - 16.02.2017

how to set up this code


Re: how to make race any vehicle - JesterlJoker - 16.02.2017

To set this up
PHP код:
//add this when you start an event or enter a certain area
CreateDynamicRaceCP(typeFloat:xFloat:yFloat:zFloat:nextxFloat:nextyFloat:nextzFloat:sizeworldid = -1interiorid = -1playerid = -1Float:streamdistance STREAMER_RACE_CP_SDSTREAMER_TAG_AREA areaid STREAMER_TAG_AREA -1)// use this if you want to add more when you enter the checkpoint then add another one of this on another area to set a checkpoint or finish the race when you enter the checkpoint
SetPlayerRaceCheckpoint(playeridtypeFloat:xFloat:yFloat:zFloat:nextxFloat:nextyFloat:nextzFloat:size// use this when you just want a one round race like drag races or something like that. 
now to our callbacks
PHP код:
public OnPlayerEnterDynamicRaceCP(playeridSTREAMER_TAG_RACE_CP checkpointid)
{
//add your code here
//use this callback when you are using the CreateDynamicRaceCP
}

public 
OnPlayerEnterRaceCheckpoint(playerid)//basic one
{
//add code here
//you can use this callback when you are using SetPlayerRaceCheckpoint

search for the type of checkpoints for both dynamic and non-dynamic and know what their usage.

When you make one checkpoint and made it work, you'll get the hang of scripting it and it will be easy.