Code:
public infect() {
new players[32], all_num
get_players(players,all_num, "a")
for (new id=1; id<=32; id++) {
new dmghp = get_cvar_num("air_damagehp")
new health = get_user_health(id)
if(!hasoxygentank[id]) & (airinfect == 1)
{
set_user_health(id, health - dmghp )
}
if ( health - dmghp <= 0 )
{
client_print(id,print_chat,"You have just died from the infectious air.")
client_print(id,print_chat,"Remember to buy an Oxygen Tank next round :D")
}
}
}
this 2 lines
Code:
if(!hasoxygentank[id]) & (airinfect == 1)
{
errors
Code:
/home/groups/amxmodx/tmp/nVge9qAd.sma(197) : error 029: invalid expression, assumed zero
/home/groups/amxmodx/tmp/nVge9qAd.sma(197 -- 198) : error 029: invalid expression, assumed zero
and will that part of the code work? its suppose to minus a defined amount hp on everyone unless he has an oxygen tank
__________________