Raised This Month: $12 Target: $400
 3% 

[HELP] Need little help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
artos
Senior Member
Join Date: Mar 2010
Old 04-18-2010 , 13:07   [HELP] Need little help
Reply With Quote #1

Hi! I wanted to write my first plugin but it's not working as well. Health doesn't show.

This plugin should show HP of Nemesis/survivor/sniper/assassin on his round.

@Edit
Yes, this is for Zombie Plague with new natives and modes 1.5

PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <zombieplaguenew1.3>

#define PLUGIN_NAME "[ZP] Show Health"
#define PLUGIN_VERS "1.0"
#define PLUGIN_AUTH "Artos"

#define TASK_HEALTH 1234554321

new g_iHudSync

public plugin_init() 
{
    
register_plugin(PLUGIN_NAMEPLUGIN_VERSPLUGIN_AUTH)
    
    
//
    
g_iHudSync CreateHudSyncObj()
    
    
// Fwd's
    
RegisterHam(Ham_Spawn"player""Fwd_PlayerSpawn_Post"1)
    
RegisterHam(Ham_Killed"player""Fwd_PlayerKilled_Pre"0)
}

public 
Fwd_PlayerSpawn_Post(id)
{
    if (
task_exists(id+TASK_HEALTH))
        
remove_task(id+TASK_HEALTH)
}

public 
Fwd_PlayerKilled_Pre(victimattackershouldgib)
{
    if (
task_exists(victim+TASK_HEALTH))
        
remove_task(victim+TASK_HEALTH)
}

public 
zp_round_started(modeid)
{
    if (
mode != MODE_NEMESIS)
        return
    
    if (!
zp_get_user_nemesis(id))
                  return
    
    if (
mode != MODE_ASSASSIN)
        return
    
    if (!
zp_get_user_assassin(id))
        return
    
    if (
mode != MODE_SNIPER)
        return
    
    if (!
zp_get_user_sniper(id))
        return
    
    if (
mode != MODE_SURVIVOR)
        return
    
    if (!
zp_get_user_survivor(id))
        return
    
    
set_task(1.0"Task_ShowHealth"id+TASK_HEALTH__"b")
}

public 
Task_ShowHealth(id)
{
    
id -= TASK_HEALTH
    
    
if (!zp_get_user_nemesis(id))
        
remove_task(id+TASK_HEALTH)
    
    
set_hudmessage(25500, -1.00.201.01.00.10.2, -1)
    
ShowSyncHudMsg(0g_iHudSync"Nemesis Health: %d"get_user_health(id))
    
    if (!
zp_get_user_assassin(id))
        
remove_task(id+TASK_HEALTH)
    
    
set_hudmessage(2552550, -1.00.201.01.00.10.2, -1)
    
ShowSyncHudMsg(0g_iHudSync"Assassin Health: %d"get_user_health(id))
    
    if (!
zp_get_user_sniper(id))
        
remove_task(id+TASK_HEALTH)
    
    
set_hudmessage(02550, -1.00.201.01.00.10.2, -1)
    
ShowSyncHudMsg(0g_iHudSync"Sniper Health: %d"get_user_health(id))
    
    if (!
zp_get_user_survivor(id))
        
remove_task(id+TASK_HEALTH)
    
    
set_hudmessage(0255255, -1.00.201.01.00.10.2, -1)
    
ShowSyncHudMsg(0g_iHudSync"Survivor Health: %d"get_user_health(id))
    
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang3082\\ f0\\ fs16 \n\\ par }
*/ 
Thanks in advance for help.

Last edited by artos; 04-18-2010 at 13:11.
artos is offline
Send a message via Skype™ to artos
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 04-18-2010 , 13:39   Re: [HELP] Need little help
Reply With Quote #2

The problem is that you aren't not the author .
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
artos
Senior Member
Join Date: Mar 2010
Old 04-18-2010 , 15:12   Re: [HELP] Need little help
Reply With Quote #3

Quote:
Originally Posted by lucas_7_94 View Post
The problem is that you aren't not the author .
OMG You are ignorant. I never saw plugin like this so i wanted to write one. If i'm not autor, prove it.

I used some code from "hi!" plugin. This is a crime? No, because he sent source file and i wanted to add him in credits for help!

Last edited by artos; 04-18-2010 at 15:15.
artos is offline
Send a message via Skype™ to artos
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 04-18-2010 , 15:15   Re: [HELP] Need little help
Reply With Quote #4

Quote:
Originally Posted by artos View Post
OMG You are ignorant. I never saw plugin like this so i wanted to write one. If i'm not autor, prove it.
PHP Code:
#define PLUGIN_AUTH "Artos" 
LOLOLOLOL , Yeah, i am a ignorant .. ook , you a stupid retard , steal work for another people , the original author is IneedHelp , from argentina.

get a life and get a mind.
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
artos
Senior Member
Join Date: Mar 2010
Old 04-18-2010 , 15:26   Re: [HELP] Need little help
Reply With Quote #5

http://forums.alliedmods.net/showpos...4&postcount=23

Check his source file and read author name, then go to hell!

PHP Code:
#define PLUGIN_AUTH "hi!" 
artos is offline
Send a message via Skype™ to artos
Russiaboy
BANNED
Join Date: May 2009
Location: ZombiePlague is my Home
Old 04-18-2010 , 15:35   Re: [HELP] Need little help
Reply With Quote #6

Quote:
Originally Posted by artos View Post
http://forums.alliedmods.net/showpos...4&postcount=23

Check his source file and read author name, then go to hell!

PHP Code:
#define PLUGIN_AUTH "hi!" 
maybe "IneedHelp" make it ?!
Russiaboy is offline
Send a message via MSN to Russiaboy Send a message via Skype™ to Russiaboy
artos
Senior Member
Join Date: Mar 2010
Old 04-18-2010 , 15:47   Re: [HELP] Need little help
Reply With Quote #7

Quote:
Originally Posted by Russiaboy View Post
maybe "IneedHelp" make it ?!
Yes but in source file author name is "hi!". I don't know it's the same person or not. I don't care. I just need help with this plugin.
artos is offline
Send a message via Skype™ to artos
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 20:01.


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