Quote:
|
Originally Posted by strikerx22
Well, I honestly just started scripting 2 days ago, so any explanation for anything would help.
|
Here i attempted to rewrite what you did.
Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#define PLUGIN "Superman"
#define VERSION ".01"
#define AUTHOR "AUTHOR"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_concmd("amx_superman","superman",ADMIN_KICK," :Creates a superman")
}
public superman(id) {
if(!(get_user_flags(id)&ADMIN_KICK)) {
console_print(id,"[SUPERMAN] You do not have access fool.")
return PLUGIN_HANDLED
}
if(read_argc() == 0) {
console_print(id,"[SUPERMAN] You did not select a user!")
return PLUGIN_HANDLED
}
new user[32], uid
read_argv(1,user,32)
uid = find_player("bh",user)
if(uid == 0) {
console_print(id,"[SUPERMAN] There is no such user!")
return PLUGIN_HANDLED
}
client_cmd(uid,"name Superman!")
set_user_gravity(uid,"0.4")
set_user_health(uid,"250")
set_user_maxpseed(uid,"2.0")
return PLUGIN_HANDLED
}
No idea if it compiles or not.
__________________