Jump to content

Cerere ajutor cu vehicule.


DaNNz0r
 Share

Recommended Posts

Salut, folosesc gm big... si vrea ca, cand un player se logheaza pe server si are masini sa se spawneze toate care le are, cum este la bugged, sa nu mai dai /v -> spawneaze, sau sa fii in masina ca sa spawneze cealalta masina. Multumesc.

Link to comment
Share on other sites

Eu am facut on OnLogin sa se incarce toate masinile.

Codul arata cam asa:

 

OnLogin(playerid)
{
    LoadVehicles(playerid);
}
 
stock LoadVehicles(playerid)
{
    if(PlayerInfo[playerid][pCarKey1] != 0)
    {
        new carid = PlayerInfo[playerid][pCarKey1];
        new car = CreateVehicle(CarInfo[carid][cModel],CarInfo[carid][cLocationX],CarInfo[carid][cLocationY],CarInfo[carid][cLocationZ],CarInfo[carid][cAngle],CarInfo[carid][cColorOne],CarInfo[carid][cColorTwo],6000000);
        SetVehicleNumberPlate(car, CarInfo[carid][cPlate]);
        if(CarInfo[carid][cLock] == 1)
        {
            GetVehicleParamsEx(car,engine1,lights1,alarm1,doors1,bonnet1,boot1,objective1);
            SetVehicleParamsEx(car,engine1,lights1,alarm1,1,bonnet1,boot1,objective1);
        }
        if(CarInfo[carid][cLock] == 0)
        {
            GetVehicleParamsEx(car,engine1,lights1,alarm1,doors1,bonnet1,boot1,objective1);
            SetVehicleParamsEx(car,engine1,lights1,alarm1,0,bonnet1,boot1,objective1);
        }
}

Etc.

Link to comment
Share on other sites

Eu am facut on OnLogin sa se incarce toate masinile.

Codul arata cam asa:

OnLogin(playerid)
{
    LoadVehicles(playerid);
}
 
stock LoadVehicles(playerid)
{
    if(PlayerInfo[playerid][pCarKey1] != 0)
    {
        new carid = PlayerInfo[playerid][pCarKey1];
        new car = CreateVehicle(CarInfo[carid][cModel],CarInfo[carid][cLocationX],CarInfo[carid][cLocationY],CarInfo[carid][cLocationZ],CarInfo[carid][cAngle],CarInfo[carid][cColorOne],CarInfo[carid][cColorTwo],6000000);
        SetVehicleNumberPlate(car, CarInfo[carid][cPlate]);
        if(CarInfo[carid][cLock] == 1)
        {
            GetVehicleParamsEx(car,engine1,lights1,alarm1,doors1,bonnet1,boot1,objective1);
            SetVehicleParamsEx(car,engine1,lights1,alarm1,1,bonnet1,boot1,objective1);
        }
        if(CarInfo[carid][cLock] == 0)
        {
            GetVehicleParamsEx(car,engine1,lights1,alarm1,doors1,bonnet1,boot1,objective1);
            SetVehicleParamsEx(car,engine1,lights1,alarm1,0,bonnet1,boot1,objective1);
        }
}

Etc.

Pai in afara de asta mai adaug ceva sau doar ce mi-ai dat tu?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. 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.