AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   a script at ffa with !info command (https://forums.alliedmods.net/showthread.php?t=17800)

crN @ #ratemyhax 09-09-2005 11:21

a script at ffa with !info command
 
hello i tryed all the day to fix a script:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "!info"
#define VERSION "1.0"
#define AUTHOR "Christdus"



public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_plugin ("Christdus" "1.0", "Christdus")
register_clcmd ("say !irc" "say #PurePwnage.dk plz idle and peform :)")
register_clcmd ("say !members" "say Kulip VaX Zark Seek trys")
register_clcmd ("say !cls" "say Kulip and Zark")
register_clcmd("say !info" "say use !irc !members !cl")
}



and all on the server can use the commands plz help me :)

or send the sma file if you can help my my e-mail [email protected]

Xanimos 09-09-2005 13:41

Version 1:If you say !irc, etc.... it will use the appropriate text
Code:
#include <amxmodx> #include <amxmisc> #define PLUGIN "!info" #define VERSION "1.0" #define AUTHOR "Christdus" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR) ;     register_clcmd("say","HandleSay",0); } public HandleSay(id) {     new szText[16] , szSay[100];     read_args(szText , 15);     if( szText[0] != '!' )         return PLUGIN_CONTINUE;     if(equali(szText,"!irc"))         format(szSay , 99 , "#PurePwnage.dk plz idle and peform");     if(equali(szText,"!members"))         format(szSay , 99 , "Kulip VaX Zark Seek trys");     if(equali(szText,"!cls"))         format(szSay , 99 , "Kulip and Zark");     if(equali(szText,"!info"))         format(szSay , 99 , "use !irc !members !cl");     client_cmd(id , "say %s",szSay);     return PLUGIN_HANDLED; }

Version 2: It will replace all instances of !irc, etc.... with the appropriate text.

Code:
#include <amxmodx> #include <amxmisc> #define PLUGIN "!info" #define VERSION "1.0" #define AUTHOR "Christdus" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR) ;     register_clcmd("say","HandleSay",0); } public HandleSay(id) {     new szSay[156];     read_args(szSay , 155);     if( containi(szSay , "!") == -1 )         return PLUGIN_CONTINUE;     if(containi(szSay,"!irc") != -1)         while(replace(szSay , 155 , "!irc" , "#PurePwnage.dk plz idle and peform")) { }     if(containi(szSay,"!members") != -1)         while(replace(szSay , 155 , "Kulip VaX Zark Seek trys") ) { }     if(containi(szSay,"!cls") != -1)         while(replace(szSay , 155 , "Kulip and Zark") ) { }     if(containi(szSay,"!info") != -1)         while(replace(szSay , 155 , "use !irc !members !cl") ) { }     client_cmd(id , "say %s",szSay);     return PLUGIN_HANDLED; }


All times are GMT -4. The time now is 14:31.

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