SA-MP Forums Archive
Vehicle to me - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Vehicle to me (/showthread.php?tid=512248)



Vehicle to me - NiKi123 - 09.05.2014

Hi,
I would need to vehicle teleported to me and threw me into it.
Now I have only that port into the vehicle.
Could someone do me?
Код:
	if(dialogid == DIALOG_FINDVEHICLE)
	{
		if(response)
		{
			new id;
			sscanf(inputtext[4], "d", id);
			if(IsValidVehicle(id))
			{
				PutPlayerInVehicle(playerid, VehicleID[id], 0);
				SendClientMessage(playerid, COLOR_WHITE, "Portol si sa do vozidla");
			}
		}
		return 1;
	}



Re: Vehicle to me - Nathan_Taylor - 09.05.2014

Quote:
Originally Posted by NiKi123
Посмотреть сообщение
Hi,
I would need to vehicle teleported to me and threw me into it.
Now I have only that port into the vehicle.
Could someone do me?
Код:
	if(dialogid == DIALOG_FINDVEHICLE)
	{
		if(response)
		{
			new id;
			sscanf(inputtext[4], "d", id);
			if(IsValidVehicle(id))
			{
				PutPlayerInVehicle(playerid, VehicleID[id], 0);
				SendClientMessage(playerid, COLOR_WHITE, "Portol si sa do vozidla");
			}
		}
		return 1;
	}
pawn Код:
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
    return 1;
}
    if(dialogid == DIALOG_FINDVEHICLE)
    {
        if(response)
        {
            new id;
            sscanf(inputtext[4], "d", id);
            if(IsValidVehicle(id))
            {
                new
                    Float: X,
                    Float: Y,
                    Float: Z;

                GetPlayerPos(playerid, X, Y, Z);
                SetVehiclePos(VhicleID[id], X, Y, Z);

                PutPlayerInVehicle(playerid, VehicleID[id], 0);
                SendClientMessage(playerid, COLOR_WHITE, "Portol si sa do vozidla");
            }
        }
        return 1;
    }



Re: Vehicle to me - Beckett - 09.05.2014

pawn Код:
if(dialogid == DIALOG_FINDVEHICLE)
    {
        if(response)
        {
            new id;
            sscanf(inputtext[4], "d", id);
            if(IsValidVehicle(id))
            {
                new Float:pX,Float:pY,Float:pZ;
                GetPlayerPos(playerid,pX,pY,pZ);
                SetVehiclePos(id,pX,pY,pZ);
                PutPlayerInVehicle(playerid, VehicleID[id], 0);
                SendClientMessage(playerid, COLOR_WHITE, "Portol si sa do vozidla");
            }
        }
        return 1;
    }
Like this, I guess?


Re: Vehicle to me - NiKi123 - 10.05.2014

Works thank you very much Nathan_Taylor.
But thank you for the efforts DaniceMcHarley but it was me.