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

Help / Support [ZP] Help me complete plugin this


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mrzonxino
Junior Member
Join Date: Sep 2014
Old 09-24-2014 , 22:25   [ZP] Help me complete plugin this
Reply With Quote #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))
}

}
mrzonxino is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 09-25-2014 , 04:15   Re: [ZP] Help me complete plugin this
Reply With Quote #2

After the first death is the same with the first respawn as a zombie/ human. Nothing, you can do if the player is dead.
zmd94 is offline
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 03:13.


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