Author
|
Message
|
Junior Member
|
09-24-2014
, 22:25
[ZP] Help me complete plugin this
|
#1
|
Example: he have 2000hp
After the first death he revial and now he have 2000 +500Hp
If he second death then he have 2500+500Hp
I think use
Quote:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <hamsandwich>
#include <zombieplague>
#include <fakemeta>
#include <engine>
#include <fun>
#define PLUGIN "Respawn time level"
#define VERSION "1.0"
#define AUTHOR "mrzonxino"
new g_respawn_count[33]
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam(Ham_Spawn, "player", "fw_PlayerRespawn", 1)
}
public fw_PlayerRespawn(id)
{
if zp_get_user_zombie(id)
return PLUGIN_CONTINUE;
set_task(1.0, "PlayerRespawn", id)
}
public PlayerRespawn(id)
{
if (g_respawn_count[id] == 1 ) // 1 = the first revival
{
set_user_health(id, get_user_health(id) + (500*1))
}
esle if (g_respawn_count[id] == 2 ) // 2 = second revival
{
set_user_health(id, get_user_health(id) + (500*2))
}
esle if (g_respawn_count[id] == X ) // X = X revival
{
set_user_health(id, get_user_health(id) + (500*X))
}
}
|
|
|
|