CMD:goto
#5

pawn Code:
YCMD:gethere(playerid, params[]) {
    new playa;
    if (!sscanf(params, "k<playerLookup_acc>", playa)) {
        if(!IsPlayerConnectEx(playa)) {
            SendClientMessage(playerid, X11_WHITE, "Invalid player!");
            return 1;
        }
        new Float:X,Float:Y,Float:Z,vw,interior;
        GetPlayerPos(playerid, X, Y, Z);
        vw = GetPlayerVirtualWorld(playerid);
        interior = GetPlayerInterior(playerid);
        if(IsPlayerInAnyVehicle(playa)) {
            new carid = GetPlayerVehicleID(playa);
            TPEntireCar(carid, interior, vw);
            LinkVehicleToInterior(carid, interior);
            SetVehicleVirtualWorld(carid, vw);
            SetVehiclePos(carid, X, Y, Z);
        } else {
            SetPlayerPos(playa, X, Y, Z);
            SetPlayerVirtualWorld(playa, vw);
            SetPlayerInterior(playa,interior);
        }
        SendClientMessage(playa, X11_ORANGE, "You have been teleported.");
    } else {
        SendClientMessage(playerid, X11_WHITE,  "USAGE: /gethere [playerid/name]");
    }
    return 1;
}

If you want to make it so they come to you..
The above code..
It's just a reverse of /goto basically.
Reply


Messages In This Thread
CMD:goto - by KamalBa - 10.06.2015, 14:33
Re: CMD:goto - by Prokill911 - 10.06.2015, 14:36
Re: CMD:goto - by KamalBa - 10.06.2015, 14:38
Re: CMD:goto - by DetoNater - 10.06.2015, 14:39
Re: CMD:goto - by Prokill911 - 10.06.2015, 14:39
Re: CMD:goto - by KamalBa - 10.06.2015, 14:41
Re: CMD:goto - by Prokill911 - 10.06.2015, 14:41
Re: CMD:goto - by KamalBa - 10.06.2015, 14:45
Re: CMD:goto - by SpaceX - 10.06.2015, 14:47
Respuesta: Re: CMD:goto - by alexus - 10.06.2015, 17:29

Forum Jump:


Users browsing this thread: 1 Guest(s)