Raised This Month: $ Target: $400
 0% 

Need to complete one part of plugin (small and easy)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
spiN-
Member
Join Date: Jul 2008
Location: Lithuania
Old 06-25-2009 , 14:38   Need to complete one part of plugin (small and easy)
Reply With Quote #1

Hey.

I need that this plugin (bullet damage) should show and received damage, not only done, but I'm not so good at it and asking for help.

Here is the code:
Code:
#include <amxmodx>
 
new g_HudSyncObj;
 
public plugin_init()
    register_event("Damage", "Damage", "b", "2!0", "3=0", "4!0");
 
public plugin_cfg()
    g_HudSyncObj = CreateHudSyncObj();
 
public Damage(Cl)
{
    static Attacker;
    Attacker = get_user_attacker(Cl);
 
    if (get_user_flags(Attacker) & ADMIN_LEVEL_H)
    {
            set_hudmessage(0, 100, 200, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, 7);
            ShowSyncHudMsg(Attacker, g_HudSyncObj, "%d^n", read_data(2));
    }
}
I tryed to fill with this code in the end:
Code:
#else
 if ( is_user_connected(attacker) && if (get_user_flags(attacker) & ADMIN_LEVEL_H) )
 {
  new damage = read_data(2)
#endif
  set_hudmessage(255, 0, 0, 0.45, 0.50, 2, 0.1, 4.0, 0.1, 0.1, -1)
  ShowSyncHudMsg(id, g_MsgSync2, "%i^n", damage)
And it looks like this:
Code:
#include <amxmodx>
 
new g_HudSyncObj;
 
public plugin_init()
    register_event("Damage", "Damage", "b", "2!0", "3=0", "4!0");
 
public plugin_cfg()
    g_HudSyncObj = CreateHudSyncObj();
 
public Damage(Cl)
{
    static Attacker;
    Attacker = get_user_attacker(Cl);
 
    if (get_user_flags(Attacker) & ADMIN_LEVEL_H)
    {
            set_hudmessage(0, 100, 200, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, 7);
            ShowSyncHudMsg(Attacker, g_HudSyncObj, "%d^n", read_data(2));
#else
 if ( is_user_connected(attacker) && if (get_user_flags(attacker) & ADMIN_LEVEL_H) )
 {
  new damage = read_data(2)
#endif
  set_hudmessage(255, 0, 0, 0.45, 0.50, 2, 0.1, 4.0, 0.1, 0.1, -1)
  ShowSyncHudMsg(id, g_MsgSync2, "%i^n", damage)
But I get 5 or 6 errors... Whats wrong?
spiN- 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 15:30.


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