13.11.2013, 04:54
(
Последний раз редактировалось Josh Greening; 13.11.2013 в 05:32.
)
Alright, so i've spent the past few hours trying to figure this out. I'm trying to make a system so I can latch multiple trailers to one truck(I believe it's called a Road Train when you tow multiple trailers with one cab) I've solved most of my issues, and it now compiles with no errors, the trailers are attaching and un-attaching on command, but when I have a trailer on, and try to hook a second one onto the current trailer, nothing happens. I'm possibly missing a return or something, but i can't figure out what's missing. Could someone read over this and help me?
PS: I'm still new with scripting, still learning allot of things, so excuse my sloppy scripting. Most of my scripting is made from what i've learned on Wiki.
Any help is greatly appreciated as it will help me learn, and you will be +rep'd for helping.
PS: I'm still new with scripting, still learning allot of things, so excuse my sloppy scripting. Most of my scripting is made from what i've learned on Wiki.
Any help is greatly appreciated as it will help me learn, and you will be +rep'd for helping.
pawn Код:
CMD:attachtrailer(playerid)
{
{
{
{
{
{
{
{
}
}
}
}
else
{
if (IsTrailerAttachedToVehicle(dudecar))
{
new rtrailer = GetVehicleModel(GetVehicleTrailer(vehicleid));
if(DistanceBetweenPlayerAndVeh(playerid, car) < 7.0)
{
if(IsATrailer(GetVehicleModel(car)))
{
if(VehLocked[car])
{
SCM(playerid,COLOR_LIGHTRED, " You can't latch onto this trailer!");
return 1;
}
AttachTrailerToVehicle(car, rtrailer);
SCM(playerid,COLOR_LIGHTGREEN,"* You have finshed hooking up the trailer!");
return 1;
}
}
}
return 1;
}
}
else
{
SCM(playerid,COLOR_LIGHTRED, " There is no trailer in range.");
return 1;
}
}
}
else
{
SCM(playerid, COLOR_LIGHTRED, " You have to be in a car to do this!");
}
return 1;
}