[Ajuda] Carregar ao pegar o trailer - 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] Carregar ao pegar o trailer (
/showthread.php?tid=435625)
Carregar ao pegar o trailer -
Cromado - 07.05.2013
eae galera blz eu to fasendo um Carregamento altomatico que carrega so de vc pegar o trailer e ta dificil meu amigo mando eu usar o
pawn Код:
if(IsTrailerAttachedToVehicle())
tudo mais nгo ta funfando eu queria que quando o caminhao id 514 ingata-se no trailer de petroleo id 584 ele carregaria altomatico fis assim mais ta tudu errado
pawn Код:
if(IsTrailerAttachedToVehicle(584))
{
printf("[ INFO ] Seu caminhгo estб carregado com petroleo leve-o atй um posto!",584);
}
dai uns caras mandaro eu usar o Settimer junto com isso mais nгo sei faser isso muito bem alguem ai me ajuda ?
Re: Carregar ao pegar o trailer -
ViictorDaay- - 07.05.2013
Ta meio errado umas coisas ai o.O
PHP код:
if(IsTrailerAttachedToVehicle(584))
{
SendClientMessage(playerid,-1,"[ INFO ] Seu caminhгo estб carregado com petroleo leve-o atй um posto!");
}
Re: Carregar ao pegar o trailer -
ProKillerpa - 07.05.2013
Olб colega,
Se vocк pesquisasse um pouco saberia que nгo se usa "printf" em algo que nгo seja imprimido no console.
Abraзos
Re: Carregar ao pegar o trailer -
Cromado - 07.05.2013
cara eu fis assim
pawn Код:
if (strcmp(cmd, "/carregar", true) == 0)
{
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if(dini_Int(file, "Profissao") == Petroleiro){
}
new VehicleID;
VehicleID = GetPlayerVehicleID(playerid);
new modelo;
modelo = GetVehicleModel(VehicleID);
if (modelo == 584)
if(IsTrailerAttachedToVehicle(584))
{
SendClientMessage(playerid,-1,"[ INFO ] Seu caminhгo estб carregado com petroleo leve-o atй um posto!");
}
{
if (PlayerToPoint(60.0, playerid, 269.8848,1352.7755,10.5859))
{
SetPlayerMapIcon(playerid, 81, -1026.4006, -625.2548, 32.0078, 51, 0); //Posto1
SetPlayerMapIcon(playerid, 82, 2819.81, 915.62, 11.77, 51, 0); //Posto1
if (Carregamento[playerid] == 0)
{
}
else
{
SendClientMessage(playerid, Amarelo, "** Seu caminhгo Foi Carregado!");
return 1;
}
}
else
{
SendClientMessage(playerid, Vermelho, "** Vocк nгo estб na бrea de carga");
return 1;
}
}
}
acho que ta erradu ne