Raised This Month: $32 Target: $400
 8% 

Player-Teleport (sm_goto, sm_bring)


Post New Thread Reply   
 
Thread Tools Display Modes
DarthNinja
SourceMod Plugin Approver
Join Date: Mar 2009
Location: PreThinkHook()
Old 01-21-2010 , 23:52   Re: Player-Teleport (sm_goto, sm_bring)
Reply With Quote #11

Quote:
Originally Posted by N!V0XE View Post
tried it, didn't work well...
Search for "blink"
__________________
DarthNinja is offline
DeltaTimo
Member
Join Date: Nov 2009
Old 01-29-2010 , 01:49   Re: Player-Teleport (sm_goto, sm_bring)
Reply With Quote #12

I really like this but if im in a house with a ceiling(xD) ill stuck in the ceiling,
so i wanted to have a "goto" without a "go over the head".
Theres a plugin with saving positions, if another admin saves the position and ill teleport to saved position, i wont go over his head.
__________________
Steam ID: Hund_ohne_Mund

DeltaTimo is offline
HyperKiLLeR
Junior Member
Join Date: Jan 2010
Old 01-30-2010 , 07:41   Re: Player-Teleport (sm_goto, sm_bring)
Reply With Quote #13

Now sm_bring teleports the player to where you are looking at
Maybe I'll change that for sm_goto too, but it may cause some problems.
HyperKiLLeR is offline
psychonic

BAFFLED
Join Date: May 2008
Old 02-15-2010 , 14:26   Re: Player-Teleport (sm_goto, sm_bring)
Reply With Quote #14

@HyperKiLLeR

A few things...

PHP Code:
#include "dbi.inc" 
This is redundant since sourcemod.inc includes <dbi>

PHP Code:
decl MaxPlayersPlayer;
new 
Float:TeleportOrigin[3];
new 
Float:PlayerOrigin[3]; 
"decl" has no advantage for single cells, but can for arrays.
See: http://wiki.alliedmods.net/Introduct...ourcePawn#decl for more info

PHP Code:
decl String:Name[32]; 
For player names, Sourcemod provides a safe MAX_NAME_LENGTH define (which I think is higher than 32. Ex.
PHP Code:
decl String:Name[MAX_NAME_LENGTH+1]; 
PHP Code:
MaxPlayers GetMaxClients();
for(new 
1<= MaxPlayersX++) 
Sourcemod keeps a "MaxClients" global constant so that you don't need to call the GetMaxClients() function. Ex.
PHP Code:
//
for(new 1<= MaxClientsX++) 
Also, you might consider using the ProcessTargetString function instead of manually looping clients and comparing names. This will allow for partial name matches or using userids.
psychonic is offline
titan_rw
Member
Join Date: Sep 2009
Old 03-01-2010 , 19:39   Re: Player-Teleport (sm_goto, sm_bring)
Reply With Quote #15

Hi.

I'm wondering if a feature to automaticaly target all BOTS for sm_bring could be implemented? Right now, I am using "warp_far_survivor_here", but of course it doesn't differentiate human controlled survivors, or AI controlled. I sometimes end up teleporting teammates instead of just bots.

Is something like "sm_bring @bots" possible? Teleporting all survivors that aren't under immediate human control (bots and afk's) to where you are, or where you're looking at?

EDIT:
I guess I should have mentioned this is for L4D.

Thanks.

Last edited by titan_rw; 03-01-2010 at 19:42.
titan_rw is offline
titan_rw
Member
Join Date: Sep 2009
Old 03-03-2010 , 01:22   Re: Player-Teleport (sm_goto, sm_bring)
Reply With Quote #16

Nevermind. I think I figured it out on my own. I have no idea if it was the most optimal way, as I'm very green at coding in sourcemod. It seems to work though. I just took the existing "sm_bring" command and modified it.

If there's anything major wrong, someone let me know. Otherwise, it's working ok.

Changes:

Add the following line to OnPluginStart():
Code:
RegAdminCmd("sb_bring", Command_SBBring, ADMFLAG_SLAY,"Teleport bots to you");

Add the following function:

Code:
public Action:Command_SBBring(Client,args)
{
 
 //Declare:
 decl MaxPlayers
 new Float:TeleportOrigin[3];
 new Float:PlayerOrigin[3];
 MaxPlayers = GetMaxClients();
 for(new X = 1; X <= MaxPlayers; X++)
 {
  //Connected:
  if(!IsClientConnected(X)) continue;
  //Ignore Humans:
  if(!IsFakeClient(X)) continue;
  //Ignore All but team Survivor
  if(GetClientTeam(X) != 2 ) continue;
  GetCollisionPoint(Client, PlayerOrigin);
 
  //Math
  TeleportOrigin[0] = PlayerOrigin[0];
  TeleportOrigin[1] = PlayerOrigin[1];
  TeleportOrigin[2] = (PlayerOrigin[2] + 4);
 
  //Teleport
  TeleportEntity(X, TeleportOrigin, NULL_VECTOR, NULL_VECTOR);
 }
 return Plugin_Handled;
}
titan_rw is offline
DeltaTimo
Member
Join Date: Nov 2009
Old 03-27-2010 , 05:41   Re: Player-Teleport (sm_goto, sm_bring)
Reply With Quote #17

Hello.
Can you please make an command for teleporting to a randomly choosen HUMAN that is in your TEAM?
I Would really thank you
__________________
Steam ID: Hund_ohne_Mund

DeltaTimo is offline
XxDragoNxX
Junior Member
Join Date: Mar 2010
Old 04-12-2010 , 15:19   Re: Player-Teleport (sm_goto, sm_bring)
Reply With Quote #18

Any support still for this mod? Or has the original author gone afk?

Is there is support, can we implement a normal Teleport command AS well as keep the goto and bring?

-Dragon.
XxDragoNxX is offline
REDSCOUT
Member
Join Date: Sep 2009
Old 04-25-2010 , 20:55   Re: Player-Teleport (sm_goto, sm_bring)
Reply With Quote #19

REALLY GOOD PLUGIN
REDSCOUT is offline
thelol182
Junior Member
Join Date: Oct 2010
Old 11-05-2010 , 15:28   Re: Player-Teleport (sm_goto, sm_bring)
Reply With Quote #20

u should add immunity to this works awesome otherwise
thelol182 is offline
Reply


Thread Tools
Display Modes

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 01:42.


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