Command Help
#2

>_> You already Posted This
https://sampforum.blast.hk/showthread.php?pid=1150280#pid1150280

But Here, Just put this in your command or whatever... this is in my script
pawn Код:
new Float:pX,Float:pY,Float:pZ;
            GetPlayerPos(playerid,pX,pY,pZ);
            new Float:vX,Float:vY,Float:vZ;
            new Found=0;
            new vid=0;
            while((vid<MAX_VEHICLES)&&(!Found))
                {
                vid++;
                GetVehiclePos(vid,vX,vY,vZ);
                if  ((floatabs(pX-vX)<7.0)&&(floatabs(pY-vY)<7.0)&&(floatabs(pZ-vZ)<7.0)&&(vid!=GetPlayerVehicleID(playerid)))
                    {
                    Found=1;
                    if  (IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
                        {
                        DetachTrailerFromVehicle(GetPlayerVehicleID(playerid));
                        }
                    AttachTrailerToVehicle(vid,GetPlayerVehicleID(playerid));
                    SendClientMessage(playerid,0xFFFF00AA,"Car Towed!");
                    }
                }
                if  (!Found)
                {
                SendClientMessage(playerid,0xFFFF00AA,"There is no car in range.");
                }
            }
Reply


Messages In This Thread
Command Help - by Tommy_Mandaz - 04.04.2011, 00:46
Re: Command Help - by airsoft - 04.04.2011, 01:36
Re: Command Help - by Tommy_Mandaz - 05.04.2011, 00:16
Re: Command Help - by (SF)Noobanatior - 05.04.2011, 04:47

Forum Jump:


Users browsing this thread: 2 Guest(s)