Raised This Month: $ Target: $400
 0% 

Modify banip command


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
ZooYork
Member
Join Date: Aug 2006
Location: in amxmodx forums
Old 04-11-2007 , 08:16   Modify banip command
Reply With Quote #1

PHP Code:
public cmdBanIP(idlevelcid)
{
 if (!
cmd_access(idlevelcid3))
  return 
PLUGIN_HANDLED
 
 
new target[32], minutes[8], reason[64]
 
 
read_argv(1target31)
 
read_argv(2minutes7)
 
read_argv(3reason63)
 
 new 
player cmd_target(idtarget9)
 
 if (!
player)
  return 
PLUGIN_HANDLED
 
 
new authid[32], name2[32], authid2[32], name[32]
 new 
userid2 get_user_userid(player)
 
 
get_user_authid(playerauthid231)
 
get_user_authid(idauthid31)
 
get_user_name(playername231)
 
get_user_name(idname31)
 
 
log_amx("Ban: ^"%s<%d><%s><>^" ban and kick ^"%s<%d><%s><>^" (minutes ^"%s^") (reason ^"%s^")"nameget_user_userid(id), authidname2userid2authid2minutesreason)
 new 
temp[64], banned[16], nNum str_to_num(minutes)
 if (
nNum)
  
format(temp63"%L"player"FOR_MIN"minutes)
 else
  
format(temp63"%L"player"PERM")
 
format(banned15"%L"player"BANNED")
 new 
address[32]
 
get_user_ip(playeraddress311)
 if (
reason[0])
  
server_cmd("kick #%d ^"%(%%s)^";wait;addip ^"%s^" ^"%s^";wait;writeip"userid2reasonbannedtempminutesaddress)
 else
  
server_cmd("kick #%d ^"%%s^";wait;addip ^"%s^" ^"%s^";wait;writeip"userid2bannedtempminutesaddress)
 new 
activity get_cvar_num("amx_show_activity")
 if (
activity != 0)
 {
  new 
players[32], pnummsg[256], len
  get_players
(playerspnum"c")
 
  for (new 
0pnumi++)
  {
   
len format(msg255"%L"players[i], "ADMIN")
 
   if (
activity == 1)
    
len += copy(msg[len], 255-len":")
   else
    
len += format(msg[len], 255-len" %s:"name)
 
   
len += format(msg[len], 255-len" %L"players[i], "BAN")
   
len += format(msg[len], 255-len" %s "name2)
 
   if (
nNum)
    
format(msg[len], 255-len"%L"players[i], "FOR_MIN"minutes)
   else
    
format(msg[len], 255-len"%L"players[i], "PERM")
 
   
client_print(players[i], print_chat"%s"msg)
  }
 }
 
console_print(id"[AMXX] %L"id"CLIENT_BANNED"name2)
 
 return 
PLUGIN_HANDLED

I need to modify this like this

Code:
Player: zooyork
Time: 30min
Reason: Like this for example (in hudmessage)
i mean instead of print_chat or console.. ;)
__________________
Zoo York Inst. Search! In the
amxmodx forums.
ZooYork is offline
 



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 06:43.


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