Help put player in vehicle
#2

This is an example, you must create some position in order to create a car, because if you create the same car in the same location some players will be stucked there (only if you are using collision in your race system).

PHP Code:
stock racelobby(playerid)
{
    if(
raceplayers 2)
    {
        
sendtorace(-1"Waiting for players");
    }
    else if(
raceplayers >= 2)
    {
        
sendtorace(-1"THE RACE WILL START IN 10 SECONDS");
        
SetTimer("race"100000);
    }
}
forward race();
public 
race()
{
    
SendClientMessageToAll(-1"DEBUG: RACE StART");
    
racestatus 1;
    
    foreach(new 
Player)
    {
        new 
car CreateVehicle(411, -2518.1865, -2301.781714.8012, -90.0000, -1, -1100);
        
PutPlayerInVehicle(icar0);
        
SendClientMessage(i, -1"In 5 seconds the race will start");
    }
    return 
1;

Reply


Messages In This Thread
Help put player in vehicle - by Calinut200 - 29.05.2020, 13:10
Re: Help put player in vehicle - by RedGun2015 - 29.05.2020, 13:17

Forum Jump:


Users browsing this thread: 1 Guest(s)