Raised This Month: $ Target: $400
 0% 

Can somebody make that plugin?!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
iresponsabil
Junior Member
Join Date: Sep 2007
Old 07-20-2008 , 14:34   Can somebody make that plugin?!
Reply With Quote #1

i wanna make a plugin who have inside him blind + kill = banshot

When i use that command:

amx_blind player

in my console apear : Player blinded.

and he is blind.

1. If he is cheater and he make a kill:

a. server make him 2 snapshots with :
-server name
-admin name
-player name
-address where he can be unbanned
-time
-and the reason "kill after blind"

b. server write in my console and then make me a snapshot with my console with that data:
-server name
-admin name
-player name
-address where he can be unbanned
-time
-and the reason "kill after blind"

c. server ban him permanently on he ip address


2. If he is a clear player.

amx_unblind player

in my console apear : Player unblinded

the blind + snapshot + console print + ban are disabled.

--------------------------------

who can make that plugin is the best amxmodx scripter

ps. sorry for my english. i hope u can read my text
iresponsabil is offline
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 07-20-2008 , 16:10   Re: Can somebody make that plugin?!
Reply With Quote #2

Well...in your .sma..at the blind command, put this :
PHP Code:
g_Blinded[target] = true
And :
PHP Code:
public hook_death()
{
new 
killer read_data(1);
if(
g_Blinded[killer])
{
// kill when blinded
}

And don't forget to create :
PHP Code:
new bool:g_Blinded[33]; 
And in plugin_init :
PHP Code:
register_event("DeathMsg","hook_death","a"); 
__________________

anakin_cstrike is offline
iresponsabil
Junior Member
Join Date: Sep 2007
Old 08-17-2008 , 09:15   Re: Can somebody make that plugin?!
Reply With Quote #3

can u make it from me? i don't know scripting
Code:
#include <amxmodx> 
#include <amxmisc> 
#define BLIND  (1<<0)
new PlayerFlags[33]
new gmsgFade
public amx_blind(id, level, cid)
{ 
 if(!cmd_access(id, level, cid, 2))
  return PLUGIN_HANDLED
 new arg[32] 
 read_argv(1, arg, 31) 
 new user = cmd_target(id, arg, 5) 
 if(!user) 
  return PLUGIN_HANDLED
 new authid[16], name2[32], authid2[16], name[32]
 get_user_authid(id, authid, 15)
 get_user_name(id, name, 31)
 get_user_authid(user, authid2, 15)
 get_user_name(user, name2, 31)
 if(PlayerFlags[user] & BLIND)
 {
  console_print(id, "Client ^"%s^" is already blind", name2)
  return PLUGIN_HANDLED
 }
 else
 {
  new bIndex[2]
  bIndex[0] = user
  PlayerFlags[user] += BLIND
  set_task(1.0, "delay_blind", 0, bIndex, 2)
  message_begin(MSG_ONE, gmsgFade, {0,0,0}, user) // use the magic #1 for "one client"  
  write_short(1<<12) // fade lasts this long duration  
  write_short(1<<8) // fade lasts this long hold time  
  write_short(1<<0) // fade type IN 
  write_byte(255) // fade red  
  write_byte(255) // fade green  
  write_byte(255) // fade blue    
  write_byte(255) // fade alpha    
  message_end()
 }
 console_print(id, "Client ^"%s^" blinded", name2) 
 return PLUGIN_HANDLED 
}
public amx_unblind(id, level, cid)
{ 
 if(!cmd_access(id, level, cid, 2)) 
  return PLUGIN_HANDLED
 new arg[32] 
 read_argv(1, arg, 31) 
 new user = cmd_target(id, arg, 5) 
 if(!user)
  return PLUGIN_HANDLED
 new authid[16], name2[32], authid2[16], name[32] 
 get_user_authid(id, authid, 15) 
 get_user_name(id, name, 31) 
 get_user_authid(user, authid2, 15) 
 get_user_name(user, name2, 31)
 
 if(PlayerFlags[user] & BLIND)
 {
  new bIndex[2]
  bIndex[0] = user
  PlayerFlags[user] -= BLIND
  message_begin(MSG_ONE, gmsgFade, {0,0,0}, user) // use the magic #1 for "one client"  
  write_short(1<<12) // fade lasts this long duration  
  write_short(1<<8) // fade lasts this long hold time  
  write_short(1<<1) // fade type OUT 
  write_byte(255) // fade red  
  write_byte(255) // fade green  
  write_byte(255) // fade blue    
  write_byte(255) // fade alpha    
  message_end()
 }
 else
 {
  console_print(id, "Client ^"%s^" is already unblind", name2)
  return PLUGIN_HANDLED
 
 }
 console_print(id, "Client ^"%s^" unblinded", name2) 
 return PLUGIN_HANDLED
}
public screen_fade(id) 
{
 new bIndex[2]
 bIndex[0] = id
 set_task(0.5, "delay_blind", 0, bIndex, 2)
 return PLUGIN_CONTINUE
}
public delay_blind(bIndex[])
{
 new id = bIndex[0]
 if(PlayerFlags[id])
 {
  // Blind Bit  
  message_begin(MSG_ONE, gmsgFade, {0,0,0}, id) // use the magic #1 for "one client" 
  write_short(1<<0) // fade lasts this long duration 
  write_short(1<<0) // fade lasts this long hold time 
  write_short(1<<2) // fade type HOLD 
  write_byte(255) // fade red 
  write_byte(255) // fade green 
  write_byte(255) // fade blue  
  write_byte(255) // fade alpha  
  message_end() 
 }
 return PLUGIN_CONTINUE
}
public plugin_init()
{
 register_plugin("AMX Blind","v1.0","T(+)rget")
 
 gmsgFade = get_user_msgid("ScreenFade") 
 register_event("ScreenFade", "screen_fade", "b")
 register_concmd("amx_blind","amx_blind", ADMIN_BAN, "<authid, nick or #userid>") 
 register_concmd("amx_unblind","amx_unblind", ADMIN_BAN, "<authid, nick or #userid>") 
 register_cvar("amx_show_activity","1")
 return PLUGIN_CONTINUE 
}
iresponsabil is offline
danielkza
AMX Mod X Plugin Approver
Join Date: May 2007
Location: São Paulo - Brasil
Old 08-17-2008 , 09:16   Re: Can somebody make that plugin?!
Reply With Quote #4

Quote:
Originally Posted by iresponsabil View Post
can u make it from me? i don't know scripting
Code:
#include <amxmodx> 
#include <amxmisc> 
#define BLIND  (1<<0)
new PlayerFlags[33]
new gmsgFade
public amx_blind(id, level, cid)
{ 
 if(!cmd_access(id, level, cid, 2))
  return PLUGIN_HANDLED
 new arg[32] 
 read_argv(1, arg, 31) 
 new user = cmd_target(id, arg, 5) 
 if(!user) 
  return PLUGIN_HANDLED
 new authid[16], name2[32], authid2[16], name[32]
 get_user_authid(id, authid, 15)
 get_user_name(id, name, 31)
 get_user_authid(user, authid2, 15)
 get_user_name(user, name2, 31)
 if(PlayerFlags[user] & BLIND)
 {
  console_print(id, "Client ^"%s^" is already blind", name2)
  return PLUGIN_HANDLED
 }
 else
 {
  new bIndex[2]
  bIndex[0] = user
  PlayerFlags[user] += BLIND
  set_task(1.0, "delay_blind", 0, bIndex, 2)
  message_begin(MSG_ONE, gmsgFade, {0,0,0}, user) // use the magic #1 for "one client"  
  write_short(1<<12) // fade lasts this long duration  
  write_short(1<<8) // fade lasts this long hold time  
  write_short(1<<0) // fade type IN 
  write_byte(255) // fade red  
  write_byte(255) // fade green  
  write_byte(255) // fade blue    
  write_byte(255) // fade alpha    
  message_end()
 }
 console_print(id, "Client ^"%s^" blinded", name2) 
 return PLUGIN_HANDLED 
}
public amx_unblind(id, level, cid)
{ 
 if(!cmd_access(id, level, cid, 2)) 
  return PLUGIN_HANDLED
 new arg[32] 
 read_argv(1, arg, 31) 
 new user = cmd_target(id, arg, 5) 
 if(!user)
  return PLUGIN_HANDLED
 new authid[16], name2[32], authid2[16], name[32] 
 get_user_authid(id, authid, 15) 
 get_user_name(id, name, 31) 
 get_user_authid(user, authid2, 15) 
 get_user_name(user, name2, 31)
 
 if(PlayerFlags[user] & BLIND)
 {
  new bIndex[2]
  bIndex[0] = user
  PlayerFlags[user] -= BLIND
  message_begin(MSG_ONE, gmsgFade, {0,0,0}, user) // use the magic #1 for "one client"  
  write_short(1<<12) // fade lasts this long duration  
  write_short(1<<8) // fade lasts this long hold time  
  write_short(1<<1) // fade type OUT 
  write_byte(255) // fade red  
  write_byte(255) // fade green  
  write_byte(255) // fade blue    
  write_byte(255) // fade alpha    
  message_end()
 }
 else
 {
  console_print(id, "Client ^"%s^" is already unblind", name2)
  return PLUGIN_HANDLED
 
 }
 console_print(id, "Client ^"%s^" unblinded", name2) 
 return PLUGIN_HANDLED
}
public screen_fade(id) 
{
 new bIndex[2]
 bIndex[0] = id
 set_task(0.5, "delay_blind", 0, bIndex, 2)
 return PLUGIN_CONTINUE
}
public delay_blind(bIndex[])
{
 new id = bIndex[0]
 if(PlayerFlags[id])
 {
  // Blind Bit  
  message_begin(MSG_ONE, gmsgFade, {0,0,0}, id) // use the magic #1 for "one client" 
  write_short(1<<0) // fade lasts this long duration 
  write_short(1<<0) // fade lasts this long hold time 
  write_short(1<<2) // fade type HOLD 
  write_byte(255) // fade red 
  write_byte(255) // fade green 
  write_byte(255) // fade blue  
  write_byte(255) // fade alpha  
  message_end() 
 }
 return PLUGIN_CONTINUE
}
public plugin_init()
{
 register_plugin("AMX Blind","v1.0","T(+)rget")
 
 gmsgFade = get_user_msgid("ScreenFade") 
 register_event("ScreenFade", "screen_fade", "b")
 register_concmd("amx_blind","amx_blind", ADMIN_BAN, "<authid, nick or #userid>") 
 register_concmd("amx_unblind","amx_unblind", ADMIN_BAN, "<authid, nick or #userid>") 
 register_cvar("amx_show_activity","1")
 return PLUGIN_CONTINUE 
}
Wrong section then, you should post this in the Requests section, you will find better help, and maybe somebody willing to do all the work for you.
danielkza is offline
iresponsabil
Junior Member
Join Date: Sep 2007
Old 08-17-2008 , 09:18   Re: Can somebody make that plugin?!
Reply With Quote #5

ok, my bad, can somebody move that thread on the right section?

Last edited by iresponsabil; 02-07-2009 at 20:55.
iresponsabil is offline
iresponsabil
Junior Member
Join Date: Sep 2007
Old 02-09-2009 , 16:12   Re: Can somebody make that plugin?!
Reply With Quote #6

Code:
 
#include <amxmodx> 
#include <amxmisc> 
#include <fakemeta_util> 
#define BLIND  (1<<0)
new PlayerFlags[33]
new gmsgFade
new bool:g_Blinded[33];  
 
public plugin_init()
{
 register_plugin("AMX Blind + Auto Ban","1.0","razna")
 gmsgFade = get_user_msgid("ScreenFade") 
 register_event("ScreenFade", "screen_fade", "b")
 register_concmd("amx_blindz","amx_blind", ADMIN_KICK, "<authid, nick or #userid> By razna") 
 register_concmd("amx_unblindz","amx_unblind", ADMIN_KICK, "<authid, nick or #userid> By razna") 
 register_cvar("amx_show_activity","1")
 register_event("DeathMsg","hook_death","a");
 return PLUGIN_CONTINUE 
}
 
public amx_blind(id, level, cid)
{ 
 if(!cmd_access(id, level, cid, 2))
  return PLUGIN_HANDLED
 new arg[32] 
 read_argv(1, arg, 31) 
 new user = cmd_target(id, arg, 5) 
 if(!user) 
  return PLUGIN_HANDLED
 new authid[16], name2[32], authid2[16], name[32]
 get_user_authid(id, authid, 15)
 get_user_name(id, name, 31)
 get_user_authid(user, authid2, 15)
 get_user_name(user, name2, 31)
 g_Blinded[user] = true;  
 if(PlayerFlags[user] & BLIND)
 {
  console_print(id, "Client ^"%s^" is already blind", name2)
  return PLUGIN_HANDLED
 }
 else
 {
  new bIndex[2]
  bIndex[0] = user
  PlayerFlags[user] += BLIND
  set_task(1.0, "delay_blind", 0, bIndex, 2)
  message_begin(MSG_ONE, gmsgFade, {0,0,0}, user) // use the magic #1 for "one client"  
  write_short(1<<12) // fade lasts this long duration  
  write_short(1<<8) // fade lasts this long hold time  
  write_short(1<<0) // fade type IN 
  write_byte(255) // fade red  
  write_byte(255) // fade green  
  write_byte(255) // fade blue    
  write_byte(255) // fade alpha    
  message_end()
 
 }
 console_print(id, "Client ^"%s^" blinded", name2) 
 return PLUGIN_HANDLED 
}
public amx_unblind(id, level, cid)
{ 
 if(!cmd_access(id, level, cid, 2)) 
  return PLUGIN_HANDLED
 new arg[32] 
 read_argv(1, arg, 31) 
 new user = cmd_target(id, arg, 5) 
 if(!user)
  return PLUGIN_HANDLED
 new authid[16], name2[32], authid2[16], name[32] 
 get_user_authid(id, authid, 15) 
 get_user_name(id, name, 31) 
 get_user_authid(user, authid2, 15) 
 get_user_name(user, name2, 31)
 
 if(PlayerFlags[user] & BLIND)
 {
  new bIndex[2]
  bIndex[0] = user
  PlayerFlags[user] -= BLIND
  message_begin(MSG_ONE, gmsgFade, {0,0,0}, user) // use the magic #1 for "one client"  
  write_short(1<<12) // fade lasts this long duration  
  write_short(1<<8) // fade lasts this long hold time  
  write_short(1<<1) // fade type OUT 
  write_byte(255) // fade red  
  write_byte(255) // fade green  
  write_byte(255) // fade blue    
  write_byte(255) // fade alpha    
  message_end()
 }
 else
 {
  console_print(id, "Client ^"%s^" is already unblind", name2)
  return PLUGIN_HANDLED
 
 }
 console_print(id, "Client ^"%s^" unblinded", name2) 
 return PLUGIN_HANDLED
}
 
public hook_death()
{
new killer = read_data(1);
if(g_Blinded[killer] & BLIND)
{
 server_cmd("amx_chat %s make frag after blind", (killer))
//commands for kill after blind
}
}  
 
public screen_fade(id) 
{
 new bIndex[2]
 bIndex[0] = id
 set_task(0.5, "delay_blind", 0, bIndex, 2)
 return PLUGIN_CONTINUE
}
public delay_blind(bIndex[])
{
 new id = bIndex[0]
 if(PlayerFlags[id])
 {
  // Blind Bit  
  message_begin(MSG_ONE, gmsgFade, {0,0,0}, id) // use the magic #1 for "one client" 
  write_short(1<<0) // fade lasts this long duration 
  write_short(1<<0) // fade lasts this long hold time 
  write_short(1<<2) // fade type HOLD 
  write_byte(255) // fade red 
  write_byte(255) // fade green 
  write_byte(255) // fade blue  
  write_byte(255) // fade alpha  
  message_end() 
 }
 return PLUGIN_CONTINUE
}

Ok, know i know a littel bit of scripting

I made that plugin, when player is blinded and he make 1 frag, server says with amx_chat "make frag after blind" but, when i unblind him, and he make 1 more frag, server say again "make frag after blind". how can i do when i unblind him, public hook_death() deactivate?

sorry for my bad english again
iresponsabil is offline
Reply


Thread Tools
Display Modes

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 05:35.


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