SA-MP Forums Archive
[Ayuda]con patentes - 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: [Ayuda]con patentes (/showthread.php?tid=208389)



[Ayuda]con patentes - RcoN! - 08.01.2011

Hola,he intentado hacer que cuando se entre a un vehiculo se le cambie la patente

usando el calback OnPlayerEnterVehicle

pero no me ha funcionado alguien tiene alguna idea de como hacerlo ?


Respuesta: [Ayuda]con patentes - SuperMarioRol - 08.01.2011

Pasa lo qeu has hecho y buscaremos el erorr


Re: [Ayuda]con patentes - RcoN! - 08.01.2011

pawn Код:
new Vehiculo[MAX_PLAYERS];
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
SetVehicleNumberPlate(Vehiculo[playerid], "texto");
return 1;
}
pero al entrar no pasa nada :S


Re: [Ayuda]con patentes - Miguel - 08.01.2011

Creo que tienes que usar la funciуn SetVehicleToRespawn despuйs de cambiar la patente.


Re: [Ayuda]con patentes - RcoN! - 08.01.2011

Me podrias dar un ejemplo porfavor ?


Porque no entiendo en que usaria esto..

pawn Код:
// Respawns the first vehicle
SetVehicleToRespawn(1);
pawn Код:
for(new i = 0; i < MAX_VEHICLES; i++)
{
    SetVehicleToRespawn(i);
}



Respuesta: [Ayuda]con patentes - TheChaoz - 08.01.2011

para q la patente del auto sea cambiada. debes respawnear el vehiculo. a eso se refiere.


Re: [Ayuda]con patentes - Miguel - 08.01.2011

Exбctamente, hay un problema con lo que quieres hacer, cambiar la placa cuando el jugador entra en el vehнculo. Debes utilizar la funciуn que te dн por lo que el auto va a desaparecer y reaparecer cada vez que intentes entrar en йl. Es mejor que cambies la placa mucho antes de que el jugador intente entrar el vehнculo.


Re: [Ayuda]con patentes - Zamaroht - 08.01.2011

Quote:
Originally Posted by Miguel
Посмотреть сообщение
Es mejor que cambies la placa mucho antes de que el jugador intente entrar el vehнculo.
Para evitar desincronizaciones, recomiendo cambiarla inmediatamente despuйs de CreateVehicle o AddStaticVehicle.


Re: [Ayuda]con patentes - RcoN! - 08.01.2011

pawn Код:
CrearVehiculo(playerid, modelid)
{
    new vid, Float:x, Float:y, Float:z, Float:angulo;

    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
        vid = GetPlayerVehicleID(playerid);
        GetVehiclePos(vid, x, y, z);
        GetVehicleZAngle(vid, angulo);
        DestroyVehicle(vid);
    } else {
        GetPlayerPos(playerid, x, y, z);
        GetPlayerFacingAngle(playerid, angulo);
    }
    vid = CreateVehicle(modelid, x, y, z, angulo, -1, -1, 300);
    new Vehiculo[MAX_PLAYERS];
    SetVehicleNumberPlate(Vehiculo[playerid], "Abreviacion del server");
    LinkVehicleToInterior(vid, GetPlayerInterior(playerid));
    SetVehicleVirtualWorld(vid, GetPlayerVirtualWorld(playerid));
    PutPlayerInVehicle(playerid, vid, 0);
    return 1;
}
Esta correcto asi ?


Re: [Ayuda]con patentes - RcoN! - 08.01.2011

Alguien que me intente ayudar porfa