Thread: Suggestions
View Single Post
Old 08-12-2018   #6067
Rapidgame7
Rookie modder
 
Rapidgame7's Avatar
Default

Quote:
Originally Posted by choalover View Post
Quote:
Originally Posted by gregory_house View Post
Would it be possible to have a way to execute a vanilla command inside a custom one, sort of like the super() action in SOC?


This would be amazing for custom scripts that for example require permissions, for example "ban 5" could first run a check for Terminal permissions if used by a Terminal admin that isn't the host/admin, and if the check is successful then write to the host console; if the player typing it were the host it would call its normal command.


Or "name Sonic" could run a check to see if the player is not muted by a custom script and only then allow players to change their name.


Or many many many other things....
Yes, but you can do this with Lua.
Actually, yes and no.
Yeah, you can go ahead and make a new command, but it would be more accessible if you could just put your cool command on top of an existing one and still call the original command whenever applicable. (EDIT: Thinking about the "name" example, it would be useful to somewhat counter name scripts?)
Nowadays, if you override a command such as "ban", you are no longer able to ban people due to you overriding the command that writes the ban to a file along with pushing the victim off the server.

The ability to call the vanilla variant of an overriden command would be neat, but it would cause problems if multiple scripts were to have different features, people wanted to use both and it happened that the script authors overrode the same commands.
EDIT: But on the other hand, what are the chances?

Quote:
Originally Posted by gregory_house View Post
Or "name Sonic" could run a check to see if the player is not muted by a custom script and only then allow players to change their name.
You already can't change your name while the server has mute enabled. In fact, joiners are stuck with the default "Player #" name.
__________________
Ever tried to start a project until you find out it's too complicated then you abandon it

Last edited by Rapidgame7; 08-12-2018 at 06:51 PM. Reason: added 2 edit
Rapidgame7 is online now   Reply With Quote