[Help] Teleporting issues.
#3

Try it

pawn Код:
CMD:tp(const playerid, const params[])
{
    new targetid, target[MAX_PLAYER_NAME], Float:x, Float:y, Float:z;
    if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, -1, "Usage: /tp [id]");
    if(u == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "your message here");
    GetPlayerName(targetid, target, sizeof(target)), GetPlayerPos(targetid, x, y, z);
    if(IsPlayerInAnyVehicle(playerid))
    {
        SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(targetid));
        SetPlayerInterior(playerid, GetPlayerInterior(targetid));
        new veh = GetPlayerVehicleID(playerid);
        LinkVehicleToInterior(veh, GetPlayerInterior(targetid));
        SetVehicleVirtualWorld(veh, GetPlayerVirtualWorld(targetid));
        SetVehiclePos(veh, x, y + 5, z + 1);
    }
    else SetPlayerPos(playerid, x, y, z + 1), SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(targetid)), SetPlayerInterior(playerid, GetPlayerInterior(targetid));
    SendClientMessage(targetid, COLOR_WHITE, "An admin teleported to you.");
    return 1;
}
Reply


Messages In This Thread
[Help] Teleporting issues. - by xXRealLegitXx - 27.04.2013, 20:32
Re: [Help] Teleporting issues. - by RVRP - 27.04.2013, 20:38
Re: [Help] Teleporting issues. - by stabker - 27.04.2013, 21:49

Forum Jump:


Users browsing this thread: 1 Guest(s)