Teleporting a vehicle with me
#4

Every car have ID.
This is the simple code:
pawn Код:
CMD:goto(playerid,params[])
{
    new toplayerid;
    if(sscanf(params,"r ",toplayerid)) return SendClientMessage(playerid,SYellow,"Usage: /goto <playerid/name> ~To teleport to certain player.");
    else
    {
        new Float:Pos[3];
        GetPlayerPos(toplayerid,Pos[0],Pos[1],Pos[2]);
        if(IsPlayerInAnyVehicle(playerid))
        {
            new vid = GetPlayerVehicleID(playerid);
            SetVehiclePos(vid,Pos[0],Pos[1],Pos[2]);
            PutPlayerInVehicle(playerid,vid);
        }
        else SetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
    }
    return 1;
}
Reply


Messages In This Thread
Teleporting a vehicle with me - by cloudysky - 17.07.2011, 00:39
Re: Teleporting a vehicle with me - by =WoR=Varth - 17.07.2011, 00:42
Re: Teleporting a vehicle with me - by cloudysky - 17.07.2011, 00:46
Re: Teleporting a vehicle with me - by =WoR=Varth - 17.07.2011, 01:19

Forum Jump:


Users browsing this thread: 3 Guest(s)