ResitaZone

...:::Resita Cs 1.6 Server:::...
 
HomeFAQSearchRegisterMemberlistUsergroupsLog in

Share | 
 

 amx_slay & amx_slayteam

Go down 
AuthorMessage
TeArS_AngeL
Site Moderator
Site Moderator
avatar

Posts : 184
Join date : 2008-01-16
Location : Undeva Departe

PostSubject: amx_slay & amx_slayteam   Fri Feb 08, 2008 3:00 pm

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

#define PLUGIN "New Plugin"
#define VERSION "1.0"
#define AUTHOR "Anakin"

#define ACCESS ADMIN_SLAY

public plugin_init() {
  register_plugin(PLUGIN, VERSION, AUTHOR)
 
  register_concmd("amx_slay","slay_cmd",ACCESS,"<amx_slay <player> - kill a player")

}


public slay_cmd(id,level,cid) {
 
  if(!(get_user_flags(id) & ACCESS))
  {
      console_print(id,"No Access !")
      return PLUGIN_HANDLED
  }
 
  new arg[24]
  read_argv(id,arg,23)

  new name[32]
  get_user_name(id,name,31)
 
  if (arg[0] == '@'){
     
      new Team = 0
     
      if (equali(arg[1], "CT")){
       
        Team = 2
       
      } else if (equali(arg[1], "T")){
       
        Team = 1
       
      }
     
      new players[32], num
      get_players(players, num)
     
      new i
      for (i=0; i<num; i++){
       
        if (!Team){
           
            user_kill(players[i])
           
        } else {
           
            if (get_user_team(players[i]) == Team){
             
              user_kill(players[i])
             
            }
        }
      }
  } else {
     
      new player = cmd_target(id,arg,5)
     
      if(!player){
       
        client_print(id,print_console,"Player %s not found !",arg)
        return PLUGIN_HANDLED
       
      } else {
       
        user_kill(player)
        client_print(0,print_chat,"%s has kill player %s !",name,arg)

      }
  }
 
  client_cmd(0,"spk thunder.wav")
 
  return PLUGIN_HANDLED
 
}


public plugin_precache() {
 
  precache_sound("sound/ambience/thunder_clap.wav")
 
}

Se pune tot in notepad dupa care se salveaza si se adauga extensia .sma dupa care il compilati

Comenzi :



Code:
amx_slay <player>

-> un singur jucator



Code:
amx_slay @T

-> echipa Terrorists



Code:
amx_slay @CT

->echipa CT

Mersi anticipat anakin_cstrike

_________________
CITITI REGULILE FORUMULUI


SI NU O SA MAI FIE LA FEL PUR SI SIMPLU.BAIETZII SUNT BAIETZI SI FEMEILE SUNT...HEY
Back to top Go down
View user profile
e chiar JoKeR?
Main Admin
Main Admin


Posts : 70
Join date : 2008-01-16

PostSubject: Re: amx_slay & amx_slayteam   Sat Feb 09, 2008 12:46 am

o sa ii propun la show sa vedem ce spune jocolor
Back to top Go down
View user profile
TeArS_AngeL
Site Moderator
Site Moderator
avatar

Posts : 184
Join date : 2008-01-16
Location : Undeva Departe

PostSubject: Re: amx_slay & amx_slayteam   Sat Feb 09, 2008 5:28 pm

Eu zic ca e necesar sa se puna asa ceva pentru ca asa se pot respecta regulile care sunt zise de admin Twisted Evil

_________________
CITITI REGULILE FORUMULUI


SI NU O SA MAI FIE LA FEL PUR SI SIMPLU.BAIETZII SUNT BAIETZI SI FEMEILE SUNT...HEY
Back to top Go down
View user profile
Sponsored content




PostSubject: Re: amx_slay & amx_slayteam   

Back to top Go down
 
amx_slay & amx_slayteam
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
ResitaZone :: ...:::Pluginuri:::... :: <===Tutoriale Pluginuri Si Harti===>-
Jump to: