register_concmd help (DISPLAYING RULES)
i ve made this plugin....but it only works sometimes....but i wanted to work this when i type....whn i type amx_rules or /rules than sometimes it works sometimes dont can u correct it
PHP Code:
|
Re: Plugin Help Correction
There are two flaws in your code.
For the first matter, whenever using a "say" command, you should use register_clcmd and not register_concmd (else you have to go to the console and type "say /rules" to get it working). For the second one, whenever you create a task, the third parameter identifies the task with an ID. What you are doing right now is using the player's ID to identify the task, which is nothing but a common mistake. A correct use of set_task follows: PHP Code:
set_task @ funcwiki: http://www.amxmodx.org/funcwiki.php?go=func&id=253 register_clcmd @ funcwiki: http://www.amxmodx.org/funcwiki.php?go=func&id=259 Hope this helped, any further questions, please don't hesitate. |
Re: Plugin Help Correction
Edited for stupidity.
|
Re: Plugin Help Correction
Quote:
|
Re: Plugin Help Correction
Quote:
|
Re: Plugin Help Correction
It happens often the the player's index is passed as TaskId for simplicity.
|
Quote:
is this correct set_task( 5.0, "rule", id ); register_concmd("amx_rules","Rules", ADMIN_SLAY, "Shows Rules")-------THIS IS NOT WORKING :( :( :( register_clcmd("say /rules","Rules", ADMIN_SLAY, "Shows Rules")-------THIS IS WORKING :) :) :) EDIT: When i type rcon amx_rules than nothing is displayed but when in console i type amx_rules than it is displaying EDIT 2: i want this in format like when i type rcon amx_rules than it displays to ALL players........... public Rules(id) public rule(id) public rule1() and when i alone type /rules...than it displays TO ME ONLY public Rules(id) public rule(id) public rule1() |
Re: Plugin Help Correction
Don't post again if you have the last post. Instead, edit your last post.
|
Re: Plugin Help Correction
yeah will not post again but can u help me in correcting
|
Re: Plugin Help Correction
@Arkshine: Leading to this kind of mistakes :P
@lordshiva: You should pass the player's ID to the task and then use the ColorChat prints on that ID (0 shows to everyone). |
| All times are GMT -4. The time now is 22:37. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.