Raised This Month: $ Target: $400
 0% 

a quick q


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
|OnEHiTwOnDeR|
Member
Join Date: Apr 2007
Location: Los Angeles
Old 06-06-2007 , 17:57   a quick q
Reply With Quote #1

have guys a quick q...i wanna have a say plugin that bring up a motd type window ingame i know how to do that but, i want it to work for /top10 and /topx at the same type but dunno how that would go into a code for both commands to bring up ssame thing or do i need to separate plugins?

this a code id use for it:

Code:
#include <amxmodx>
#include <amxmisc>

public admin_motd(id,level,cid) {

    if (!cmd_access(id,level,cid,1))
    return PLUGIN_CONTINUE
    
    show_motd(id,"top.txt","Stats Info")
    return PLUGIN_CONTINUE   
}

public plugin_init() {

    register_plugin("say /top10","1.1","OneHit")
    register_clcmd("say /top10","admin_motd",0,"- Shows the TOP10 HlStatsX.")
}
__________________
|OnEHiTwOnDeR| is offline
Send a message via AIM to |OnEHiTwOnDeR|
Jenger
Junior Member
Join Date: May 2007
Old 06-07-2007 , 00:42   Re: a quick q
Reply With Quote #2

Two things:

a) Does the code you have work, or are you having problems with it?
b) You can define both clcmds in the same file.

Code:
register_clcmd("say /top10", "Function", 0, " - Description");
register_clcmd("say /topx", "Function, 0, " - Description");
And by the way, the:
if (!cmd_access(id,level,cid,1))
return PLUGIN_CONTINUE
is pointless, because you are giving everybody access to that command, so there's no point in checking if they have access.
__________________
[IMG]http://img299.**************/img299/6947/03nesxf9.gif[/IMG]

[IMG]http://img241.**************/img241/5484/csplayerca4.jpg[/IMG]

[IMG]http://img237.**************/img237/4001/gpubcl1.jpg[/IMG]
Jenger is offline
Reply



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 10:33.


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