Raised This Month: $ Target: $400
 0% 

Need help, with my system


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bilal Pro
Senior Member
Join Date: Mar 2012
Location: Holland
Old 03-24-2012 , 18:31   Need help, with my system
Reply With Quote #1

PHP Code:
public eDeath(id//function name 

    
// Create a variable to store the attacker's id
    
new attacker read_data)
    
    
// If a player was killed by a HeadShot, this will be used for the cvar Xp_Hs
    
new headshot read_data)
    
    
//which weapon was used
    
new clipammo get_user_weapon(attacker,clip,ammo);
    
Player_Point[attacker] += get_pcvar_num(Point_Kill
    
ColorChat(attackerGREY"^4'^3[^4sG^3]^4' ^3You received ^4%d^3 points for making a ^4kill^3."Point_Kill)
    
// used for the xp_hs cvar 
    // it checks if the victim was killed by a headshot 
    
if(headshot
        
// give him/her bonus xp 
    
Player_Point[attacker] += get_pcvar_num(Point_Hs)
    
ColorChat(attackerGREY"^4'^3[^4sG^3]^4' ^3You received ^4%d^3 points for making a ^4kill^3 with ^4headshot^3."Point_Hs)
    
    
// shows his level on a hud message 
    
ShowHud(attacker)
    
CheckLvl(attacker)
    

Hello guys, when i make a kill with headshot it displays both messages. But i want that if i make a kill with headshot only the headshot message displays and without headshot displays the normal message anyone can help me?
Bilal Pro is offline
t3hNox
Senior Member
Join Date: Oct 2009
Old 03-24-2012 , 18:41   Re: Need help, with my system
Reply With Quote #2

Try:
Code:
public eDeath(id) //function name {     // Create a variable to store the attacker's id     new attacker = read_data( 1 )         // If a player was killed by a HeadShot, this will be used for the cvar Xp_Hs     new headshot = read_data( 3 )         //which weapon was used     new clip, ammo = get_user_weapon(attacker,clip,ammo);     // used for the xp_hs cvar     // it checks if the victim was killed by a headshot     if(headshot)     {         // give him/her bonus xp             Player_Point[attacker] += get_pcvar_num(Point_Hs)             ColorChat(attacker, GREY, "^4'^3[^4sG^3]^4' ^3You received ^4%d^3 points for making a ^4kill^3 with ^4headshot^3.", Point_Hs)     }     else     {                 //Not a headshot             Player_Point[attacker] += get_pcvar_num(Point_Kill)             ColorChat(attacker, GREY, "^4'^3[^4sG^3]^4' ^3You received ^4%d^3 points for making a ^4kill^3.", Point_Kill)     }       // shows his level on a hud message     ShowHud(attacker)     CheckLvl(attacker)     }
t3hNox is offline
Bilal Pro
Senior Member
Join Date: Mar 2012
Location: Holland
Old 03-24-2012 , 19:24   Re: Need help, with my system
Reply With Quote #3

Thanks
Bilal Pro is offline
Bilal Pro
Senior Member
Join Date: Mar 2012
Location: Holland
Old 03-24-2012 , 19:54   Re: Need help, with my system
Reply With Quote #4

PHP Code:
public client_connect(id)
{
    if (
get_user_flags(id) & ADMIN_KICK
    {
        
        new 
VipName[32]
        
get_user_name(idVipName31)
        
ColorChat(idGREY"^4'^3[^4sG^3]^4' ^3'^4%s^3' ^4joined ^3the ^4server ^3with ^4status ^3- [^4active^3]."VipName)
        
set_task(10.0"client_connect1")
    }
    else
    {
        new 
VipName[32]
        
get_user_name(idVipName31)
        
ColorChat(idGREY"^4'^3[^4sG^3]^4' ^3'^4%s^3' ^4joined ^3the ^4server ^3with ^4status ^3- [^4inactive^3]."VipName)
        
set_task(10.0"client_connect1")
    }

Didnt want to make a new topic but, why doesnt it show the message's when people join?
Bilal Pro is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 03-25-2012 , 02:11   Re: Need help, with my system
Reply With Quote #5

Quote:
Originally Posted by Bilal Pro View Post
PHP Code:
public client_connect(id)
{
    if (
get_user_flags(id) & ADMIN_KICK
    {
        
        new 
VipName[32]
        
get_user_name(idVipName31)
        
ColorChat(idGREY"^4'^3[^4sG^3]^4' ^3'^4%s^3' ^4joined ^3the ^4server ^3with ^4status ^3- [^4active^3]."VipName)
        
set_task(10.0"client_connect1")
    }
    else
    {
        new 
VipName[32]
        
get_user_name(idVipName31)
        
ColorChat(idGREY"^4'^3[^4sG^3]^4' ^3'^4%s^3' ^4joined ^3the ^4server ^3with ^4status ^3- [^4inactive^3]."VipName)
        
set_task(10.0"client_connect1")
    }

Didnt want to make a new topic but, why doesnt it show the message's when people join?
This is not related to the original post. Make a new thread next time.

Players don't have any flags on client_connect(), you should use client_authorized. Also, the person connecting will never see the message anyways. If you want the connecting person to see it then you should delay it 5 or 10 seconds.
__________________

Last edited by fysiks; 03-25-2012 at 02:12.
fysiks 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 03:14.


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