Simple Player Teleport (GoTo)
10 Attachment(s)
Description:
This plugin provides a convenient way for players to teleport to one another. When a teleport request is made, a menu is displayed to the target player that will allow them to: Accept Deny Block the individual player Block ALL players Accept all future requests After a request is made, a client enters a cool down period in which they can not request any more teleports until the period has passed. The plugin makes use of admin overrides that will allow admins with a certain flags to bypass client authorization and bypass the cool down period. Admins are able to forcefully bring a player to them, and players can teleport themselves back to their previous location. As of version 1.3.6, admins with ADMFLAG_KICK authorization can ban players from making goto requests. How is this different from other teleport plugins? This plugin offers simple teleport access for non-admins, and also implements an authorization system to prevent unwanted teleports. Has translation support. Allows admins to ban players from using the plugin. Requirements: SDKTools A noblock plugin of your choice PLAYER COMMANDS: sm_goto <player> sm_unblock <player|all> sm_tpb sm_goback ADMIN COMMANDS: By default, these commands are tied to ADMFLAG_KICK. sm_bring <player> sm_goto_ban <player> sm_goto_unban <player> sm_goto_listbans Database Setup GoTo bans are stored using SQLITE. Add the following to addons/sourcemod/configs/databases.cfg Code:
"goto_bans" CVars: gt_cooldowntime 60.0 ||| Time between a player's use of the goto command. gt_target_opposite_team 1 ||| Allow clients to target players of the opposite team. gt_teleport_back_limit 0 ||| Prevent users from teleporting back to their saved location multiple times. The plugin auto-creates a config in cfg/sourcemod/goto.cfg with the above cvars for easy access. This plugin uses Sourcemod's built in admin override system to change command access: How to change command access: Example addons/sourcemod/configs/admin_overrides.cfg Code:
Overrides Changelog:
Spoiler
Credits: johan123jo for helping me with the teleport authorization menu 11530 for his advice on code cleanup Servers using this plugin 766 |
Re: Simple GoTo Command
Could be useful as a achevment server command.
|
Re: Simple GoTo Command
This is awesome.
Any chance you could implement an option to block a user from requesting teleports to you? Preferably in the accept/deny menu as a third option. EDIT: Would also be great if you could add an option to teleport a user to yourself instead of only vice versa. |
Re: Simple GoTo Command
Sure ill work on those suggestions
|
Re: Simple GoTo Command
Updated with MORE FEATURES!
Check OP |
Re: Simple GoTo Command
1.2.0 Released. See changelog.
1.3.0: Added teleport back commands |
Re: Simple GoTo Command
Updated. See changelog.
|
Re: Simple GoTo Command
Looking through this plugin, there are a few things you'd need to update:
|
Re: Simple GoTo Command
1 Attachment(s)
Ok, I think I've addressed all of the above except a couple I need clarification on.
Also, I am using the system of GetUserFlagBits as opposed to the override system because I intended the plugin to be used for regular non-admin players. However, I still want admins to be able to use the plugin a little more efficiently. The override system would effectively make the plugin admin-only, or completely open for use by all players. Using the GetUserFlagBits system I can access the middle ground where normal players can use the plugin, and admins can access it a bit more efficiently. For clarification on some of your suggestions, I am not sure how to implement the GetTime() over using timers for each client. When you recommended using StringToInt on the asker, I assume you meant IntToString? Thanks for the feedback by the way :) |
Re: Simple GoTo Command
You could still use the override system. Just set the general commands to public by default, and employ two overrides such as sm_goto_cooldown and sm_goto_auth which are set to ADMFLAG_KICK and ADMFLAG_ROOT respectively and the server operator can easily override that should the need arise. You'd check whether the client has the privileges necessary using CheckCommandAccess then taking the necessary steps should they have one or both of the overrides.
As for the cooldown, a simple implementation would look like this, though personally I prefer global variables over GetConVarInts etc. PHP Code:
|
All times are GMT -4. The time now is 05:46. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.