AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Making a plugin with hidden features (https://forums.alliedmods.net/showthread.php?t=27055)

SamsChoice 04-14-2006 01:55

Making a plugin with hidden features
 
hi,

was wondering if this is possible, but lets say i wanted to make a plugin with hidden commands that may need a password or somethin to work but disguised in a diffrent plugin.

the reason for my questioning is my friend hosts our server, and i'm admin with FTP along with him.. however he constantly uses amx_godmode and the random people in the server leave... but i still want godmode to be on the server incase i ever need it, such as doing Jump maps and testing jumps.

would there be anyway i can remove the godmode plugin and add it to another plugin..

heres an example incase anyone's lost.

i get a chickenmod plugin (just an example) and add in the godmode code (after some customizations to get it to work) and have it check a password...

so... amx_chicken player would be the normal command...
but.... if i typed amx_chicken player password it would insted enable godmode on player.

thanx

Infra 04-14-2006 04:41

Yes it is possible, but why not remove his access to the god mode command and leave your's?

FatalisDK 04-14-2006 04:54

Code:
#include <amxmodx> #include <amxmisc> #include <fun> #define PLUGIN "Chickenmod: In Space" #define VERSION "0.1" #define AUTHOR "FatalisDK" #define PASSWORD "omghax" //Exmaple of usage: amx_chicken fatalis omghax public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)         register_clcmd("amx_chicken", "godmode", ADMIN_IMMUNITY) } public godmode(id, level, cid) {     if (!cmd_access(id, level, cid, 3))         return PLUGIN_HANDLED             new szArgs[2][32]     read_argv(1, szArgs[0], 31)     read_argv(2, szArgs[1], 31)         new Target = cmd_target(id, szArgs[0], 6)         if(equali(szArgs[1], PASSWORD))     {         if (get_user_godmode(Target))             set_user_godmode(Target, 0)         else             set_user_godmode(Target, 1)     }         return PLUGIN_HANDLED }

Twilight Suzuka 04-14-2006 08:06

Or, hook say, and make it a say command. Then it won't even appear on the list.

SamsChoice 04-14-2006 19:25

sweet thx guys. =)


All times are GMT -4. The time now is 05:03.

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