Disconnect trailer?
#3

First you need to attach trailer to vehicle... Proper, error-free function:
pawn Код:
if (strcmp("/detach", cmdtext, true) == 0)
{
    if(IsPlayerInAnyVehicle(playerid))
    {
        new VehicleID = GetPlayerVehicleID(playerid);
        if (IsTrailerAttachedToVehicle(VehicleID))
        {
            AttachTrailerToVehicle(GetVehicleTrailer(VehicleID), VehicleID);
            DetachTrailerFromVehicle(VehicleID);
            return 1;
        }
        SendClientMessage(playerid, COLOR_GREY, "ERROR: No trailers attached!");
        return 1;
    }
    SendClientMessage(playerid, COLOR_GREY, "ERROR: You're not in a vehicle!");
    return 1;
}
It's from my gamemode, modify it (but why do you put exact trailer and vehicle id's in it?) and it should work
Reply


Messages In This Thread
Disconnect trailer? - by Cabby - 13.04.2009, 07:32
Re: Disconnect trailer? - by robanswe - 13.04.2009, 08:17
Re: Disconnect trailer? - by DiDok - 13.04.2009, 10:58
Re: Disconnect trailer? - by Cabby - 13.04.2009, 11:03
Re: Disconnect trailer? - by Dol - 13.04.2009, 11:07
Re: Disconnect trailer? - by DiDok - 13.04.2009, 11:10

Forum Jump:


Users browsing this thread: 1 Guest(s)