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

Advanced HP & AP *Updated* v0.2


Post New Thread Reply   
 
Thread Tools Display Modes
diablo1999
New Member
Join Date: Oct 2004
Old 10-16-2004 , 23:02   i have fix problem
Reply With Quote #21

#include <amxmodx>
#include <amxmod>
#include <amxmisc>
#include <fun>

new endhealth[32]
new endarmor[32]

public plugin_init() {
register_plugin("Amx HP","0.1","MagicShot")
register_clcmd("amx_health","set_health",ADMI N_USER,"")
register_event("ResetHUD", "start_health", "be")
register_event("SendAudio","round_end","a","2 =%!MRAD_terwin","2=%!MRAD_ctwin","2=%!MRAD_ro unddraw")
register_cvar("amx_maxhealth","30000")
register_cvar("amx_healthround","0")
register_cvar("amx_start_health","100")
register_clcmd("amx_armor","set_armor",ADMIN_ USER,"")
register_event("ResetHUD", "start_armor", "be")
register_cvar("amx_maxarmor","30000")
register_cvar("amx_start_armor","0")
register_cvar("amx_armorround","0")
register_cvar("amx_start_health","100")
register_clcmd("amx_money","set_money",ADMIN_ USER,"")
register_cvar("amx_maxmoney","300000")
return PLUGIN_CONTINUE
}

public start_health(id) {
if (get_cvar_num("amx_maxhealth") == 100) {
return PLUGIN_HANDLED
}
new playerlist1[32], inum2
get_players(playerlist1,inum2,"abcfhkl","")
if (get_cvar_num("amx_healthround") == 1) {
for(new d=0; d<=32; ++d) {
if (endhealth[d] > 100)
set_user_health(playerlist1[d],endhealth[d])
}
}else {
set_user_health(id,get_cvar_num("amx_start_he alth"))
}
return PLUGIN_CONTINUE
}

public round_end(id) {
new playerlist[32], inum1
get_players(playerlist,inum1,"abcfhkl","")
for(new c=0;c<=32;++c) {
endhealth[c] = get_user_health(playerlist[c])
endarmor[c] = get_user_health(playerlist[c])
}
}


public set_health(id,level,cid) {
if (!cmd_access(id,level,cid,3))
return PLUGIN_HANDLED
new who[32], hp[5], admin[32]
read_argv(1,who,31)
read_argv(2,hp,4)
get_user_name(id,admin,31)
new sethp = str_to_num(hp)
new maxhealth
maxhealth = get_cvar_num("amx_maxhealth")
if (who[0]=='@') {
new players[32], inum
get_players(players,inum,"ae",who[1])
if (!inum) {
console_print(id,"[AMX] No clients found on provided team. (@CT or @TERRORIST)")
return PLUGIN_HANDLED
}
for(new a=0;a<inum;a++) {
new health = (get_user_health(players[a]) + sethp)
if (health >= maxhealth) {
set_user_health(players[a], maxhealth)
}else {
set_user_health(players[a], health)
}
}
console_print(id,"Everyone HP has been set for Team: %s",who)
}
else if (who[0]=='*') {
new players[32], inum
get_players(players,inum,"a")
if (!inum) {
console_print(id,"[AMX] No clients found on provided team.*)")
return PLUGIN_HANDLED
}
for(new a=0;a<inum;a++) {
new health = (get_user_health(players[a]) + sethp)
if (health >= maxhealth) {
set_user_health(players[a], maxhealth)
}else {
set_user_health(players[a], health)
}
}
console_print(id,"Everyone HP has been set for Team: %s",who)
}
else {
new player = cmd_target(id,who,3)
if (!player) return PLUGIN_HANDLED
new health = get_user_health(player) + sethp
if (health >= maxhealth) {
set_user_health(player,maxhealth)
}else {
set_user_health(player,health)
}
new pname[32]
get_user_name(player,pname,31)
console_print(id,"Changed %s Health to &s",pname,health)
}
return PLUGIN_HANDLED
}



public start_armor(id) {
if (get_cvar_num("amx_maxarmor") == 0) {
return PLUGIN_HANDLED
}
new armorplist[32], inumap
get_players(armorplist,inumap,"abcfhkl","")
if (get_cvar_num("amx_armorround") == 1) {
for(new f=0; f<=inumap; ++f) {
if (endarmor[f] > 100)
set_user_armor(armorplist[f],endarmor[f])
}
}else {
set_user_armor(id,get_cvar_num("amx_start_arm or"))
}
return PLUGIN_CONTINUE
}

public set_armor(id,level,cid) {
if (!cmd_access(id,level,cid,3))
return PLUGIN_HANDLED
new apwho[32], ap[5], apadmin[32], maxarmor
read_argv(1,apwho,31)
read_argv(2,ap,4)
get_user_name(id,apadmin,31)
new setap = str_to_num(ap)
maxarmor = get_cvar_num("amx_maxarmor")

if (apwho[0]=='@') {
new applayers[32], apinum
get_players(applayers,apinum,"ae",apwho[1])
if (!apinum) {
console_print(id,"[AMX] No clients found on provided team. (@CT or @TERRORIST)")
return PLUGIN_HANDLED
}
for(new g=0;g<apinum;g++) {
new armor = (get_user_armor(applayers[g]) + setap)
if (armor >= maxarmor) {
set_user_armor(applayers[g], maxarmor)
}else {
set_user_armor(applayers[g], armor)
}
}
console_print(id,"Everyone HP has been set for Team: %s",apwho)
}
else if (apwho[0]=='*') {
new applayers[32], apinum
get_players(applayers,apinum,"a")
if (!apinum) {
console_print(id,"[AMX] No clients found on provided team.*")
return PLUGIN_HANDLED
}
for(new g=0;g<apinum;g++) {
new armor = (get_user_armor(applayers[g]) + setap)
if (armor >= maxarmor) {
set_user_armor(applayers[g], maxarmor)
}else {
set_user_armor(applayers[g], armor)
}
}
console_print(id,"Everyone HP has been set for Team: %s",apwho)
}
else {
new applayer = cmd_target(id,apwho,3)
if (!applayer) return PLUGIN_HANDLED
new armor = get_user_armor(applayer) + setap
if (armor >= maxarmor) {
set_user_armor(applayer,maxarmor)
}else {
set_user_armor(applayer,armor)
}
new apname[32]
get_user_name(applayer,apname,31)
console_print(id,"Changed %s Armor to %s",apname,armor)
}
return PLUGIN_HANDLED

}



public set_money(id,level,cid) {
if (!cmd_access(id,level,cid,3))
return PLUGIN_HANDLED
new who[32], hp[9], admin[32]
read_argv(1,who,31)
read_argv(2,hp,9)
get_user_name(id,admin,31)
new sethp = str_to_num(hp)
new maxmoney
maxmoney = get_cvar_num("amx_maxmoney")
if (who[0]=='@') {
new players[32], inum
get_players(players,inum,"ae",who[1])
if (!inum) {
console_print(id,"[AMX] No clients found on provided team. (@CT or @TERRORIST)")
return PLUGIN_HANDLED
}
for(new a=0;a<inum;a++) {
new money = (cs_get_user_money(players[a]) + sethp)
if (money >= maxmoney) {
cs_set_user_money(players[a], maxmoney)
}else {
cs_set_user_money(players[a], money)
}
}
console_print(id,"Everyone HP has been set for Team: %s",who)
}
else if (who[0]=='*') {
new players[32], inum
get_players(players,inum,"a")
if (!inum) {
console_print(id,"[AMX] No clients found on provided team.*)")
return PLUGIN_HANDLED
}
for(new a=0;a<inum;a++) {
new money = (cs_get_user_money(players[a]) + sethp)
if (money >= maxmoney) {
cs_set_user_money(players[a], maxmoney)
}else {
cs_set_user_money(players[a], money)
}
}
console_print(id,"Everyone HP has been set for Team: %s",who)
}
else {
new player = cmd_target(id,who,3)
if (!player) return PLUGIN_HANDLED
new money = cs_get_user_money(player) + sethp
if (money >= maxmoney) {
cs_set_user_money(player,money)
}else {
cs_set_user_money(player,money)
}
new pname[32]
get_user_name(player,pname,31)
console_print(id,"Changed %s Health to &s",pname,money)
}
return PLUGIN_HANDLED
}

[/code]
diablo1999 is offline
rival
New Member
Join Date: Dec 2004
Location: sweden nyköping
Old 12-18-2004 , 05:39   Re: Advanced HP & AP *Updated* v0.2
Reply With Quote #22

where are the download button?????????????????????????

NO ZIP FILE
NO SMA FILE
AND NO AMXX FILE

PLEASE POST THE FILE
rival is offline
Send a message via MSN to rival
MaZze
New Member
Join Date: Jan 2005
Old 02-01-2005 , 21:59  
Reply With Quote #23

Hi, can anybody write this Plugin for 1.6? i only need the amx_start_health var...

sorry for my english
MaZze is offline
BOOM
Member
Join Date: Jun 2004
Old 02-04-2005 , 02:19  
Reply With Quote #24

It is for 1.6
BOOM is offline
m1938mauser
Junior Member
Join Date: Apr 2005
Location: Illinois, Chicago
Old 05-15-2005 , 12:59  
Reply With Quote #25

Very nice plugin, good job !
__________________
m1938mauser is offline
Reignman
Junior Member
Join Date: Jun 2005
Location: Minnesota
Old 06-30-2005 , 14:50  
Reply With Quote #26

Possible bug (using CS 1.6) ...
In the plugin_init I have these settings

register_cvar("amx_maxhealth","250")
register_cvar("amx_healthround","1")
register_cvar("amx_start_health","100")
register_cvar("amx_maxarmor","250")
register_cvar("amx_start_armor","0")
register_cvar("amx_armorround","1")

When the round ends and I have over 100 health it doesn't carry over. It resets my health to 100. No matter what I set the "amx_start_health" cvar to, my health always resets to 100 on round start. The armor carries over just fine though.
__________________
Reignman is offline
david_coool
New Member
Join Date: Aug 2005
Old 08-15-2005 , 17:14  
Reply With Quote #27

I have downloaded this plugin but i dont now where to write the cvars ánd stuff please help!


msn: [email protected]
david_coool is offline
AnbuNaruto
Junior Member
Join Date: Jun 2006
Old 07-03-2006 , 22:19   Re: Advanced HP & AP *Updated* v0.2
Reply With Quote #28

me too i download the plugin i put it in side the rite folder that contains all the amxx. files now how do i turn on i try writing amx_health dotn work ???? says unknown command any1 help me plz

AIM:F1NdInG NeEm0
AnbuNaruto is offline
deadman909
Veteran Member
Join Date: Oct 2008
Old 08-15-2009 , 12:18   Re: Advanced HP & AP *Updated* v0.2
Reply With Quote #29

Is this Plugin Still Being Supported
__________________

deadman909 is offline
Send a message via MSN to deadman909 Send a message via Yahoo to deadman909
deadman909
Veteran Member
Join Date: Oct 2008
Old 08-15-2009 , 12:19   Re: Advanced HP & AP *Updated* v0.2
Reply With Quote #30

Quote:
Originally Posted by diablo1999 View Post
#include <amxmodx>
#include <amxmod>
#include <amxmisc>
#include <fun>

new endhealth[32]
new endarmor[32]

public plugin_init() {
.......ON So On
I saw your CODE but there alot of SImple Mistakes that Messes it Up when trying to Compile it. They can be Easily FIXED
If anybody want the Code just PM me. I fixed the Simple Mistakes and it Compiled with no Problems Although i Still need to test it OUT
__________________


Last edited by deadman909; 08-15-2009 at 12:27.
deadman909 is offline
Send a message via MSN to deadman909 Send a message via Yahoo to deadman909
Reply


Thread Tools
Display Modes

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:14.


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