SA-MP Forums Archive
[Ajuda] Pegar o trailer e carregar zzzzz - 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: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Pegar o trailer e carregar zzzzz (/showthread.php?tid=434746)



Pegar o trailer e carregar zzzzz - Cromado - 04.05.2013

Olб galera so presciso de uma ajudinha aqui eu so queria que quando o player engata-se no trailer 584 e aparece veiculo carregado ja tenho td mais so falta isso e eu nгo sei faser ja procurei em td alguem me ajuda?


Re: Pegar o trailer e carregar zzzzz - Lуs - 04.05.2013

AttachTrailerToVehicle


Re: Pegar o trailer e carregar zzzzz - Miqueias Barros - 04.05.2013

Use IsTrailerAttachedToVehicle, tenta usar SetTimer pra checar se o veнculo estб com o Thailer preso atrбs... pхe 1 segundo pra checar.

bj


Re: Pegar o trailer e carregar zzzzz - Cromado - 04.05.2013

miqueias pode da uma ajuda ai com o settimer eu nгo entendi muito bem ...


Re: Pegar o trailer e carregar zzzzz - Cromado - 04.05.2013

Alguem me ajuda ai eu fis assim eu nгo sei se estar certo

AttachTrailerToVehicle ( 584 , 514 ) ;
if(IsTrailerAttachedToVehicle(584))
{
printf("[ INFO ] Seu caminhгo estб carregado com petroleo leve-o atй um posto!",584);
}
mais deu errado eu queria que apareci-se essa mensagem ai e tals


Re: Pegar o trailer e carregar zzzzz - Miqueias Barros - 04.05.2013

Nossa cara que isso AUHEUAHE

Tenta este, se nгo funcionar avisa!
pawn Код:
forward checkTrailer(playerid);

public OnGameModeInit() {
    SetTimer("checkThailer", 1000, true);
    return true;
}

public checkTrailer(playerid) {
    new vehicle = GetPlayerVehicleID(playerid);
    if(IsTrailerAttachedToVehicle(GetVehicleID)) {
        SendClientMessage(playerid, 0x008000FF, "[ INFO ] Seu caminhгo estб carregado com petroleo leve-o atй um posto!");
    }
    return true;
}



Re: Pegar o trailer e carregar zzzzz - Cromado - 05.05.2013

nгo funfo que as cordenadas da onde carrega essas coisas?


Re: Pegar o trailer e carregar zzzzz - ProKillerpa - 05.05.2013

Coloque isso em seu comando:

PHP код:
SetTimer("checkTrailer"1000true); 
E No final do gamemode:

PHP код:
forward checkTrailer(playerid);
public 
checkTrailer(playerid) {
    new 
vehicle GetPlayerVehicleID(playerid);
    if(
IsTrailerAttachedToVehicle(GetVehicleID)) {
        
SendClientMessage(playerid0x008000FF"[ INFO ] Seu caminhгo estб carregado com petroleo leve-o atй um posto!");
    }
    return 
true;




Re: Pegar o trailer e carregar zzzzz - Cromado - 06.05.2013

.-.
C:\Users\pppp\Desktop\RPG\gamemodes\BWE.pwn(18455) : error 017: undefined symbol "GetVehicleID"
C:\Users\pppp\Desktop\RPG\gamemodes\BWE.pwn(18454) : warning 204: symbol is assigned a value that is never used: "vehicle"