Raised This Month: $51 Target: $400
 12% 

Teleport Mod


Post New Thread Reply   
 
Thread Tools Display Modes
ohnoes
New Member
Join Date: Aug 2009
Location: pt
Old 08-27-2009 , 13:10   Re: Teleport Mod
Reply With Quote #11

looks good, i run a server with several type of maps, and when was played a climb map or etc i had to install the plugin then erase it when was ctf ot etcnow i can do it via console : )
Awsome would be to have a plugin like this that would load and unload acording to map played
ohnoes is offline
Remy Lebeau
Senior Member
Join Date: Dec 2009
Location: Sydney, Australia
Old 12-07-2009 , 18:01   Re: Teleport Mod
Reply With Quote #12

Hi,

I'm a bit confused... There are three different files linked in this thread (including two different ones just in the top post)?

The two older versions, that only have the "say" commands, work really well for us. However the new one (with the console commands) doesn't work at all, either through console or say. This is the one we'd really like to work! Help?


EDIT: Never mind, I had the cvar set to 0 :-) However, it would still be good to update the version info in the latest version, edit the OP to include the latest. Also, there's a typo in the latest version, it says "c_Enabled = CreateConVar("sm_teleport_enable", "0", "<0/1> Enable RTD");" I assume that should be "Enable Teleport" or something...

Last edited by Remy Lebeau; 12-07-2009 at 18:17.
Remy Lebeau is offline
Skyrider
AMX Mod X Beta Tester
Join Date: May 2005
Location: Netherlands
Old 12-24-2009 , 04:09   Re: Teleport Mod
Reply With Quote #13

Wanted to share this plugin can be abused.. I've private messaged you the glitch.
__________________
Skyrider is offline
Send a message via AIM to Skyrider Send a message via MSN to Skyrider Send a message via Yahoo to Skyrider
choch
New Member
Join Date: Aug 2009
Old 01-05-2010 , 08:33   Re: Teleport Mod
Reply With Quote #14

(i'm not the original author btw)

Made a few changes from what i added above. It should now clear your location when you switch teams, and not let you teleport when dead.
Attached Files
File Type: sp Get Plugin or Get Source (teleport_mod.sp - 865 views - 2.1 KB)

Last edited by choch; 01-13-2010 at 12:24.
choch is offline
Horsedick
AlliedModders Donor
Join Date: Sep 2011
Old 08-23-2012 , 16:12   Re: Teleport Mod
Reply With Quote #15

Anyone know of a way in this to block a user from using it Spec mode to lock or !saveloc a position then spawn to follow up with !teleport? I have players doing this to positions in a rather large achievement map it seems and I'd rather they figure out how to get to those other locations on their own.
Horsedick is offline
Horsedick
AlliedModders Donor
Join Date: Sep 2011
Old 08-24-2012 , 18:55   Re: Teleport Mod
Reply With Quote #16

uggg nvm that didn't make sense.

Last edited by Horsedick; 08-24-2012 at 19:02. Reason: made no sense
Horsedick is offline
Scipizoa
Senior Member
Join Date: Aug 2012
Location: ask me
Old 06-02-2013 , 12:09   Re: Teleport Mod
Reply With Quote #17

is it me or does this plugin not work with overides??
__________________

ZaBaGaBe Gaming Community: http://steamcommunity.com/groups/ZBGB
Scipizoa is offline
thetwistedpanda
Good Little Panda
Join Date: Sep 2008
Old 06-02-2013 , 12:39   Re: Teleport Mod
Reply With Quote #18

It does not. The code below will however, and I fixed a potential bug where spectators/dead could save locations...

Compiler: http://www.sourcemod.net/compiler.php
PHP Code:
#include <sourcemod>
#include <sdktools>

#define PL_VERSION "1.0"

new bool:g_bLocation[MAXPLAYERS 1];
new 
Float:g_fLocation[MAXPLAYERS 1][3];

public 
Plugin:myinfo 
{
    
name "Teleport Mod",
    
author "Dean Poot",
    
description "Teleport Mod - This mod is ment to be used on jump servers so players can save there location using !saveloc and teleport to there location using !teleport",
    
version PL_VERSION,
    
url "http://veedev.com.au"
}

public 
OnPluginStart()
{
    
CreateConVar("teleport_mod_version"PL_VERSION"Teleport Mod"FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY);

    
RegAdminCmd("sm_saveloc"Command_SaveADMFLAG_KICK"");
    
RegAdminCmd("sm_teleport"Command_TeleportADMFLAG_KICK"");
}

public 
OnClientPutInServer(client)
{
    
g_bLocation[client] = false;
    for(new 
0<= 2i++)
        
g_fLocation[client][i] = 0.0;
}


public 
Action:Command_Save(clientargs)
{
    if(
client)
    {
        if(!
IsPlayerAlive(client) || GetClientTeam(client) <= 1)
            
PrintToChat(client"You cannot do that right now.");
        else
        {
            
g_bLocation[client] = true;
            
GetClientAbsOrigin(clientg_fLocation[client]);
            
            
PrintToChat (client"Your location has been saved");
        }
    }
    
    return 
Plugin_Handled;
}

public 
Action:Command_Teleport(clientargs)
{
    if(
client)
    {
        if(!
g_bLocation[client])
            
PrintToChat (client"You have not saved a location");
        else if(!
IsPlayerAlive(client) || GetClientTeam(client) <= 1)
            
PrintToChat(client"You cannot do that right now.");
        else
        {
            
PrintToChat (client"You have been teleported");
            
TeleportEntity(clientg_fLocation[client], NULL_VECTORNULL_VECTOR);
        }
    }

__________________

Last edited by thetwistedpanda; 06-02-2013 at 12:43.
thetwistedpanda is offline
Scipizoa
Senior Member
Join Date: Aug 2012
Location: ask me
Old 06-02-2013 , 12:56   Re: Teleport Mod
Reply With Quote #19

thank you very much :0
__________________

ZaBaGaBe Gaming Community: http://steamcommunity.com/groups/ZBGB
Scipizoa is offline
ArchangelGabriel
Member
Join Date: Jan 2014
Location: United States
Old 03-24-2014 , 22:08   Re: Teleport Mod
Reply With Quote #20

Quote:
Originally Posted by thetwistedpanda View Post
It does not. The code below will however, and I fixed a potential bug where spectators/dead could save locations...

Compiler: http://www.sourcemod.net/compiler.php
PHP Code:
#include <sourcemod>
#include <sdktools>

#define PL_VERSION "1.0"

new bool:g_bLocation[MAXPLAYERS 1];
new 
Float:g_fLocation[MAXPLAYERS 1][3];

public 
Plugin:myinfo 
{
    
name "Teleport Mod",
    
author "Dean Poot",
    
description "Teleport Mod - This mod is ment to be used on jump servers so players can save there location using !saveloc and teleport to there location using !teleport",
    
version PL_VERSION,
    
url "http://veedev.com.au"
}

public 
OnPluginStart()
{
    
CreateConVar("teleport_mod_version"PL_VERSION"Teleport Mod"FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY);

    
RegAdminCmd("sm_saveloc"Command_SaveADMFLAG_KICK"");
    
RegAdminCmd("sm_teleport"Command_TeleportADMFLAG_KICK"");
}

public 
OnClientPutInServer(client)
{
    
g_bLocation[client] = false;
    for(new 
0<= 2i++)
        
g_fLocation[client][i] = 0.0;
}


public 
Action:Command_Save(clientargs)
{
    if(
client)
    {
        if(!
IsPlayerAlive(client) || GetClientTeam(client) <= 1)
            
PrintToChat(client"You cannot do that right now.");
        else
        {
            
g_bLocation[client] = true;
            
GetClientAbsOrigin(clientg_fLocation[client]);
            
            
PrintToChat (client"Your location has been saved");
        }
    }
    
    return 
Plugin_Handled;
}

public 
Action:Command_Teleport(clientargs)
{
    if(
client)
    {
        if(!
g_bLocation[client])
            
PrintToChat (client"You have not saved a location");
        else if(!
IsPlayerAlive(client) || GetClientTeam(client) <= 1)
            
PrintToChat(client"You cannot do that right now.");
        else
        {
            
PrintToChat (client"You have been teleported");
            
TeleportEntity(clientg_fLocation[client], NULL_VECTORNULL_VECTOR);
        }
    }

Great job! However, for some reason not only on yours but other teleport plugins, if you switch teams and save your location, then if you teleport, it will teleport you to the same location from when you switched teams.

Problems with this: getting into one team's spawn at the end of rounds.

Anyway to fix that?
__________________
ArchangelGabriel is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:53.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode