Raised This Month: $51 Target: $400
 12% 

[Request] just add item nightvision


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
arvEL.
Senior Member
Join Date: Dec 2014
Location: Iraq
Old 01-09-2015 , 10:49   [Request] just add item nightvision
Reply With Quote #1

hello, how to add items nightvision here

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

// Configure flag
#define ADMIN_FLAG ADMIN_SLAY

enum _:g_eWeaponData name[32], cswammoammotype[32] }

new const 
g_szWeapons[][g_eWeaponData] =

    {
"weapon_m4a1"CSW_M4A1200"ammo_buckshot"},
    {
"weapon_ak47"CSW_AK47200"ammo_762nato"},
    {
"weapon_deagle"CSW_DEAGLE80"ammo_338magnum"},
    {
"weapon_smokegrenade"CSW_SMOKEGRENADE2"ammo_buckshot"},
    {
"weapon_hegrenade"CSW_HEGRENADE1"ammo_buckshot"}
    
}

public 
plugin_init() 
{
    
register_plugin("Give all players weapon""0.1""zmd94")
    
    
RegisterHam(Ham_Spawn"player""fw_PlayerRespawn"1)
}

public 
fw_PlayerRespawn(id)
{
    if(
is_user_alive(id) && get_user_flags(id) & ADMIN_FLAG)
    {
        for(new 
isizeof g_szWeaponsi++)
        {
            
give_item(idg_szWeapons[i][name])
                        
cs_set_user_bpammo(idg_szWeapons[i][csw], g_szWeapons[i][ammo])
                    
         
        }
        
set_user_armor(id100)
        
set_user_health(id100)
    }


Last edited by arvEL.; 01-09-2015 at 10:51.
arvEL. is offline
Send a message via Skype™ to arvEL.
Eagle07
Veteran Member
Join Date: May 2014
Location: Morocco :D
Old 01-09-2015 , 10:57   Re: [Request] just add item nightvision
Reply With Quote #2

cs_set_user_nvg(id,1)
in
fw_PlayerRespawn(id)
__________________

Last edited by Eagle07; 01-09-2015 at 10:58.
Eagle07 is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 01-09-2015 , 10:57   Re: [Request] just add item nightvision
Reply With Quote #3

Do you want it for normal CS or ZP mod?
zmd94 is offline
arvEL.
Senior Member
Join Date: Dec 2014
Location: Iraq
Old 01-09-2015 , 11:09   Re: [Request] just add item nightvision
Reply With Quote #4

Quote:
Originally Posted by zmd94 View Post
Do you want it for normal CS or ZP mod?
no bro for normal CS not Zombie
arvEL. is offline
Send a message via Skype™ to arvEL.
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 01-09-2015 , 11:12   Re: [Request] just add item nightvision
Reply With Quote #5

Then, just follow Eagle07 suggestion. ;)
zmd94 is offline
arvEL.
Senior Member
Join Date: Dec 2014
Location: Iraq
Old 01-09-2015 , 11:13   Re: [Request] just add item nightvision
Reply With Quote #6

Quote:
Originally Posted by Eagle07 View Post
cs_set_user_nvg(id,1)
in
fw_PlayerRespawn(id)
done! thx bro.
arvEL. is offline
Send a message via Skype™ to arvEL.
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 08:33.


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