Jump to content
  • 0

Race System [Problema]


Question

Posted (edited)

Salut !

Acum cateva zile m-a rugat un prieten sa-l ajut cu implementarea unui system de race mai vechi si am reusit pana intr-un anumit punct... 

El doreste sa faca race-ul cu masina lui personala dar aici problema ma depaseste ... Am incercat in cateva feluri dar, ori nu te spawneaza in masina personala cand incepe race-ul, sau pur si simplu nu incepe. 

PS: Daca faci race-ul cu orice alta masina in afara de masina personala atunci totul decurge perfect... (race system-ul este construit in mare parte pe dini)

Multumesc pentru timpul acordat!

Quote

stock StartRaceBLDRPG(rName[])
{
    new livFile[256]; new sebStr[512];
    //--------------------------------------------------------------------------
    foreach(new i: Player)
    {
    //--------------------------------------------------------------------------
     new idd = PersonalCar(i), car = GetPlayerVehicleID(i);
     CarInfo[idd][Spawned] == car;
    //--------------------------------------------------------------------------
    format(livFile, sizeof(livFile), "/Race System/%s.sRace", rName);
    //--------------------------------------------------------------------------
    if(!dini_Exists(livFile)) return printf("Race \"%s\" doesn't exist!", rName);
    //--------------------------------------------------------------------------
    strmid(RaceName, rName, 0, strlen(rName), sizeof(RaceName)), RaceVehicle = CarInfo[idd][Spawned] == car, RaceType = dini_Int(livFile, "rType"), TotalCP =     dini_Int(livFile, "TotalCP");
    //--------------------------------------------------------------------------
    Loop(x, 2)
    {
        format(sebStr, 100, "vPosX_%d", x),  RaceVehCoords[x][0] = dini_Float(livFile, sebStr);
        format(sebStr, 100, "vPosY_%d", x),  RaceVehCoords[x][1] = dini_Float(livFile, sebStr);
        format(sebStr, 100, "vPosZ_%d", x),  RaceVehCoords[x][2] = dini_Float(livFile, sebStr);
        format(sebStr, 100, "vAngle_%d", x), RaceVehCoords[x][3] = dini_Float(livFile, sebStr);
    }
    Loop(x, TotalCP)
    {
         format(sebStr, 100, "CP_%d_PosX", x), CPCoords[x][0] = dini_Float(livFile, sebStr);
         format(sebStr, 100, "CP_%d_PosY", x), CPCoords[x][1] = dini_Float(livFile, sebStr);
         format(sebStr, 100, "CP_%d_PosZ", x), CPCoords[x][2] = dini_Float(livFile, sebStr);
    }
    Position = 0, FinishCount = 0, JoinCount = 0,CountAmount = MAX_COUNT, RaceTime = MAX_RACE_TIME, RaceBusy = 0x01, CountTimer = SetTimer("CountTillRace", 999, 1), TimeProgress = 0;
    Loop(x, 2) PlayersCount[x] = 0;
    }
    //--------------------------------------------------------------------------
    return 1;
}

 

Edited by Kayaba

1 answer to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.