Car tow
#1

I was searching a lot but i cant find tow system which allowe to all cars can tow all cars
i need to can car tow car...
example
to tow uranus with elegy.when car is back from you you cant type /tow and start towing
can anyone help me with this please
thank you
Reply
#2

You can edit existing system to fit your requirements. Just skip towing vehicle check
Reply
#3

i dont have any system for towing,can you please edit it and give me pastebin?
Reply
#4

I'm not having any system too. Try to search for it.
Reply
#5

this
https://sampforum.blast.hk/showthread.php?tid=11753
but i want to pull with car now with tow truck
Reply
#6

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
    {
    if ((newkeys==KEY_ACTION)&&(IsPlayerInAnyVehicle(playerid))&&(GetPlayerState(playerid)==PLAYER_STATE_DRIVER))
        {
            SendClientMessage(playerid,0xFFFF00AA,"trying to tow a car");
            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.");
                }
        }
    }
Try this
Reply
#7

Thank you very much,i will try!
Reply
#8

C:\Documents and Settings\Nikola Radosavljevic\Desktop\tow.pwn(1) : warning 235: public function lacks forward declaration (symbol "OnPlayerKeyStateChange")
C:\Documents and Settings\Nikola Radosavljevic\Desktop\tow.pwn(3) : error 017: undefined symbol "KEY_ACTION"
C:\Documents and Settings\Nikola Radosavljevic\Desktop\tow.pwn(5) : error 017: undefined symbol "SendClientMessage"
C:\Documents and Settings\Nikola Radosavljevic\Desktop\tow.pwn(7) : error 017: undefined symbol "GetPlayerPos"
C:\Documents and Settings\Nikola Radosavljevic\Desktop\tow.pwn(11) : error 017: undefined symbol "MAX_VEHICLES"
C:\Documents and Settings\Nikola Radosavljevic\Desktop\tow.pwn(14) : error 017: undefined symbol "GetVehiclePos"
C:\Documents and Settings\Nikola Radosavljevic\Desktop\tow.pwn(15) : error 017: undefined symbol "floatabs"
C:\Documents and Settings\Nikola Radosavljevic\Desktop\tow.pwn(1 : error 017: undefined symbol "IsTrailerAttachedToVehicle"
C:\Documents and Settings\Nikola Radosavljevic\Desktop\tow.pwn(20) : error 017: undefined symbol "DetachTrailerFromVehicle"
C:\Documents and Settings\Nikola Radosavljevic\Desktop\tow.pwn(22) : error 017: undefined symbol "AttachTrailerToVehicle"
C:\Documents and Settings\Nikola Radosavljevic\Desktop\tow.pwn(23) : error 017: undefined symbol "SendClientMessage"
C:\Documents and Settings\Nikola Radosavljevic\Desktop\tow.pwn(2 : error 017: undefined symbol "SendClientMessage"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


11 Errors.
Reply
#9

you just trying to compile that code I gave, Its just part of code, not full gamemode or filterscript. You need to include it to your current gamemode or filterscript.
Reply
#10

Can you give me full please
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)