Raised This Month: $ Target: $400
 0% 

Plugin to show owner


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
m.touqeerafzal
Member
Join Date: May 2013
Old 07-15-2013 , 12:16   Plugin to show owner
Reply With Quote #1

can any one plz help me out.......

i want a plugin of amxmodx for cs1.6 which shows the name of owner when client says "/owner"



i tried some code but it did'nt work.... i did't know this pawn language :@



#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
static const COLOR[] = "^x04"
new gmsgSayText
gmsgSayText = get_user_msgid("SayText")

public plugin_init()
{
register_plugin("Show Owner", "1.0", "Mirxa TouQeer")

register_clcmd("say /owner", "show_owner")
//register_clcmd("say /restartscore", "reset_score")
//register_clcmd("say /rs", "reset_score")

}

public show_owner(user)
{

new len
len = format(message, 255, "%s Owner: ",COLOR)
print_message(user,message)


}

print_message(id, msg[]) {
message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
write_byte(id)
write_string(msg)
message_end()
}






plzz help me........
m.touqeerafzal is offline
Send a message via Skype™ to m.touqeerafzal
devilicioux
Veteran Member
Join Date: Jun 2013
Location: Delhi,India
Old 07-15-2013 , 12:25   Re: Plugin to show owner
Reply With Quote #2

Replace the Owner's name with whatever you want to.The Code Dispays a Message at every round start Type /owner to see who is the owner .. If you want to disable that .. Just
Comment out register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
like
//register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
in plugin_init()
Hope I Helped

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

#define PLUGIN "Show Owner"
#define VERSION "1.0"
#define AUTHOR "Devilicioux"

new g_maxplayers

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)    
    
register_clcmd"say /owner""ClientCommand" );
    
register_clcmd"say_team /owner""ClientCommand" );
    
    
register_event("HLTV""event_round_start""a""1=0""2=0")
 
g_maxplayers get_maxplayers()
    
}

public 
ClientCommand(id)
{
colored_print(id"^x04 OWNER_NAME ^x03 is the Owner Of The Server :)")        //<-- Replace OWNER_NAME with the Whatever the owners name is.
}

public 
event_round_start()
{
colored_print(0"^x04Type ^x03 ^"/owner^" ^x04 to see who is the owner :)")
}

// Colored print by MeRcyLeZZ
colored_print(target, const message[], any:...)
{
    static 
buffer[512], iargscountg_msgSayText
    argscount 
numargs()
    
g_msgSayText get_user_msgid("SayText")
    
    
// Send to everyone
    
if (!target)
    {
        static 
player
        
for (player 1player <= g_maxplayersplayer++)
        {
            
// Not connected
            
if (!is_user_connected(player))
                continue;
            
            
// Remember changed arguments
            
static changed[5], changedcount // [5] = max LANG_PLAYER occurencies
            
changedcount 0
            
            
// Replace LANG_PLAYER with player id
            
for (2argscounti++)
            {
                if (
getarg(i) == LANG_PLAYER)
                {
                    
setarg(i0player)
                    
changed[changedcount] = i
                    changedcount
++
                }
            }
            
            
// Format message for player
            
vformat(buffercharsmax(buffer), message3)
            
            
// Send it
            
message_begin(MSG_ONE_UNRELIABLEg_msgSayText_player)
            
write_byte(player)
            
write_string(buffer)
            
message_end()
            
            
// Replace back player id's with LANG_PLAYER
            
for (0changedcounti++)
                
setarg(changed[i], 0LANG_PLAYER)
        }
    }
    
// Send to specific target
    
else
    {
        
// Format message for player
        
vformat(buffercharsmax(buffer), message3)
        
        
// Send it
        
message_begin(MSG_ONEg_msgSayText_target)
        
write_byte(target)
        
write_string(buffer)
        
message_end()
    }

devilicioux is offline
m.touqeerafzal
Member
Join Date: May 2013
Old 07-15-2013 , 12:35   Re: Plugin to show owner
Reply With Quote #3

thanx broooo

i'm just loving it.... <3 <3

just need little bit changes in format.... i'll try it myself.....

if there is problem then i'll ask u again......

once again thank u sooooooo much

i was in search of this plugin since a month ago....

thanxxxxx
m.touqeerafzal is offline
Send a message via Skype™ to m.touqeerafzal
devilicioux
Veteran Member
Join Date: Jun 2013
Location: Delhi,India
Old 07-15-2013 , 12:43   Re: Plugin to show owner
Reply With Quote #4

Anytime .. Sure thing. Glad I helped

Quote:
Originally Posted by m.touqeerafzal View Post
thanx broooo

i'm just loving it.... <3 <3

just need little bit changes in format.... i'll try it myself.....

if there is problem then i'll ask u again......

once again thank u sooooooo much

i was in search of this plugin since a month ago....

thanxxxxx
devilicioux 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 06:25.


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