SA-MP Forums Archive
[HELP] not working, please urgent help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [HELP] not working, please urgent help (/showthread.php?tid=486818)



[HELP] not working, please urgent help - Luca12 - 10.01.2014

Hello can you tell why is this not working with trailer and dialog I want if I attach some trailer to get dialog? Thanks

pawn Код:
CMD:prijevoz(playerid,params[])
{
    if(IsPlayerConnected(playerid))
    {
        if(PlayerInfo[playerid][pJob] != 16) return SendClientMessage(playerid,GRAD2,"{F81414}(Odbijeno!) {C3C3C3}Niste zaposleni kao Vozac Goriva!");
        if(GetPlayerVehicleID(playerid) < Nafta[0] || GetPlayerVehicleID(playerid) > Nafta[6]) return SCM(playerid,GRAD2,"{F81414}(Odbijeno) {C3C3C3}Niste u vozilu za prijevoz goriva/mesa!");
        if(!IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid))) return SCM(playerid,GRAD2,"{F81414}[Greska!] {C3C3C3}Morate zakaciti prikolicu!");
        if(!IsTrailerAttachedToVehicle(584)) ShowPlayerDialog(playerid,naftaprijevoz,DIALOG_STYLE_LIST,"Izaberite jednu od ponudenih ruta","1.LS Benzinske Crpke\n2.LS Rafinerija\3.LS Rafinerija 1\n4.LV Rafinerija 2\n5.SF Aero","Odaberi","Odustani");
        if(!IsTrailerAttachedToVehicle(591)) ShowPlayerDialog(playerid,prikolicaprijevoz,DIALOG_STYLE_LIST,"Izaberite jednu od ponudenih ruta","1.LV Skladiste mesa\n2.Prijevoz mesa u skladiste\n3.Prijevoz mesa u SF Skladiste\n4.SF Aero\n5.LV Aero","Odaberi","Odustani");
    }
    return 1;
}



Re: [HELP] not working, please urgent help - Konstantinos - 10.01.2014

Use the vehicleid in IsTrailerAttachedToVehicle, not the modelid.


Re: [HELP] not working, please urgent help - Luca12 - 10.01.2014

I can't use like this I need just something like this beacuse I have 2 diffrent trailers for job. One trailer is for delivering fuel and another trailer is for shops. Beacuse of that I need something like mine to get just that id of ttrailer and show dialog to player? Thanks


Re: [HELP] not working, please urgent help - Konstantinos - 10.01.2014

What do you want to do? If you want to get the ID of the trailer, use: https://sampwiki.blast.hk/wiki/GetVehicleTrailer


Re: [HELP] not working, please urgent help - Luca12 - 10.01.2014

for example if have attached trailer to trunk id 584 then I want show dialog for delivering fuel and secon for shops is the same if I have attached trailer 591 then I want show dialog for shops nad for example if players has attached trailer id 584 the he get dialog for fuels if he get attached trailer id 591 then he get dialog for shops? Thanks


Re: [HELP] not working, please urgent help - Vasu99 - 10.01.2014

Hello,

Sorry for walking in like this and disturbing.

But, I see that his English isn't the best but I think I get what he means so I'll just simplify it, in order to try and get the lad some help. What he means is that he wants a certain dialog to pop up everytime a truck is connected with a certain type of trailer. E.g. If he connects his truck to a Petrol Tanker, he wants a message to pop up and tell the player to deliver the trailer to a gas station. If he, on the other hand, connects the truck with a normal Article Trailer, he wants the message to pop up and tell the player to drive to a shop. Not sure if I simplified or complicated things though, haha.

Cheers!


Re: [HELP] not working, please urgent help - Luca12 - 10.01.2014

yes like vasu99 said


Re: [HELP] not working, please urgent help - Luca12 - 11.01.2014

anyone?thanks


Re: [HELP] not working, please urgent help - Sojo12 - 11.01.2014

Well it isnt in english.Hence,i cant help you bro please translate it and maybe i can help.


Re: [HELP] not working, please urgent help - Luca12 - 11.01.2014

it doens't in which language is it I just want like vasu said if I connect on my truck petrol tanker then I get dialog for delivering fuel to the gas station in the other hand if I connect to truck article trailer then I get diffrent dialog for delivering staff to the shops