Hey guys,
I havent been here for ages, and i have forgotten all, so i created small plugin on spawn which includes extra lil bit of hp, armor and last but not least speed, the problem is that armor doesn't take damage at all, it's feels like you dont have. -- i'm sorry i have to learn it all over again. :/ here is code
PHP Code:
public fwHamPlayerSpawnPost(player)
{
if (is_user_alive(player))
{
new g_currentArmor = pev(player, pev_armorvalue)
new Float:g_newMaxSpeed = fm_get_user_maxspeed(player) + 50.0
set_pev(player, pev_health, float(135))
set_pev(player, pev_maxspeed, g_newMaxSpeed)
set_pev(player, pev_armorvalue, g_currentArmor + float(200))
}
return PLUGIN_CONTINUE
}
public fw_PlayerPreThink(player)
{
new Float:g_newMaxSpeed = fm_get_user_maxspeed(player) + 50.0
set_pev(player, pev_maxspeed, g_newMaxSpeed)
}
how to fix it? Should i add Ham take damage also with armor?
and last question how can i create function when you can't buy armor anymore (i mean which is given on spawn) - like if you have one already, cause just bought armor will overwrite extra armor.
Thanks in advance.
__________________