Hi!
I coded a Antilamer plugin for the shit AWP etc. lamer! The version v1.0 and v1.1 works fine but my last coded version (v1.2) dont work. Here is the v1.2 Code, please say me why it crashs the Server when i type amx_lamer eXile in console. Thx! U find the v1.1 version at the new plugins forum here.
v1.2
Code:
#include <amxmodx>
public plugin_init() {
register_plugin("Im a Lamer","1.2","eXile")
register_concmd("amx_lamer","lame",ADMIN_KICK,"<username>")
}
public lame(id) {
if (!(get_user_flags(id)&ADMIN_KICK)) {
console_print(id,"[AMXX] You have no access to that command. You have not the ADMIN_KICK level.")
return PLUGIN_HANDLED
}
if (read_argc() == 0) {
console_print(id,"[AMXX] You must write a Username. Like that: amx_lamer eXile")
return PLUGIN_HANDLED
}
new weapon = get_user_weapon(id)
new lamedplayer = get_user_frags(id)
new user[32], uid
read_argv(1,user,32)
uid = find_player("bh",user)
if (uid == 0) {
console_print(id,"[AMXX] No User with that name founded.")
return PLUGIN_HANDLED
}
client_cmd(uid,"say [AMXX] Im a shit LAMER!!!! Be careful when you see me. | Powered by: eXile's Lamer Plugin for AMXX Mod.")
user_slap(uid,5)
set_hudmessage (255,255,255, 1.0, -1.0, 0, 6.0, 24.0, 0.1, 0.2, 4 )
show_hudmessage(id,"%i is a %i Lamer! Be careful, he lamed %i player.",uid,weapon,lamedplayer)
return PLUGIN_HANDLED
}
Thanks for help!