Raised This Month: $ Target: $400
 0% 

Two in one...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
edga85
BANNED
Join Date: Jan 2009
Old 10-02-2009 , 10:39   Two in one...
Reply With Quote #1

Can someone Make one plugin from this two????
PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <zombieplague>
#define PLUGIN_NAME "[ZP] Survivors Health"
#define PLUGIN_VERS "1.0"
#define PLUGIN_AUTH "IneedHelp"
#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_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_survivor(id))
remove_task(id+TASK_HEALTH)

set_hudmessage(00255, -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\\ lang1053\\ f0\\ fs16 \n\\ par }
*/ 

PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <zombieplague>
#define PLUGIN_NAME "[ZP] Nemesis Health"
#define PLUGIN_VERS "1.0"
#define PLUGIN_AUTH "IneedHelp"
#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

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))
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1053\\ f0\\ fs16 \n\\ par }
*/ 
</SPAN></SPAN>
edga85 is offline
Send a message via Skype™ to edga85
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 10-02-2009 , 20:16   Re: Two in one...
Reply With Quote #2

Why? Just use them as two plugins.
__________________
fysiks is offline
edga85
BANNED
Join Date: Jan 2009
Old 10-03-2009 , 06:47   Re: Two in one...
Reply With Quote #3

Pls
In one better...(i think)
edga85 is offline
Send a message via Skype™ to edga85
meigyoku
BANNED
Join Date: Apr 2009
Old 10-03-2009 , 08:32   Re: Two in one...
Reply With Quote #4

How to make one plugin connect two plugins? I think it's impossible!
meigyoku is offline
edga85
BANNED
Join Date: Jan 2009
Old 10-03-2009 , 09:52   Re: Two in one...
Reply With Quote #5

No no...
I need that from these two plugins make One plugin....
edga85 is offline
Send a message via Skype™ to edga85
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 10-03-2009 , 10:32   Re: Two in one...
Reply With Quote #6

Quote:
Originally Posted by edga85 View Post
No no...
I need that from these two plugins make One plugin....
Check if it works.
I have not tried yet.
Attached Files
File Type: sma Get Plugin or Get Source (zp_extra_health.sma - 635 views - 1.3 KB)
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 10-03-2009 , 10:45   Re: Two in one...
Reply With Quote #7

Quote:
Originally Posted by meigyoku View Post
How to make one plugin connect two plugins? I think it's impossible!
There's many ways to do that.
Quote:
Originally Posted by edga85 View Post
No no...
I need that from these two plugins make One plugin....
Useless if you don't have a better reason.
SnoW is offline
Send a message via MSN to SnoW
edga85
BANNED
Join Date: Jan 2009
Old 10-03-2009 , 12:53   Re: Two in one...
Reply With Quote #8

Quote:
Originally Posted by joropito View Post
Check if it works.
I have not tried yet.
Can you make
PHP Code:
set_hudmessage(25500, -1.00.201.01.00.10.2, -1)
ShowSyncHudMsg(0g_iHudSync"Special Health: %d"get_user_health(id)) 
2 because you will not understand whos hp or nemesis or Survivor..... ( Can you make 2 hudmesagges , 1 for Nemesis hp other for Survivor HP )
And ty for helping
Quote:
Originally Posted by SnoW View Post
There's many ways to do that.

Useless if you don't have a better reason.
I think in one plugin there will be less Lag
edga85 is offline
Send a message via Skype™ to edga85
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 10-03-2009 , 14:45   Re: Two in one...
Reply With Quote #9

Change this

PHP Code:
ShowSyncHudMsg(0g_iHudSync"Special Health: %d"get_user_health(id)) 
To this
PHP Code:
ShowSyncHudMsg(0g_iHudSync"%s Health: %d"zp_get_user_survivor(id) ? "Survivor" "Nemesis"get_user_health(id)) 
And test it.
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 10-03-2009 , 14:45   Re: Two in one...
Reply With Quote #10

Quote:
Originally Posted by edga85 View Post
I think in one plugin there will be less Lag
You could notice the lagg with an accurate calculator if you had thousands of plugins using prethink and combined them but yea, No.
SnoW is offline
Send a message via MSN to SnoW
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 22:38.


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