Raised This Month: $ Target: $400
 0% 

Help with RATE checker


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
fannymagnet
Junior Member
Join Date: Mar 2005
Old 05-08-2005 , 16:30   Help with RATE checker
Reply With Quote #1

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.
fannymagnet is offline
 



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 16:38.


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