Is there a teleport FS using the map for admins? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Is there a teleport FS using the map for admins? (
/showthread.php?tid=335437)
Is there a teleport FS using the map for admins? -
Incog_Nito - 18.04.2012
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.
Re: Is there a teleport FS using the map for admins? -
SuperViper - 18.04.2012
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;
}
Re: Is there a teleport FS using the map for admins? -
Incog_Nito - 18.04.2012
Is that set for admins only?
Sorry I'm the king of all noobs.
Re: Is there a teleport FS using the map for admins? -
SuperViper - 18.04.2012
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.
Re: Is there a teleport FS using the map for admins? -
Incog_Nito - 18.04.2012
Wow I'll give it a try.
Thanks so much for taking the time to help me out on this.