Raised This Month: $ Target: $400
 0% 

about armor


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Fry!
Veteran Member
Join Date: Apr 2008
Location: Latvia
Old 03-21-2011 , 15:05   about armor
Reply With Quote #1

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(playerpev_armorvalue)
        new 
Float:g_newMaxSpeed fm_get_user_maxspeed(player) + 50.0
        set_pev
(playerpev_healthfloat(135))
        
set_pev(playerpev_maxspeedg_newMaxSpeed)
        
set_pev(playerpev_armorvalueg_currentArmor float(200))
    }
    
    return 
PLUGIN_CONTINUE
}

public 
fw_PlayerPreThink(player)
{
    new 
Float:g_newMaxSpeed fm_get_user_maxspeed(player) + 50.0
        
    set_pev
(playerpev_maxspeedg_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.
__________________
Quote:
Originally Posted by wisam187
why all the great scriptors..... always.... leave and let their works go into oblivion ???
i miss your way in making outstanding plugins...
this forum needs lots of the likes of you..... and less of the idiots that spread right now.
Fry! is offline
 



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 01:59.


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