[Tool/Web/Other] [Function]GetVehicleTrailerPos
#1

pawn Код:
stock GetVehicleTrailerPos(vehicleid, trailerid, &Float:x, &Float:y, &Float:z){
    if(IsTrailerAttachedToVehicle(vehicleid)){
        if(GetVehicleTrailer(vehicleid) == trailerid){
            GetVehiclePos(trailerid, x, y, z);
            return 1;
        }else{
            return 0;
        }
    }else{
        return 0;
    }
}
so this is function that can return position of trailer that is attached to some vehicle.
Usage:
pawn Код:
GetVehicleTrailerPos(vehicleid,GetVehicleTrailer(vehicleid), mx, my, mz);
            new mstring[128];
            format(mstring, sizeof(mstring), "%f | %f | %f |", mx, my, mz);
            SendClientMessage(playerid, COLOR_SYSTEM, mstring);
i want to thanks to Donny_K for little help.
Reply


Messages In This Thread
[Function]GetVehicleTrailerPos - by CoaPsyFactor - 24.08.2010, 13:58
Re: [Function]GetVehicleTrailerPos - by DiddyBop - 24.08.2010, 16:09
Re: [Function]GetVehicleTrailerPos - by nuriel8833 - 26.08.2010, 13:22
Re: [Function]GetVehicleTrailerPos - by ScottCFR - 26.08.2010, 19:21
Re: [Function]GetVehicleTrailerPos - by XXJacksug8X - 16.07.2014, 15:41
Re: [Function]GetVehicleTrailerPos - by CoaPsyFactor - 18.07.2014, 00:18

Forum Jump:


Users browsing this thread: 1 Guest(s)