16.02.2017, 14:45
how to make race any vehicle
SetPlayerRaceCheckpoint(playerid, type, Float:x, Float:y, Float:z, Float:nextx, Float:nexty, Float:nextz, Float:size) // the basic one
CreateDynamicRaceCP(type, Float:x, Float:y, Float:z, Float:nextx, Float:nexty, Float:nextz, Float:size, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = STREAMER_RACE_CP_SD, STREAMER_TAG_AREA areaid = STREAMER_TAG_AREA -1) //and the advance one
OnPlayerEnterRaceCheckpoint(playerid)//basic one
OnPlayerEnterDynamicRaceCP(playerid, STREAMER_TAG_RACE_CP checkpointid)// advance one
//add this when you start an event or enter a certain area
CreateDynamicRaceCP(type, Float:x, Float:y, Float:z, Float:nextx, Float:nexty, Float:nextz, Float:size, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = STREAMER_RACE_CP_SD, STREAMER_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(playerid, type, Float:x, Float:y, Float:z, Float:nextx, Float:nexty, Float:nextz, Float:size) // use this when you just want a one round race like drag races or something like that.
public OnPlayerEnterDynamicRaceCP(playerid, STREAMER_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
}