[help] DetachTrailerFromVehicle
#1

Hey guys,

I have some trubble with this command I just made real fast.
Cant really figure out what the problem is, but some how it doesn't deattach the trailr :S

pawn Код:
if(strcmp(cmd, "/releasetrailer", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            new tmpcar = GetPlayerVehicleID(playerid);
            if(IsTrailerAttachedToVehicle(tmpcar))
            {
                DetachTrailerFromVehicle(GetVehicleTrailer(GetPlayerVehicleID(playerid)));
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "   You'r not having any Trailer attached to your Truck.");
                return 1;
            }
        }
        return 1;
    }
-Regards,
Tony
Reply
#2

pawn Код:
if(strcmp(cmd, "/releasetrailer", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            new tmpcar = GetPlayerVehicleID(playerid);
            if(IsTrailerAttachedToVehicle(tmpcar))
            {
                DetachTrailerFromVehicle(tmpcar);
                return 1;
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "   You're not having any Trailer attached to your Truck.");
                return 1;
            }
        }
        return 1;
    }
Try it...
Reply
#3

Works Perfect, Thanks alot mate!
Reply
#4

pawn Код:
DetachTrailerFromVehicle(tmpcar);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)