Problem AttachTrailerToVehicle
#1

Hello!

pawn Код:
CMD:attach(playerid, params[])
    {
        new Float:X, Float:Y, Float:Z;
        GetPlayerPos(playerid, X, Y, Z);
        for(new v=0;v<MAX_VEHICLES; v++) {
            GetVehiclePos(v,X,Y,Z);
            if(IsPlayerInRangeOfPoint(playerid, 6.0, X,Y,Z)) {
                if(!IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid))) AttachTrailerToVehicle(v,GetPlayerVehicleID(playerid));
                else DetachTrailerFromVehicle(GetPlayerVehicleID(playerid));
            } else SendClientMessage(playerid, -1, "No caravan at your finger");
        }
        return 1;
    }
How can I order it to attach only ID 607 vehicle (trailer)?
Reply


Messages In This Thread
Problem AttachTrailerToVehicle - by Johnny_Ionut - 24.01.2015, 10:11
Re: Problem AttachTrailerToVehicle - by Threshold - 24.01.2015, 10:52
Re: Problem AttachTrailerToVehicle - by Johnny_Ionut - 24.01.2015, 12:06

Forum Jump:


Users browsing this thread: 1 Guest(s)