Raised This Month: $ Target: $400
 0% 

something wrong with Hp regeneration...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
edga85
BANNED
Join Date: Jan 2009
Old 10-15-2009 , 13:18   something wrong with Hp regeneration...
Reply With Quote #1

Getting some errors in compile....
PHP Code:
#include <amxmodx>  
#include <amxmisc>  
#include <cstrike>  
#include <fun>  
#include < zombieplague >  
new g_pKillAmmo  
new g_iMaxPlayers;  
public 
plugin_init( ) {  
register_plugin"Plugin""1.0""noauthor" );  
register_logevent("Round_Start"2"1=Round_Start")  
register_logevent"EventRoundEnd"2"1=Round_End" )  
register_menucmd(register_menuid("menu_rod"), 1023"Pressedrod")  
g_iMaxPlayers get_maxplayers( );  
g_pKillAmmo register_cvar"zpvip_kill_ammo""2" );  
register_event"DeathMsg""death_msg""a" );  
}  
public 
Round_Start()  
{  
new 
players[32], pnumplayer  
get_players
(playerspnum"a")  
for (new 
0pnumi++)  
{  
player players[i]  
if (
get_user_flags(player) & ADMIN_LEVEL_H)  
{  
ShowmenuID(player)  
}  
}  
return 
PLUGIN_HANDLED  
}  
public 
ShowmenuID(id)  
{  
new 
Body[512]  
new 
CsTeams:iTeam cs_get_user_team(id)  
if (
iTeam == CS_TEAM_T)  
{  
add(Body511"\rVIP Menu: \R\dTe rro r ist^n^n")  
add(Body511"\r1. \w5HP/s^n")  
add(Body511"\r2. \w255HP^n")  
add(Body511"\r0. \wExit^n")  
}  
else if (
iTeam == CS_TEAM_CT)  
{  
add(Body511"\rVIP Menu: \R\dCoun te r-Te rro r ist^n^n")  
add(Body511"\r1. \w3HP/s^n")  
add(Body511"\r2. \w200HP^n")  
add(Body511"\r0. \wExit^n")  
}  
new 
g_Keys = (1<<1<<1<<9)  
show_menu(idg_KeysBody, -1"menu_rod")  
return 
PLUGIN_CONTINUE  
}  
public 
Pressedrod(idkey)  
{  
new 
CsTeams:iTeam cs_get_user_team(id)  
switch(
key)  
{  
case 
0:  
{  
if (
iTeam == CS_TEAM_T)  
{  
if(
is_user_alive(id))  
{  
new 
hp get_user_health(id);  
if(
hp 3500)  
{  
set_task(1.0,"gydytojas"id)  
}  
}  
}  
else if (
iTeam == CS_TEAM_CT)  
{  
if(
is_user_alive(id))  
{  
new 
hp get_user_health(id);  
if(
hp 250)  
{  
set_task(1.0,"gydytojas2"id)  
}  
}  
}  
case 
1:  
{  
if (
iTeam == CS_TEAM_T)  
{  
set_user_health(id255)  
client_print(idprint_center".:: You have been healed +255 hp ::.")  
}  
else if (
iTeam == CS_TEAM_CT)  
{  
set_user_health(id200)  
client_print(idprint_center".:: You have been healed +200 hp ::.")  
}  
}  
default: return 
PLUGIN_HANDLED  
}  
return 
PLUGIN_CONTINUE  
}  
public 
death_msg( ) {  
new 
iAttacker read_data);  
if( 
get_user_flagsiAttacker ) & ADMIN_LEVEL_H )  
zp_set_user_ammo_packsiAttackerzp_get_user_ammo_packsiAttacker ) + get_pcvar_numg_pKillAmmo ) );  
}  
public 
gydytojas(id) {  
if( !
is_user_aliveid ) )  
{  
return 
PLUGIN_CONTINUE;  
}  
new 
hp get_user_health(id);  
if(
hp 3500)  
{  
set_user_health(idhp 5);  
set_task(1.0,"gydytojas"id);  
}  
else  
{  
client_print(idprint_chat"Daugiau HP nebegausi :)")  
return 
PLUGIN_HANDLED;  
}  
return 
PLUGIN_CONTINUE;  
}  
public 
gydytojas2(id) {  
if( !
is_user_aliveid ) )  
{  
return 
PLUGIN_CONTINUE;  
}  
new 
hp get_user_health(id);  
if(
hp 250)  
{  
set_user_health(idhp 3);  
set_task(1.0,"gydytojas2"id);  
}  
else  
{  
client_print(idprint_chat"Daugiau HP nebegausi :)")  
return 
PLUGIN_HANDLED;  
}  
return 
PLUGIN_CONTINUE;  
}  
public 
EventRoundEnd( )  
{  
for( new 
1<= g_iMaxPlayersi++ )  
{  
remove_task);  
}  

edga85 is offline
Send a message via Skype™ to edga85
FaktuM
Junior Member
Join Date: Oct 2009
Location: Sweden
Old 10-16-2009 , 13:44   Re: something wrong with Hp regeneration...
Reply With Quote #2

Try to intend code (CTRL + I) and edit your post. I don't have ZP.inc so can't check the error.
FaktuM is offline
edga85
BANNED
Join Date: Jan 2009
Old 10-16-2009 , 13:47   Re: something wrong with Hp regeneration...
Reply With Quote #3

Already resolved....
edga85 is offline
Send a message via Skype™ to edga85
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 06:48.


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