This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

REQ: Chat Commands Plugin.


Post New Thread Reply   
 
Thread Tools Display Modes
MajeStik
Member
Join Date: Jun 2009
Old 06-19-2009 , 02:24   Re: REQ: Chat Commands Plugin.
Reply With Quote #141

I want this plugin just a few commands.All comands will be with "!" in front.
Like this:

!ready - start match (Apply the setings & display this message in chat: Match will start in : 5 4 3 2 1)
!stop - stop the match (Apply the settings for a normal game & display this message in chat : Match is over & team scores )
After 15 rounds a hud message will be displayed : 1'st half end.Please switch your team now !
!ready2 - to start second half (Apply the settings like !start command & display this message in chat repare for second Hlaf.
Second Half has started)
!score - display the score (the counting will start after !start comand)
!demo "name" (Chat message only for that player - A demo starts on you.After match please type Stop in your console)
!cancel - Cancel the match (Apply the settings like !stop command & display this message in chat : Match has cancelled)
!warmup - start warmup rounds (Apply the settings for Warmup & display this message in chat : Warmup rounds has started)

I have a similar plugin but I want that optimizations:

Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Invision war"
#define VERSION "1.0"
#define AUTHOR "Cyber-Zone"

new authid[32],name[32];

public plugin_init() {
   register_plugin(PLUGIN, VERSION, AUTHOR)
   register_concmd("say !ready","ready",ADMIN_KICK,"<Invision War> -Incepe un meci!")
   register_concmd("say !stop","stop",ADMIN_KICK,"<Invision War> -Opreste un meci")
   register_concmd("say !restart","rr",ADMIN_KICK,"<Invision War> -Da 3 Restart-uri")
   register_concmd("say !warmup","warmup",ADMIN_KICK,"<Invision War> Setari Pentru incalzire")
   register_concmd("say !ready2","ready2",ADMIN_KICK,"<Invision War> Incepe repriza 2")
   register_concmd("say !lame","lame",ADMIN_KICK,"<Invision War> Knife Round")
   register_concmd("say !demo","demo",ADMIN_KICK,"<name> - takes a demo of a client")
   register_concmd("say !stopdemo","stopdemo",ADMIN_KICK,"<name> - stops the demo taken")
   register_concmd("amx_pass","pass", ADMIN_KICK, "-<Invision War> Seteaza o parola serverului")
   register_concmd("amx_nopass","nopass", ADMIN_KICK, "<Invision War> A scos parola serverului")
   register_concmd("say !pass","pass",ADMIN_KICK,"<parola> -Seteaza parola la server")
   register_concmd("say !nopass","nopass",ADMIN_KICK,"<Invision War> -Scoate parola ")
  }
   
public ready(id,level,cid){
   if(!cmd_access(id,level,cid,1))
      return PLUGIN_HANDLED;

   server_cmd("mp_friendlyfire 1");
   server_cmd("mp_roundtime 1.75");
   server_cmd("mp_freezetime 10");
   server_cmd("mp_limitteams 0");
   server_cmd("mp_autoteambalance 0");
   server_cmd("mp_timelimit 0");
   server_cmd("mp_autokill 0");
   server_cmd("mp_buytime 0.25");
   server_cmd("mp_startmoney 800");
   server_cmd("sv_restart 1");
   server_cmd("sv_restart 2");
   server_cmd("sv_restart 5");
   server_cmd("sv_password war123");
   server_cmd("say Incepe meciul!");
   server_cmd("say Incarc setarile Invision War...");
   server_cmd("say Setari incarcate cu succes !");
   server_cmd("say GL & HF");
   server_cmd("say Meciul este LIVE !!!");
   
   return PLUGIN_HANDLED;
}
public  stop(id,level,cid){
   if(!cmd_access(id,level,cid,1))
      return PLUGIN_HANDLED;
   
   server_cmd("sv_restart 1");
   server_cmd("amx_nopass");
   server_cmd("mp_friendlyfire 0");
   server_cmd("mp_freezetime 0");
   server_cmd("mp_roundtime 3");
   server_cmd("say Meciul s-a terminat");
   server_cmd("say Contact owner xeqtr_method");
   server_cmd("say Vizitati www.Cyber-Zone.Forumer.Ro");
   server_cmd("say Mod created by MajeStik");
   
   return PLUGIN_HANDLED;
}

public  rr(id,level,cid){
   if(!cmd_access(id,level,cid,1))
      return PLUGIN_HANDLED;

   server_cmd("sv_restart 1");
   server_cmd("sv_restart 2");
   server_cmd("sv_restart 5");
   server_cmd("say Restart LIVE! GL & HF");
   server_cmd("say Restart LIVE! GL & HF");

   return PLUGIN_HANDLED;
}
public  warmup(id,level,cid){
   if(!cmd_access(id,level,cid,1))
      return PLUGIN_HANDLED;

   server_cmd("sv_restart 1");
   server_cmd("mp_friendlyfire 0");
   server_cmd("mp_freezetime 0");
   server_cmd("mp_roundtime 3");
   server_cmd("mp_buytime 3");
   server_cmd("mp_startmoney 16000");
   server_cmd("say Runde de incalzire");
   server_cmd("say Incarc setarile Invision Warmup...");
   server_cmd("say Setari incarcate cu succes !");
   server_cmd("say Rundele de incalzire pot incepe !");
   
   return PLUGIN_HANDLED;
   
}
public ready2(id,level,cid){
   if(!cmd_access(id,level,cid,1))
      return PLUGIN_HANDLED;

   server_cmd("mp_friendlyfire 1");
   server_cmd("mp_roundtime 1.75");
   server_cmd("mp_freezetime 10");
   server_cmd("mp_limitteams 0");
   server_cmd("mp_autoteambalance 0");
   server_cmd("mp_timelimit 0");
   server_cmd("mp_autokill 0");
   server_cmd("mp_buytime 0.25");
   server_cmd("mp_startmoney 800");
   server_cmd("sv_restart 1");
   server_cmd("sv_restart 2");
   server_cmd("sv_restart 5");
   server_cmd("say Pregatiti-va de repriza a 2-a!");
   server_cmd("say GL & HF");
   server_cmd("say A inceput repriza a 2-a!");
   server_cmd("say Meciul este LIVE !!!");


   return PLUGIN_HANDLED
}
public lame(id,level,cid){
   if(!cmd_access(id,level,cid,1))
      return PLUGIN_HANDLED;

   server_cmd("mp_roundtime 1.75");
   server_cmd("mp_friendlyfire 1");
   server_cmd("mp_startmoney 800");
   server_cmd("sv_restart 1");
   server_cmd("sv_restart 3");
   server_cmd("mp_freeztime 2");
   server_cmd("say Runda de Lame !");
   server_cmd("say Incarc setarile Invision Knife...");
   server_cmd("say Setari incarcate cu succes !");
   server_cmd("say Runda de Lame a inceput");
   
   return PLUGIN_HANDLED;
}

public demo(id,level,cid){
   if(!cmd_access(id,level,cid,2))
      return PLUGIN_HANDLED;
     
   new cmd[32], mapname[32], name[32], time[32], name2[32]
   read_argv(1, cmd, 31);
   new player = cmd_target(id, cmd, 5);
   if(!player)
      return PLUGIN_HANDLED;
   get_time("%m/%d/%Y - %H:%M:%S",time,31)
   get_user_name(player,name,31)
   get_user_name(id,name2,31)
   get_mapname(mapname,31)
   client_cmd(player,"record %s_%s.dem",name,mapname)
   client_print(id,print_console,"You started Demo on %s, Time: %s",name,time)
   log_amx("%s a pornit un demo pe %s, Time %s",name, name2,time)
   return PLUGIN_HANDLED;
}

public stopdemo(id,level,cid){
   if(!cmd_access(id,level,cid,2))
      return PLUGIN_HANDLED;
     
   new cmd[32], name[32], time[32], name2[32]
   read_argv(1, cmd, 31);
   new player = cmd_target(id, cmd, 5);
   if(!player)
      return PLUGIN_HANDLED;
   get_time("%m/%d/%Y - %H:%M:%S",time,31)
   get_user_name(player,name,31)
   get_user_name(id,name2,31)
   client_cmd(player,"stop")
   client_print(id,print_console,"Ai oprit demo pe %s, Time: %s",name,time)
   log_amx("%s a pornit demo pe %s, Time %s",name, name2,time)
   return PLUGIN_HANDLED;
}
public pass(id, level, cid)
{
   if(!cmd_access(id, level, cid, 1))
      return PLUGIN_HANDLED

   new cmd[32], password[128]
   read_argv(0, cmd, 31)
   read_args(password, 127)
   replace(password, 127, cmd, "")
   format(password, 127, "%s", password)

   get_user_name(id, name, 31)
   get_user_authid(id, authid, 31)
   switch(get_cvar_num("amx_show_activity")) {
      case 2: client_print(0,print_chat,"%s a setat parola serverului",name)
      case 1: client_print(0,print_chat,"O parola a fost setata")
   }
   log_amx("Cmd: ^"%s<%d><%s>^" a setat parola serverului in %s",name,get_user_userid(id),authid,password)
   set_cvar_string("sv_password", password)
   return PLUGIN_HANDLED
}

public nopass(id, level, cid)
{
   if(!cmd_access(id, level, cid, 1))
      return PLUGIN_HANDLED

   get_user_name(id, name, 31)
   get_user_authid(id, authid, 31)
   switch (get_cvar_num("amx_show_activity")) {
      case 2: client_print(0,print_chat,"<Invision_War> Parola serverului a fost scoasa",name)
      case 1: client_print(0,print_chat,"<invision_War> Parola serverului a fost scoasa")
   }
   log_amx("Cmd: ^"%s<%d><%s>^" a scos parola serverului", name,get_user_userid(id),authid)
   set_cvar_string("sv_password", "")
   return PLUGIN_HANDLED
}
If you can do this for me I really appreciate
MajeStik is offline
Scherzo
Senior Member
Join Date: Feb 2007
Location: Kwidzyn, Poland
Old 06-19-2009 , 12:54   Re: REQ: Chat Commands Plugin.
Reply With Quote #142

In Gather-Plugin.sma
Code:
public chatFilter(id) {
    new message[128];
    read_argv(1, message, 127);
    for(new i=0;i<sizeof(g_cmds);i++) {
        new cmd[33];
        formatex(cmd,32,".%s",g_cmds[i]);
change to
Code:
public chatFilter(id) {
    new message[128];
    read_argv(1, message, 127);
    for(new i=0;i<sizeof(g_cmds);i++) {
        new cmd[33];
        formatex(cmd,32,"!%s",g_cmds[i]);
Scherzo is offline
MajeStik
Member
Join Date: Jun 2009
Old 06-19-2009 , 14:54   Re: REQ: Chat Commands Plugin.
Reply With Quote #143

How can i change the command "stop" in command "ready" ?
MajeStik is offline
The_Ghost
Senior Member
Join Date: Jun 2006
Location: RoMaNiA
Old 06-20-2009 , 04:19   Re: REQ: Chat Commands Plugin.
Reply With Quote #144

Quote:
Originally Posted by Trafalete View Post
hmm...but if you want to use this on multiple servers at once, you should have sql support not ini
SQL support is ok. only someone to make this mod.
__________________
We live in a world where PIZZA arrives faster than the Police !
The_Ghost is offline
Send a message via Skype™ to The_Ghost
MajeStik
Member
Join Date: Jun 2009
Old 06-20-2009 , 07:33   Re: REQ: Chat Commands Plugin.
Reply With Quote #145

Anyone tell me how can I change the command "start" in command "ready" ?
MajeStik is offline
Scherzo
Senior Member
Join Date: Feb 2007
Location: Kwidzyn, Poland
Old 06-20-2009 , 15:13   Re: REQ: Chat Commands Plugin.
Reply With Quote #146

MajeStik look at list on begin of code
Scherzo is offline
MajeStik
Member
Join Date: Jun 2009
Old 06-20-2009 , 15:22   Re: REQ: Chat Commands Plugin.
Reply With Quote #147

Ai made it sorry I gues I was blind
MajeStik is offline
MajeStik
Member
Join Date: Jun 2009
Old 06-21-2009 , 14:47   Re: REQ: Chat Commands Plugin.
Reply With Quote #148

How can I made this plugin to not show the server name?
MajeStik is offline
MajeStik
Member
Join Date: Jun 2009
Old 06-22-2009 , 04:11   Re: REQ: Chat Commands Plugin.
Reply With Quote #149

Can you add another command ? !teams to see the teams..
MajeStik is offline
MajeStik
Member
Join Date: Jun 2009
Old 06-22-2009 , 04:14   Re: REQ: Chat Commands Plugin.
Reply With Quote #150

can you add another command? !teams to see the teams...
MajeStik is offline
Reply



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 12:47.


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