16.08.2010, 16:07
I... I did that:
but... if I'm near the trailer with the tractor it doesn't do anything -.-
Код:
dcmd_attach(playerid, params[]) { #pragma unused params new v = GetPlayerVehicleID(playerid); if(IsPlayerInAnyVehicle(playerid)){ if(!IsTrailerAttachedToVehicle(v)){ if(GetVehicleModel(v) == 531){ for(new v2=0; v < MAX_VEHICLES; v++) if(GetVehicleModel(v2) == 607){ new Float:x, Float:y, Float:z; GetVehiclePos(v2, x, y, z); if(IsPlayerInRangeOfPoint(playerid, 5.00, x, y, z)){ AttachTrailerToVehicle(v2, v); } } }else{ SendClientMessage(playerid, GREY, "This command doesn't work for this vehicle"); } }else{ SendClientMessage(playerid, GREY, "Use /detach first"); } }else{ SendClientMessage(playerid, GREY, "Get in a Tractor"); } return 1; }