Raised This Month: $138 Target: $400
 34% 

request for kevlar/vip


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
1n1
Junior Member
Join Date: Aug 2019
Old 09-06-2019 , 17:19   request for kevlar/vip
Reply With Quote #1

Hey guys,
I have biohazard mod but i wanna add kevlar only for admins/vips with flag I(chat). And when someone zombie hit u dont infect permanently and the damage take from armor, so this zombie musy hit u like 4-5 times before infect u.
Attached Files
File Type: sma Get Plugin or Get Source (biohazard.sma - 9 views - 49.8 KB)

Last edited by 1n1; 09-12-2019 at 04:07. Reason: upload file
1n1 is offline
1n1
Junior Member
Join Date: Aug 2019
Old 09-09-2019 , 15:32   Re: request for kevlar/vip
Reply With Quote #2

bump
1n1 is offline
LearninG
Senior Member
Join Date: Apr 2019
Location: Iran
Old 09-09-2019 , 16:03   Re: request for kevlar/vip
Reply With Quote #3

hook "spawn" and check if is user human and has flag i then do this :
Code:
set_user_armor(id , 100)
or provide your sma so we can do something.

Last edited by LearninG; 09-09-2019 at 16:04.
LearninG is offline
DON KHAN 1
Senior Member
Join Date: Mar 2019
Location: Pakistan
Old 09-10-2019 , 04:06   Re: request for kevlar/vip
Reply With Quote #4

eg:
PHP Code:
    RegisterHam(Ham_Spawn"player""FwdHamPlayerSpawnPost"1
then use this code
PHP Code:
public FwdHamPlayerSpawnPost(id) {
    
    if(!
is_user_alive(id) && !is_user_human(id)) return HAM_IGNORED;
    if(!(
get_user_flags(id) & ADMIN_CHAT))
    
        return 
PLUGIN_HANDLED;

    if(
pev(idpev_armorvalue) < get_pcvar_num(human_armor))
    
set_pev(idpev_armorvaluefloat(get_pcvar_num(human_armor)))
    return 
HAM_IGNORED;

there is a cvar human_armor so make a cvar variable like this
PHP Code:
new human_armor
then register cvar by
Code:
human_armor = register_cvar("set_human_armor", "100");

NOTE: This code is didn't tested if u got any error so lemme know but this code should work without any error.
__________________
Hosting Servers: Angel Of Games

Facebook
My YouTube
Join My Forum
Ro{Y}aL WarLanD CommuniTy
Angel Of Games - Forum
Currently Working On: ADVANCED VIP + API : 70%
DON KHAN 1 is offline
1n1
Junior Member
Join Date: Aug 2019
Old 09-12-2019 , 04:07   Re: request for kevlar/vip
Reply With Quote #5

i add my sma if anyone can do something
I find this https://forums.alliedmods.net/showthread.php?p=598310 but not work. If anyone can fix and make it antiinfect armor for admins/vips with flag i will be good

Last edited by 1n1; 09-13-2019 at 15:10.
1n1 is offline
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 05:31.


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