Raised This Month: $ Target: $400
 0% 

Plese help!


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
kiki33hun
Veteran Member
Join Date: Jul 2011
Location: Magyarország
Old 12-08-2011 , 06:57   Plese help!
Reply With Quote #1

Please help fix my plugin!

public joinmsg(i) And public leavemsg(id) PROBLEM
name instead of hostname!!

PHP Code:
/* Plugin Generated By: kiki33 */
#include <amxmodx>
#include <dhudmessage>

#define PLUGIN "Welcome Hud Message"
#define VERZIO "1.1"
#define KESZITO "kiki33"

#pragma tabsize 1

#define TASK_CONNECT 100

new g_OnOff;
new 
hostname64 ];

public 
plugin_init() 
{
    
//Register Plugin
    
register_pluginPLUGINVERZIOKESZITO)
    
//Cvars
    
g_OnOff register_cvar("amx_welcom_plugin""1");  // Enable/Disable the plugin with this cvar!
    //Multilang file
    //register_dictionary("welcome.txt")
}

public 
client_connect(id) {

    
set_task(2.0"joinmsg"TASK_CONNECT 0)
    return 
PLUGIN_CONTINUE
}

public 
client_putinserver(id) {
    
    
set_task(8.0"joinedmsg"id)
    return 
PLUGIN_CONTINUE 
}

public 
client_disconnect(id) {

   
set_task(2.0"leavemsg"0
   return 
PLUGIN_CONTINUE 
}

public 
joinmsg(i)
{
    if( 
get_pcvar_num(g_OnOff) )
    {
        new 
nev33 ]
        
get_user_name(TASK_CONNECTnev32)
        
set_dhudmessage(25515550, -1.00.8126.03.00.11.5 )
        
show_dhudmessage(0"Beware %s, is connecting."nev)
    }
}

public 
joinedmsg(id)
{
    if( 
get_pcvar_num(g_OnOff) )
    {
        new 
nev33 ]
        
get_user_name(idnev32)
        
get_cvar_string("hostname",hostname,63
        
set_dhudmessage(25515550, -1.00.8126.03.00.11.5 )
        
show_dhudmessage(id"Hello %s, welcome to %s."nevhostname)
        
client_cmd(id"spk misc/welcomesound.wav")
    }
}

public 
leavemsg(id)
{
     if( 
get_pcvar_num(g_OnOff) )
    {
        new 
nev33 ]
        
get_user_name(idnev32)
        
set_dhudmessage(01600, -1.00.8126.03.00.11.5 )
        
//show_dhudmessage(id, "^%L", id, "KILEPES", nev)
        
show_dhudmessage(0"Goodbye %s, Please come back soon."nev)
    }
}

public 
plugin_precache()
{
    if( 
get_pcvar_num(g_OnOff) )
    {
        
precache_sound("misc/welcomesound.wav")
    }

__________________
kiki33hun 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 14:20.


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