Teleport as passenger?
#1

Hi guys. Yesterday I got a simple teleport FS working via the Scoreboard, and here's the current code:

pawn Код:
#define FILTERSCRIPT

#include <a_samp>

public OnFilterScriptInit()
{
    print("\n----------------------------------------------");
    print(" Teleport-to-player via Scoreboard by WizardCM");
    print("----------------------------------------------\n");
    return 1;
}

public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
        new Float:X, Float:Y, Float:Z;
        GetPlayerPos(clickedplayerid, X, Y, Z);
        if (IsPlayerInAnyVehicle(playerid)) SetVehiclePos(GetPlayerVehicleID(playerid), X+5, Y+5, Z);
        else SetPlayerPos(playerid, X+1, Y+1, Z);
        return 1;
}
It works as I want it, so if you are driving it teleports you as well as your car and any passengers. But...

What I'd like to do is the following:

Quote:

When teleporting to someone, check if the other player is in a car.
If they are, check if there are any passenger seats available.
If there are, teleport to their car as a passenger.
Otherwise just teleport normally.

Any help would be greatly appreciated. Thanks in advance!
Reply


Messages In This Thread
Teleport as passenger? - by WizardCM - 22.09.2010, 04:13
Re: Teleport as passenger? - by Kitten - 22.09.2010, 04:35
Re: Teleport as passenger? - by WizardCM - 22.09.2010, 06:37
Re: Teleport as passenger? - by Mauzen - 22.09.2010, 08:57
Re: Teleport as passenger? - by WizardCM - 22.09.2010, 09:23
Re: Teleport as passenger? - by WizardCM - 22.09.2010, 13:21

Forum Jump:


Users browsing this thread: 1 Guest(s)