Raised This Month: $ Target: $400
 0% 

New vs static for deathmsg


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
mforce
Member
Join Date: Jan 2015
Old 10-14-2015 , 03:57   New vs static for deathmsg
Reply With Quote #1

New vs static for deathmsg
What's better for deathmsg?

PHP Code:
public plugin_init() {
    
register_event("DeathMsg""halal""a")
}

public 
halal() {
    static 
killervictimheadshotweapon[32];
    
killer read_data(1);
    
victim read_data(2);
    
headshot read_data(3);
    
read_data(4weaponcharsmax(weapon));
    
    if (!
is_user_connected(killer) || !is_user_connected(victim) || killer == victim || get_user_team(killer) == get_user_team(victim)) return;
    
    if(
killer != victim && headshot) {
        if (
containi(weapon"awp")) player_data[killer][AWP_KILLS] += HEADSHOT_POINT;
        else if (
containi(weapon"scout")) player_data[killer][SCOUT_KILLS] += HEADSHOT_POINT;
        else if (
containi(weapon"deagle")) player_data[killer][DEAGLE_KILLS] += HEADSHOT_POINT;
        else if (
containi(weapon"usp")) player_data[killer][USP_KILLS] += HEADSHOT_POINT;
        else if (
containi(weapon"glock")) player_data[killer][GLOCK_KILLS] += HEADSHOT_POINT;
        else if (
containi(weapon"knife")) player_data[killer][KNIFE_KILLS] += HEADSHOT_POINT;
        
set_hudmessage(02550, -0.90.1506.01.0);
        
show_hudmessage(killer"+%i Pont"HEADSHOT_POINT);
    }
    else if(
killer != victim) {
        if (
containi(weapon"awp")) player_data[killer][AWP_KILLS] += KILL_POINT;
        else if (
containi(weapon"scout")) player_data[killer][SCOUT_KILLS] += KILL_POINT;
        else if (
containi(weapon"deagle")) player_data[killer][DEAGLE_KILLS] += KILL_POINT;
        else if (
containi(weapon"usp")) player_data[killer][USP_KILLS] += KILL_POINT;
        else if (
containi(weapon"glock")) player_data[killer][GLOCK_KILLS] += KILL_POINT;
        else if (
containi(weapon"knife")) player_data[killer][KNIFE_KILLS] += KILL_POINT;
        
set_hudmessage(02550, -0.90.1506.01.0);
        
show_hudmessage(killer"+%i Pont"KILL_POINT);
    }

mforce 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 22:17.


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