Is there a teleport FS using the map for admins?
#1

I've been searching for a teleport FS which allows an admin to hit ESC, go to the map, pinpoint a teleport spot and put in a quick command to go there (like "/go"). If anybody knows of one (or something similar), please link me to it.

If one doesn't exist, it would be a great idea for someone who is looking for a new FS project.
Reply
#2

pawn Код:
#include <zcmd>

new Float: teleportCoordinates[MAX_PLAYERS][3], hasSetTeleport[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
    hasSetTeleport[playerid] = 0;
    return 1;
}

public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ)
{
    teleportCoordinates[playerid][0] = fX, teleportCoordinates[playerid][1] = fY, teleportCoordinates[playerid][2] = fZ;
    hasSetTeleport[playerid] = 1;
    return 1;
}

COMMAND:go(playerid, params[])
{
    if(!hasSetTeleport[playerid]) return 1;
    SetPlayerPos(playerid, teleportCoordinates[playerid][0], teleportCoordinates[playerid][1], teleportCoordinates[playerid][2]);
    return 1;
}
Reply
#3

Is that set for admins only?

Sorry I'm the king of all noobs.
Reply
#4

pawn Код:
#include <zcmd>

new Float: teleportCoordinates[MAX_PLAYERS][3], hasSetTeleport[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
    hasSetTeleport[playerid] = 0;
    return 1;
}

public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ)
{
    if(IsPlayerAdmin(playerid))
    {
        teleportCoordinates[playerid][0] = fX, teleportCoordinates[playerid][1] = fY, teleportCoordinates[playerid][2] = fZ;
        hasSetTeleport[playerid] = 1;
    }
    return 1;
}

COMMAND:go(playerid, params[])
{
    if(!IsPlayerAdmin(playerid) || !hasSetTeleport[playerid]) return 1;
    SetPlayerPos(playerid, teleportCoordinates[playerid][0], teleportCoordinates[playerid][1], teleportCoordinates[playerid][2]);
    return 1;
}
This is set for RCON admins.
Reply
#5

Wow I'll give it a try.

Thanks so much for taking the time to help me out on this.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)