Raised This Month: $ Target: $400
 0% 

Fakedamage doesnt damage?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
r4ndomz
Senior Member
Join Date: Jul 2009
Location: The Hood
Old 06-26-2011 , 20:39   Re: Fakedamage doesnt damage?
Reply With Quote #1

Quote:
Originally Posted by Brian965 View Post


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;

lol brian. I love how you BEGGED me for this instead of searching
Twas already on the internet. Anyways. Why isnt it emitting blood? And how can i execute that code?
__________________
HideNSeek bug fixed here:http://forums.alliedmods.net/showpos...&postcount=951

PM me if you want a nice HideNSeek shop
NEED PLUGIN TESTERS PM ME

Last edited by r4ndomz; 06-26-2011 at 21:30.
r4ndomz is offline
Send a message via Skype™ to r4ndomz
r4ndomz
Senior Member
Join Date: Jul 2009
Location: The Hood
Old 06-27-2011 , 13:18   Re: Fakedamage doesnt damage?
Reply With Quote #2

Ah thanks. How can i block only the deathmsg and the console message that says "player killed self with player"?

Why am i not getting any score when i kill someone this way? I used set_user_frags but i get nothing.
__________________
HideNSeek bug fixed here:http://forums.alliedmods.net/showpos...&postcount=951

PM me if you want a nice HideNSeek shop
NEED PLUGIN TESTERS PM ME

Last edited by r4ndomz; 06-27-2011 at 13:27.
r4ndomz is offline
Send a message via Skype™ to r4ndomz
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 23:27.


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