I just made my second script (untested) and it compiles successfully but gives me some errors. The picture of the error is attached to this post and heres the code.
Code:
#include <amxmodx>
public plugin_init() {
register_plugin("kickslay","0.2","amxxsean")
register_concmd("amx_kill","do_kill",ADMIN_KICK," user slays the specified user")
register_concmd("amx_boot","do_boot",ADMIN_KICK," user boots the specified user")
}
public do_kill(id) {
if (!(get_user_flags(id)&ADMIN_KICK)) {
console_print(id,"[AMXX] You do not have access to this command")
return PLUGIN_HANDLED
}
if (read_argc() == 0) {
console_print(id,"[AMXX] You must select a user to slay")
return PLUGIN_HANDLED
}
new user[32], uid
read_argv(1,user,32)
uid = find_player("bh",user)
if (uid == 0) {
console_print(id,"[AMXX] No such user")
return PLUGIN_HANDLED
}
client_cmd(uid,"kill")
client_print(uid,print_chat,"[AMXX] You have been slain by an admin!")
console_print(id,"[AMXX]Player was slain!")
return PLUGIN_HANDLED
}
public do_boot(id) {
if (!(get_user_flags(id)&ADMIN_KICK)) {
console_print(id,"[AMXX] You do not have access to this command")
return PLUGIN_HANDLED
}
if (read_argc() == 0) {
console_print(id,"[AMXX] You must select a user to boot")
return PLUGIN_HANDLED
}
new userboot[32], usid
read_argv(1,userboot,32)
usid = find_player("bh",userboot)
if (usid == 0) {
console_print(id,"[AMXX] No such user")
return PLUGIN_HANDLED
}
client_cmd(usid,"say","IMGAY!BUHBYENOW!")
client_cmd(usid,"disconnect")
console_print(usid,"[AMXX] ADMIN JUST BOOTED YOUR ASS!")
console_print(id,"[AMXX] User booted from server")
return PLUGIN_HANDLED
}