Raised This Month: $ Target: $400
 0% 

Rates management plugin help...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ThantiK
Senior Member
Join Date: Mar 2004
Location: Orlando, FL
Old 09-19-2004 , 21:29   Rates management plugin help...
Reply With Quote #1

Basically guys, I just need a small bit of help on this plugin...I'm in the middle of it, but I just need some small bits of input.

Code:
#include <amxmodx> #include <amxmisc> public plugin_init() {    register_plugin("Rates Management","0.1b","ThantiK")    register_clcmd("say","check_respond")    register_clcmd("say_team","check_respond") } public check_respond(id,level,cid) {    if (!cmd_access(id,level,cid,2)) return PLUGIN_HANDLED     new firstword[256] //  new plindex     new ping     new loss     read_argv(1,firstword,255) get_user_ping(id, ping, loss) if ((ping > 0)&& (ping < 40)){ client_cmd(id,"Say Hi, I'm using the rate command! 0-40 ping!") } if ((ping > 40)&& (ping < 80)){ client_cmd(id,"Say Hi, I'm using the rate command! 40-80 ping!") } if ((ping > 80)&& (ping < 130)){ client_cmd(id,"Say Hi, I'm using the rate command! 80-130 ping!") } return PLUGIN_CONTINUE }

I can't get it to run the client_cmd part...it doesn't make the client say that (as a test)...

ALSO, how would I find out if the user says "/rates" -- I'm not used to handling string compairs.

and would using read_argv be the right way to go about doing things?...or should I use read_args?
__________________
AMXX -- You want control? You got it.
tkwired.com cs 1.6 -- tkwired.com:27016
ThantiK is offline
Send a message via AIM to ThantiK Send a message via MSN to ThantiK
johnjg75
Veteran Member
Join Date: Mar 2004
Location: Delaware
Old 09-19-2004 , 21:48  
Reply With Quote #2

from the convo on AIM just try this
Code:
#include <amxmodx> #include <amxmisc> public plugin_init() {    register_plugin("Rates Management","0.1b","ThantiK")    register_clcmd("say /rate","check_respond")    register_clcmd("say_team /rate","check_respond") } public check_respond(id) { //    new plindex     new ping     new loss get_user_ping(id, ping, loss) if ((ping > 0)&& (ping < 40)){ client_cmd(id,"Say Hi, I'm using the rate command! 0-40 ping!") } if ((ping > 40)&& (ping < 80)){ client_cmd(id,"Say Hi, I'm using the rate command! 40-80 ping!") } if ((ping > 80)&& (ping < 130)){ client_cmd(id,"Say Hi, I'm using the rate command! 80-130 ping!") } return PLUGIN_CONTINUE }
__________________
johnjg75 is offline
Send a message via AIM to johnjg75 Send a message via MSN to johnjg75 Send a message via Yahoo to johnjg75
ThantiK
Senior Member
Join Date: Mar 2004
Location: Orlando, FL
Old 09-19-2004 , 21:57  
Reply With Quote #3

didn't work.
__________________
AMXX -- You want control? You got it.
tkwired.com cs 1.6 -- tkwired.com:27016
ThantiK is offline
Send a message via AIM to ThantiK Send a message via MSN to ThantiK
Votorx
Senior Member
Join Date: Jun 2004
Old 09-20-2004 , 07:18  
Reply With Quote #4

Eh,
Code:
client_cmd(id,"/say Hi, I'm using the rate command! 40-80 ping!")

I dunno I have a hard time using client_cmd as well.
__________________
Currently Looking for a mod team.
Votorx is offline
Send a message via AIM to Votorx Send a message via MSN to Votorx Send a message via Yahoo to Votorx
Reply


Thread Tools
Display Modes

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 17:11.


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