[DUDA] Бngulo del vehнculo errуneo
#5

Aquн te paso parte del cуdigo:

pawn Код:
// Cуdigo del guardado de posiciуn
stock ApagarVehiculo(vehicleid, playerid)
{
    new string[128];
    if(AutoInfo[vehicleid][aMotor])
    {
        new engine, lights, alarm, doors, bonnet, boot, objective;
        AutoInfo[vehicleid][aMotor] = 0;
        GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
        SetVehicleParamsEx(vehicleid, 0, lights, alarm, doors, bonnet, boot, objective);
        format(string, sizeof(string), "* %s apagу el motor del %s.", NombreJugador(playerid), AutoInfo[vehicleid][aDescripcion]);
        ProxDetector(15.0, playerid, string, ROSA, ROSA, ROSA, ROSA, ROSA);
        if(AutoInfo[vehicleid][aFaccionID] == 8888)
        {
            new Float:Pos[4];
            GetVehiclePos(vehicleid, Pos[0], Pos[1], Pos[2]);
            GetVehicleZAngle(vehicleid, Pos[3]);
            AutoInfo[vehicleid][ax] = Pos[0]; AutoInfo[vehicleid][ay] = Pos[1]; AutoInfo[vehicleid][az] = Pos[2]; AutoInfo[vehicleid][aa] = Pos[3];
            UpdateVehFloat(AutoInfo[vehicleid][aID], "X", Pos[0]); UpdateVehFloat(AutoInfo[vehicleid][aID], "Y", Pos[1]); UpdateVehFloat(AutoInfo[vehicleid][aID], "Z", Pos[2]); UpdateVehFloat(AutoInfo[vehicleid][aID], "Angle", Pos[3]);
        }
        ActualizarVeh(vehicleid);
    }
    return 1;
}

// Cуdigo del OnVehicleSpawn
public OnVehicleSpawn(vehicleid)
{
    AutoInfo[vehicleid][aMotor] = 0;
   
    if(VehExploto[vehicleid] == 1)
    {
        SetVehicleHealthEx(vehicleid, 350.0);
        AutoInfo[vehicleid][aRoto] = 1;
        UpdateVehicleDamageStatus(vehicleid, 3565161, 33554946, 4, 0);
    }
    SetVehiclePos(vehicleid, AutoInfo[vehicleid][ax], AutoInfo[vehicleid][ay], AutoInfo[vehicleid][az]);
    SetVehicleZAngle(vehicleid, AutoInfo[vehicleid][aa]);
    LinkVehicleToInterior(vehicleid, AutoInfo[vehicleid][aInteriorID]);
   
    new motor, luces, alarma, puertas, capo, maletero, objetivo;
    GetVehicleParamsEx(vehicleid, motor, luces, alarma, puertas, capo, maletero, objetivo);
    SetVehicleParamsEx(vehicleid, 0, 0, alarma, puertas, 0, 0, objetivo);
    return 1;
}
Reply


Messages In This Thread
[DUDA] Бngulo del vehнculo errуneo - by rubensm - 17.04.2014, 14:12
Respuesta: [DUDA] Бngulo del vehнculo errуneo - by Parka - 17.04.2014, 15:25
Re: [DUDA] Бngulo del vehнculo errуneo - by rubensm - 17.04.2014, 16:21
Respuesta: [DUDA] Бngulo del vehнculo errуneo - by TheChaoz - 17.04.2014, 19:00
Re: [DUDA] Бngulo del vehнculo errуneo - by rubensm - 18.04.2014, 12:16
Respuesta: [DUDA] Бngulo del vehнculo errуneo - by rubensm - 21.04.2014, 21:51

Forum Jump:


Users browsing this thread: 2 Guest(s)