Raised This Month: $ Target: $400
 0% 

Fakedamage doesnt damage?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Brian965
Member
Join Date: Jun 2008
Old 06-26-2011 , 18:39   Re: Fakedamage doesnt damage?
Reply With Quote #10



PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <engine>
#include <cstrike>
#include <fun>

stock update_scoreboard(idattrib 0)
{
    
// 0 == Nothing
    // 1 == DEAD
    // 2 == BOMB
    // 4 == VIP
    
message_begin(MSG_ALLget_user_msgid("ScoreAttrib"));
    
write_byte(id);
    
write_byte(attrib);
    
message_end();
    
    return 
PLUGIN_HANDLED;
}

new const 
PLUGIN[] = "HideNSeek: Pain on Top";
new const 
VERSION[] = "1.0";

new 
Float:gfNextHurtTime[33];
new 
g_MaxPlayers;
new 
blood

public plugin_precache()
{
    
blood precache_model("sprites/blood.spr")
}

public 
plugin_init( )
{
    
register_pluginPLUGINVERSION"r4nDoMz" );
    
register_forward(FM_Touch"fwdTouch"0);

    
g_MaxPlayers global_get(glb_maxClients);
}

native hnsxp_get_user_xp(client);

native hnsxp_set_user_xp(clientxp);

stock hnsxp_add_user_xp(clientxp)
{
    return 
hnsxp_set_user_xp(clienthnsxp_get_user_xp(client) + xp);
}

public 
fwdTouch(idattacker)
{
    if( !
pev_valid(id) || !pev_valid(attacker)
    || !(
id <= g_MaxPlayers) || !(attacker <= g_MaxPlayers)
    || !
is_user_alive(id) || !is_user_alive(attacker) )
    {
        return 
FMRES_IGNORED;
    }

    if( 
cs_get_user_team(id) == cs_get_user_team(attacker) )
    {
        return 
FMRES_IGNORED;
    }
    
    new 
Float:vidOrigin[3], Float:vattackerOrigin[3];
    
pev(idpev_originvidOrigin);
    
pev(attackerpev_originvattackerOrigin);
    
    if( !(
49.0 < (vattackerOrigin[2] - vidOrigin[2]) < 73.0) )
    {
        return 
FMRES_IGNORED;
    }

    if (
halflife_time() >= gfNextHurtTime[attacker])
    {
        if (
get_user_health(id) > 10)
        {
            
message_begin(MSG_BROADCASTSVC_TEMPENTITY);
            
write_byte(TE_BLOODSPRITE);
            
write_coord(vidOrigin[0]);
            
write_coord(vidOrigin[1]);
            
write_coord(vidOrigin[2]);
            
write_short(blood);
            
write_short(blood);
            
write_byte(229);
            
write_byte(12);
            
message_end();

            
fakedamage(id"player"5.0DMG_GENERIC);
        }
        else
        {
        new 
name1[42];
        new 
name2[42];
        static 
Float:fFrags;
        
get_user_name(attackername132);
        
get_user_name(idname232);
        
set_hudmessage(255255255, -1.0, -1.006.04.0);
        
show_hudmessage(0"%s just goomba stomped %s!"name1name2);
         
make_deathmsg(attacker,id,0,"goomba");
        
pev(idpev_fragsfFrags);
        
set_pev(idpev_fragsfFrags float(1));
        
fakedamage(id"Goomba Stomp"10000.0DMG_GENERIC);
        
        
hnsxp_add_user_xp(attacker50);
        
client_print(attacker,print_chat"***You got 50 XP for Goomba Stomping!***");
        
        for( new 
0g_MaxPlayersi++ )
         
update_scoreboard(i0);
     
        }
        
        
gfNextHurtTime[attacker] = halflife_time() + 0.5;
    }

    return 
FMRES_IGNORED;

__________________
anyways this is My signature.. http://AwPHnS.CoM is my clans site.
Brian965 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 23:27.


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