Raised This Month: $ Target: $400
 0% 

Subplugin Submission [ZP] Armor Free


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 12-10-2010 , 14:05   Re: [ZP] Armor Free
Reply With Quote #1

Quote:
Originally Posted by John301 View Post
how can i do it only for admins?
Attached Files
File Type: sma Get Plugin or Get Source (zp_armor_free.sma - 624 views - 2.2 KB)
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 12-10-2010 , 14:16   Re: [ZP] Armor Free
Reply With Quote #2

Reset hud is not only called for player spawn but is also called on various other occasions so you should use Ham_Spawn
__________________

My Plugins For ZP

Inactive due to College and Studies
abdul-rehman is offline
Send a message via Yahoo to abdul-rehman Send a message via Skype™ to abdul-rehman
Vechta
Veteran Member
Join Date: Jun 2010
Old 12-10-2010 , 14:04   Re: [ZP] Armor Free
Reply With Quote #3

Here you have

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

#define ACCESS ADMIN_LEVEL_H

new cvar_armor_valueg_SayText
 
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("zp_armor""200")
    
    
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))
            
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()


Last edited by Vechta; 12-10-2010 at 14:07.
Vechta is offline
John301
BANNED
Join Date: Jul 2010
Old 12-11-2010 , 07:01   Re: [ZP] Armor Free
Reply With Quote #4

hmm it works great but i want only 100Armor nor 200 what can i do?
John301 is offline
jc980
Veteran Member
Join Date: Jan 2010
Location: God is with us...
Old 12-11-2010 , 07:22   Re: [ZP] Armor Free
Reply With Quote #5

Quote:
Originally Posted by John301 View Post
hmm it works great but i want only 100Armor nor 200 what can i do?
OMG

cvar_armor_value = register_cvar("zp_armor", "200")
--->>
cvar_armor_value = register_cvar("zp_armor", "100")
__________________
jc980 is offline
germs95
Member
Join Date: Dec 2010
Location: In my PS3
Old 12-11-2010 , 08:12   Re: [ZP] Armor Free
Reply With Quote #6

Help! How do I add an extra item into zombie plague? Ive put the amx item into plugin folder and add its name to plugins.ini but it wont show up! Pls help! I mean, all zp plugins wont work like zp_bank, zp_bazooka etc. :s
germs95 is offline
John301
BANNED
Join Date: Jul 2010
Old 12-11-2010 , 12:09   Re: [ZP] Armor Free
Reply With Quote #7

ohh sorry i knowed it xD
John301 is offline
NewKidz
Member
Join Date: Oct 2010
Old 12-12-2010 , 21:46   Re: [ZP] Armor Free
Reply With Quote #8

nice .
zombies will hard to infect them 1 by 1
NewKidz is offline
MustD1e
Senior Member
Join Date: Apr 2010
Old 03-07-2011 , 16:46   Re: [ZP] Armor Free
Reply With Quote #9

Can anybody edit plugin? Players always get armor= zp_armor in new round, if they have more armor, it becomes=zp_armor.
Need to change: If players have more armor than zp_armor, it has not changed at zp_armor.
__________________

Fly with us
MustD1e is offline
powq1111
Junior Member
Join Date: Nov 2011
Old 04-21-2012 , 13:17   Re: [ZP] Armor Free
Reply With Quote #10

Quote:
Originally Posted by MustD1e View Post
Can anybody edit plugin? Players always get armor= zp_armor in new round, if they have more armor, it becomes=zp_armor.
Need to change: If players have more armor than zp_armor, it has not changed at zp_armor.
PLEASE FIX THIS
powq1111 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 15:36.


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