24.08.2010, 13:58
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;
}
}
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);