Raised This Month: $ Target: $400
 0% 

Help / Support Free armor for VIP players


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mefistofeles
Member
Join Date: Jun 2013
Old 06-09-2013 , 20:25   Free armor for VIP players
Reply With Quote #1

I am looking for plugin, which gives CT with flag T (ADMIN_LEVEL_H) 60% of armor at the beginning of a round. Or is it enough to adjust e.g. this plugin http://forums.alliedmods.net/showthread.php?t=95352 ?
Can anybody help me with it please? I would very appreciate it.
Mefistofeles is offline
Catastrophe
Veteran Member
Join Date: Jul 2012
Location: somewhere between narnia
Old 06-10-2013 , 00:23   Re: Free armor for VIP players
Reply With Quote #2

Here , untested yet.

PHP Code:
#include <amxmodx>
#include <fun>

#define VIP ADMIN_LEVEL_H

new armorset

public plugin_init()
{
         
register_plugin("blabla""1.0""blablabla"
         
register_event("HLTV""event_newround""a""1=0""2=0")

         
armorset register_cvar("vip_armor""60")

}

public 
event_newround()
{

     for( new 
id 1id get_maxplayers(); id++)
        {
         
         if(
get_user_flags(id) & VIP)
         {
 
         
set_user_armor(idget_user_armor(id) + get_pcvar_num(armorset));
         }


        }   



__________________
You will find everything u need :-
Catastrophe is offline
Mefistofeles
Member
Join Date: Jun 2013
Old 06-10-2013 , 09:48   Re: Free armor for VIP players
Reply With Quote #3

file was compiled fine, but it just doesn't work then, it doesn't give an armor :/
Mefistofeles is offline
Catastrophe
Veteran Member
Join Date: Jul 2012
Location: somewhere between narnia
Old 06-10-2013 , 10:36   Re: Free armor for VIP players
Reply With Quote #4

Are u sure that u gave the players t flag and not h in users.ini + do u use any other mod in counter strike.... cuz this is the most basic code and of all this shud work.... :\
__________________
You will find everything u need :-
Catastrophe is offline
Mefistofeles
Member
Join Date: Jun 2013
Old 06-10-2013 , 13:04   Re: Free armor for VIP players
Reply With Quote #5

I have all the FLAGS (abcdefghijkmnopqrstu) and i am using Zombie plague 4.3 (by MeRcyLeZZ)+subplugins (e.g. zp_golden_ak,zp_lasermine...)
Mefistofeles is offline
Mefistofeles
Member
Join Date: Jun 2013
Old 06-10-2013 , 15:38   Re: Free armor for VIP players
Reply With Quote #6

I solved it...thx!
Mefistofeles is offline
Mefistofeles
Member
Join Date: Jun 2013
Old 06-10-2013 , 15:56   Re: Free armor for VIP players
Reply With Quote #7

Now, i am looking for plugin, which gives CT with flag T (ADMIN_LEVEL_H) 150 HP at the beginning of a round and plugin, which gives CT with flag T (ADMIN_LEVEL_H) Nightvision (without need to buying it) at the beginning of a round.

Can You help me?
Mefistofeles is offline
Catastrophe
Veteran Member
Join Date: Jul 2012
Location: somewhere between narnia
Old 06-11-2013 , 01:37   Re: Free armor for VIP players
Reply With Quote #8

#include <amxmodx>
#include <fun>
#include <cstrike>

#define VIP ADMIN_LEVEL_H

new armorset, hpset

public plugin_init()
{
register_plugin("blabla", "1.0", "blablabla")
register_event("HLTV", "event_newround", "a", "1=0", "2=0")

armorset = register_cvar("vip_armor", "60")
hpset = register_cvar("vip_hp", "150")

}

public
event_newround()
{

for( new
id = 1; id < get_maxplayers(); id++)
{

if(
get_user_flags(id) & VIP)
{

set_user_armor(id, get_user_armor(id) + get_pcvar_num(armorset))
set_user_health(id, get_pcvar_num(hpset))
cs_set_user_nvg(id, 1)
}


}


}
__________________
You will find everything u need :-
Catastrophe is offline
Mefistofeles
Member
Join Date: Jun 2013
Old 06-11-2013 , 12:36   Re: Free armor for VIP players
Reply With Quote #9

I have problems with this your plugin. It was compiled fine, but then doesn't work. However I got there another plugin below, which works absolutely fine for me, so would you adjust this mine? - and also add there even HP and Nightvision if it is possible.
Attached Files
File Type: sma Get Plugin or Get Source (armor_for_adm.sma - 709 views - 1.2 KB)

Last edited by Mefistofeles; 06-11-2013 at 12:39.
Mefistofeles is offline
Catastrophe
Veteran Member
Join Date: Jul 2012
Location: somewhere between narnia
Old 06-11-2013 , 12:52   Re: Free armor for VIP players
Reply With Quote #10

PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <fun>
#include <zombieplague>

#define ACCESS ADMIN_LEVEL_H

new cvar_armor_valueg_SayTexthpset
 
new sound_armor[] = { "items/tr_kevlar.wav" }
 
public 
plugin_init() 
{
    
register_plugin("[ZP] Free Armor for Admins""1.0""Vechta")
    
    
RegisterHam(Ham_Spawn"player""fw_Give_Armor"1)
    
cvar_armor_value register_cvar("vip_armor""50")
    
hpset register_cvar("vip_hp""150")  
    
    
g_SayText get_user_msgid("SayText")
}

public 
fw_Give_Armor(id)
{
    if (
is_user_alive(id) && !zp_get_user_zombie(id))
    {
        if (
get_user_flags(id) & ACCESS)
        {
            
set_user_armor(idget_pcvar_num(cvar_armor_value))
            
set_user_health(idget_pcvar_num(hpset))
            
cs_set_user_nvg(id1)
            
ColorPrint(id"^x04[ZP]^x01 You got^x04 %i^x01Armor!"get_pcvar_num(cvar_armor_value))
            
client_cmd(id"spk %s"sound_armor)
        }
    }
}
  

stock ColorPrint(const id, const input[], any:...)
{
    if( !
is_user_connectedid ) )
        return

    static 
msg[191]
    
vformat(msg190input3)
    
    
replace_all(msg190"!g""^4")
    
replace_all(msg190"!y""^1")
    
replace_all(msg190"!t""^3")
    
    
message_begin(MSG_ONE_UNRELIABLEg_SayText_id)
    
write_byte(id)
    
write_string(msg)
    
message_end()

__________________
You will find everything u need :-
Catastrophe is offline
Reply



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 12:29.


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