PHP Code:
ActionAntidote(id)
{
g_is_poisoned[id] = false;
set_hudmessage(gHudRed, gHudGreen, gHudBlue, gfTextX, gfTextY, gHudEffects, gfHudFxTime, gfHudHoldTime, gfHudFadeInTime, gfHudFadeOutTime, gHudChannel);
show_hudmessage(id, "[%s %s]^nYou feel more healthy now!", PLUGIN_PREFIX, PLUGIN_VERSION);
}
ActionPoison(id, ent)
{
static property1[5];
GetProperty(ent, 1, property1);
new Float:team = str_to_float(property1);
if(team <= 1.0)
{
g_is_poisoned[id] = true;
}
else if(team == 2.0)
{
if(get_user_team(id) == 1)
{
g_is_poisoned[id] = true;
}
else if(get_user_team(id) == 2)
{
set_hudmessage(gHudRed, gHudGreen, gHudBlue, gfTextX, gfTextY, gHudEffects, gfHudFxTime, gfHudHoldTime, gfHudFadeInTime, gfHudFadeOutTime, gHudChannel);
show_hudmessage(id, "[%s %s]^nThis Block is only for Terrorists", PLUGIN_PREFIX, PLUGIN_VERSION);
}
}
else if(team == 3.0)
{
if(get_user_team(id) == 2)
{
g_is_poisoned[id] = true;
}
else if(get_user_team(id) == 1)
{
set_hudmessage(gHudRed, gHudGreen, gHudBlue, gfTextX, gfTextY, gHudEffects, gfHudFxTime, gfHudHoldTime, gfHudFadeInTime, gfHudFadeOutTime, gHudChannel);
show_hudmessage(id, "[%s %s]^nThis Block is only for Counter-Terrorist!", PLUGIN_PREFIX, PLUGIN_VERSION);
}
}
else
{
BM_Print(id, "[%s %s] You stepped on a Poison! Now you need to get an Antidote!", PLUGIN_PREFIX, PLUGIN_VERSION, g_is_poisoned[id]);
}
}