SA-MP Forums Archive
Problema con GetVehicleDoorsDamageStatus - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: Problema con GetVehicleDoorsDamageStatus (/showthread.php?tid=568364)



Problema con GetVehicleDoorsDamageStatus - Minikole - 21.03.2015

Buenas, tengo un problema con la funcion GetVehicleDoorsDamageStatus, el daсo del capo me lo asigna al daсo de la puerta izquierda trasera(puerta3) y el daсo del maletero me lo asigna a la puerta derecha trasera(puerta4)

Aqui dejo el stock de la funcion

Код:
stock GetVehicleDoorsDamageStatus(vehicleid, &Bonnet, &Boot, &FrontLeft, &FrontRight, &RearLeft, &RearRight)
{
new Panels, Doors, Lights, Tires;
GetVehicleDamageStatus(vehicleid, Panels, Doors, Lights, Tires);
Bonnet = Doors & 7;
Boot = Doors >> 8 & 7;
FrontLeft = Doors >> 16 & 7;
FrontRight = Doors >> 24 & 7;
RearLeft = Doors >> 32 & 7;
RearRight = Doors >> 40 & 7;
return true;
}
y aqui el codigo donde uso la funcion jeje

Код:
new capo,maletero,puerta1,puerta2,puerta3,puerta4;
    GetVehicleDoorsDamageStatus(vehicleid,capo,maletero,puerta1,puerta2,puerta3,puerta4);
    new s[400];
    format(s,sizeof(s), "Capo:%i | Maletero:%i | Puerta 1:%i | Puerta 2:%i | Puerta 3:%i | Puerta 4:%i",capo,maletero,puerta1,puerta2,puerta3,puerta4);
    SendClientMessage(playerid,-1,s);
Cual seria el problema amigos?

Saludos


Respuesta: Problema con GetVehicleDoorsDamageStatus - [DOG]irinel1996 - 21.03.2015

Una pregunta... їquй es lo que quieres hacer con GetVehicleDamageStatus? їGuardar y cargar el daсo de los vehнculos?


Respuesta: Problema con GetVehicleDoorsDamageStatus - Minikole - 21.03.2015

Quote:
Originally Posted by [DOG]irinel1996
Посмотреть сообщение
Una pregunta... їquй es lo que quieres hacer con GetVehicleDamageStatus? їGuardar y cargar el daсo de los vehнculos?
Es decir, quiero guardar el daсo de cada puerta, que con esa funcion( GetVehicleDamageStatus), se puede guardar el daсo de todas las puertas colectivamente, no individual

Saludos


Re: Problema con GetVehicleDoorsDamageStatus - SickAttack - 21.03.2015

Prueba esto:
pawn Код:
stock GetVehicleDoorsDamageStatus(vehicleid, &bonnet, &boot, &frontleft, &frontright, &rearleft, &rearright)
{
    new panels, doors, lights, tires;
    GetVehicleDamageStatus(vehicleid, panels, doors, lights, tires);

    bonnet = doors & 7;
    boot = doors >> 8 & 7;
    frontleft = doors >> 16 & 7;
    frontright = doors >> 24 & 7;
    rearleft = doors >> 32 & 7;
    rearright = doors >> 40 & 7;
    return 1;
}

CMD:doors(playerid, params[])
{
    new bonnet, boot, frontleft, frontright, rearleft, rearright;
    GetVehicleDoorsDamageStatus(GetPlayerVehicleID(playerid), bonnet, boot, frontleft, frontright, rearleft, rearright);

    new string[400];
    format(string, sizeof(string), "Capo:%i | Maletero:%i | Puerta 1:%i | Puerta 2:%i | Puerta 3:%i | Puerta 4:%i", bonnet, boot, frontleft, frontright, rearleft, rearright);
    SendClientMessage(playerid, -1, string);
    return 1;
}



Respuesta: Re: Problema con GetVehicleDoorsDamageStatus - Minikole - 21.03.2015

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
Prueba esto:
pawn Код:
stock GetVehicleDoorsDamageStatus(vehicleid, &bonnet, &boot, &frontleft, &frontright, &rearleft, &rearright)
{
    new panels, doors, lights, tires;
    GetVehicleDamageStatus(vehicleid, panels, doors, lights, tires);

    bonnet = doors & 7;
    boot = doors >> 8 & 7;
    frontleft = doors >> 16 & 7;
    frontright = doors >> 24 & 7;
    rearleft = doors >> 32 & 7;
    rearright = doors >> 40 & 7;
    return 1;
}

CMD:doors(playerid, params[])
{
    new bonnet, boot, frontleft, frontright, rearleft, rearright;
    GetVehicleDoorsDamageStatus(GetPlayerVehicleID(playerid), bonnet, boot, frontleft, frontright, rearleft, rearright);

    new string[400];
    format(string, sizeof(string), "Capo:%i | Maletero:%i | Puerta 1:%i | Puerta 2:%i | Puerta 3:%i | Puerta 4:%i", bonnet, boot, frontleft, frontright, rearleft, rearright);
    SendClientMessage(playerid, -1, string);
    return 1;
}
Buenas recien probй pero mismo resultado, gracias igual por responder.Dejo una SS del chat adicional


Saludos.


Respuesta: Problema con GetVehicleDoorsDamageStatus - jotajeda - 21.03.2015

Se complica tanto, en el otro post que por cierto "ignorу mi mensaje" allн estб lo bбsico, no hay necesidad de hacer tantos stock,
PHP код:
//___Cuando se desconecta el player o cuando se necesita guardar el estado visual del vehiculo____
new panels,doors,lights,tires;
GetVehicleDamageStatus(vehicleid,panels,doors,lights,tires);
//________Cuando se quiere cargar йstos datos al vehiculo, ejemplo cuando se conecta el player y se spawnea el vehiculo.
UpdateVehicleDamageStatus(vehicleidpanelsdoorslightstires); 



Re: Problema con GetVehicleDoorsDamageStatus - SickAttack - 21.03.2015

Asi deberia retornar, mira esto:
https://sampwiki.blast.hk/wiki/DoorStates

Y aqui te dejo una imagen tambien:



Respuesta: Problema con GetVehicleDoorsDamageStatus - Minikole - 21.03.2015

Quote:
Originally Posted by jotajeda
Посмотреть сообщение
Se complica tanto, en el otro post que por cierto "ignorу mi mensaje" allн estб lo bбsico, no hay necesidad de hacer tantos stock,
PHP код:
//___Cuando se desconecta el player o cuando se necesita guardar el estado visual del vehiculo____
new panels,doors,lights,tires;
GetVehicleDamageStatus(vehicleid,panels,doors,lights,tires);
//________Cuando se quiere cargar йstos datos al vehiculo, ejemplo cuando se conecta el player y se spawnea el vehiculo.
UpdateVehicleDamageStatus(vehicleidpanelsdoorslightstires); 
Buenas jotajeda, gracias por responder.

Con la funcion GetVehicleDamageStatus se guarda el daсo de las 6 puertas (maletero,capo y 4 mas) , lo que busco yo es guardar cada daсo de cada puerta en cada variable.

Saludos


Respuesta: Re: Problema con GetVehicleDoorsDamageStatus - Minikole - 21.03.2015

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
Asi deberia retornar, mira esto:
https://sampwiki.blast.hk/wiki/DoorStates

Y aqui te dejo una imagen tambien:
wow gracias SickAttack , pensaba que tambien se podia con las puertas traseras y parece ser que no.

Gracias de nuevo y saludos!