OK, I'm writing my first script but having problems. Here's the code >
Code:
#include <amxmodx>
new PLUGIN[]="Rate_Checker"
new AUTHOR[]="FannyMagnet"
new VERSION[]="1.00"
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_concmd("amx_rc", "cmd_rc", ADMIN_SLAY, "<target> ")
}
public cmd_rc(id) {
new user[32], rate[32], uid
read_argv(1,user,32) // Read first part after command
uid = find_player("bh",user) // Find user
get_user_info(uid, "rate", rate, 31) // Get the rate of the user from UID
client_print (id, print_chat, "Thier rate is %s",rate) // Print the result to the admin
return PLUGIN_HANDLED
}
However, when I run the command it just displays the name of the user. Or sometimes doesn't work at all. Can anyone point me in the right direction. I don't want you to finish it, just tell me where I'm going wrong so I can learn.
Is it something to do with strings and integers? Is the GET_USER_INFO returning an integer or string.
Also, can anyone explain the %s and %d in text outputs? I can't find anything on these but have seen them used, hense me using then in my script.
Thanks in advance.