Raised This Month: $32 Target: $400
 8% 

Subplugin Submission [ZP] Addon: FPS Menu (Full Package)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ShaunCraft
Junior Member
Join Date: Sep 2021
Location: Alger, Algeria
Old 01-22-2022 , 11:26   [ZP] Addon: FPS Menu (Full Package)
Reply With Quote #1

Hello Everyone So This is The FPS Menu i try to made it For 5 or 4 months And Here My Plugin is Working Perfectly.

Informations:

-You Can Low Map Level By Low Map Lightning Option
-You Can Remove Or Restore The Aura By The First Option by use this native "zp_set_player_aura" Native
-You Can Change The NightVision Type With 3 Types By Using"zp_get_nivison_info" Native


Requirements:

* To Work Disabling Lightning Correctly you need set the command on zp zp_lightning to 0

* You Need To Choose Zombie Plague Version Then The Plugin Working Correctly

* If You Are Using ZP50 You Need to edit plugin to choose normal zp50 or custom version of zp50

Credits:

Gaspatcho(From ZPPV): For Making A Tutorial For Removing Or Restoring The Aura From This Link: https://zppv.boards.net/thread/4962/toggle-aura
ShaunCraft: For Making A Simple NightVision Changer System And Thanks To Gaspatcho to fix the changer system


Releases:

v1.0:
* First Release
* Fix The Lightning
* Supported For All ZPS
* With Natives


v1.1 Coming (Tested 90%):

* Added Disabling Flare Lightning
* New NightVision Style
* More Bug Fixes


Images:

















Download:

Download Here
Attached Files
File Type: sma Get Plugin or Get Source (zp43_addon_fpsmenu.sma - 315 views - 13.8 KB)
File Type: sma Get Plugin or Get Source (zp50_addon_fpsmenu.sma - 320 views - 22.3 KB)
File Type: sma Get Plugin or Get Source (zpa_addon_fpsmenu.sma - 168 views - 14.5 KB)
File Type: sma Get Plugin or Get Source (zpsp_addon_fpsmenu.sma - 262 views - 16.9 KB)

Last edited by ShaunCraft; 02-04-2022 at 10:45.
ShaunCraft is offline
GlobalPlague
Senior Member
Join Date: Feb 2016
Location: Pluto
Old 01-26-2022 , 16:04   Re: [ZP] Addon: FPS Menu (Full Package)
Reply With Quote #2

This is a useful plugin. I will use it in my ZP server.

Thanks for sharing it.
GlobalPlague is offline
ShaunCraft
Junior Member
Join Date: Sep 2021
Location: Alger, Algeria
Old 02-06-2022 , 04:24   Re: [ZP] Addon: FPS Menu (Full Package)
Reply With Quote #3

Guys Note:

If You Are Using Zombie Plague 5.0 you need to add nightvision natives like this

PHP Code:
public plugin_natives()
{
    
//Natives
    
register_library("zp50_nightvision")
    
register_native("zp_nightvision_get""native_nightvision_get")
    
register_native("zp_nightvision_set""native_nightvision_set")
    
    
//Modules And Filters
    
set_module_filter("module_filter")
    
set_native_filter("native_filter")
}

public 
native_nightvision_get(plugin_idnum_params)
{
    new 
id get_param(1)
    
    if(!
is_user_alive(id))
    {
        
log_error(AMX_ERR_NATIVE"[ZP] Invalid Player (%d)"id)
        return -
1
    
}
    
    return 
flag_get_boolean(g_NightVisionActiveid)
}

public 
native_nightvision_set(plugin_idnum_params)
{
    new 
id get_param(1)
    
    if(!
is_user_alive(id))
    {
        
log_error(AMX_ERR_NATIVE"[ZP] Invalid Player (%d)"id)
        return 
false
    
}
    
    new 
set get_param(2)
    
    if(!
set
    {
        
DisableNightVision(id)
        return 
true
    
}
    
    return 
EnableNightVision(id)

ShaunCraft is offline
XcReam
New Member
Join Date: Jun 2011
Old 02-07-2022 , 09:54   Re: [ZP] Addon: FPS Menu (Full Package)
Reply With Quote #4

i've installed the plugin, menu appears but options aren't working, what should i do?
XcReam is offline
.:cs.stambeto:.
Senior Member
Join Date: Feb 2010
Location: Bulgaria
Old 02-07-2022 , 13:27   Re: [ZP] Addon: FPS Menu (Full Package)
Reply With Quote #5

Is it possible to insert this option so that a player can turn on or off the fog and play during a card!
.:cs.stambeto:. is offline
ShaunCraft
Junior Member
Join Date: Sep 2021
Location: Alger, Algeria
Old 02-11-2022 , 11:13   Re: [ZP] Addon: FPS Menu (Full Package)
Reply With Quote #6

Try if u can
ShaunCraft is offline
ShaunCraft
Junior Member
Join Date: Sep 2021
Location: Alger, Algeria
Old 02-11-2022 , 11:14   Re: [ZP] Addon: FPS Menu (Full Package)
Reply With Quote #7

PHP Code:
/*============================================ ====================================

---------------------------------
-*- [ZP] Item: Zombie Madness -*-
---------------------------------

This plugin is part of Zombie Plague Mod and is distributed under the
terms of the GNU General Public License. Check ZP_ReadMe.txt for details.

============================================= ===================================*/

#define ITEM_NAME "Zombie Madness"
#define ITEM_COST 15

#include <amxmodx>
#include <cstrike>
#include <hamsandwich>
#include <amx_settings_api>
#include <cs_ham_bots_api>
#include <zp50_items>
#define LIBRARY_GRENADE_FROST "zp50_grenade_frost"
#include <zp50_grenade_frost>
#define LIBRARY_GRENADE_FIRE "zp50_grenade_fire"
#include <zp50_grenade_fire>
#define LIBRARY_NEMESIS "zp50_class_nemesis"
#include <zp50_class_nemesis>
#define LIBRARY_DRAGON "zp50_class_dragon"
#include <zp50_class_dragon>
#define LIBRARY_ASSASSIN "zp50_class_assassin"
#include <zp50_class_assassin>
#define LIBRARY_NIGHTCRAWLER "zp50_class_nightcrawler"
#include <zp50_class_nightcrawler>

native zp_set_player_aura(idc1c2c3radius)

// Settings file
new const ZP_SETTINGS_FILE[] = "zombieplague.ini"

// Default sounds
new const sound_zombie_madness[][] = { "zombie_plague/zombie_madness1.wav" }

#define SOUND_MAX_LENGTH 64

new Array:g_sound_zombie_madness

#define TASK_MADNESS 100
#define TASK_AURA 200
#define ID_MADNESS (taskid - TASK_MADNESS)
#define ID_AURA (taskid - TASK_AURA)

#define flag_get(%1,%2) (%1 & (1 << (%2 & 31)))
#define flag_get_boolean(%1,%2) (flag_get(%1,%2) ? true : false)
#define flag_set(%1,%2) %1 |= (1 << (%2 & 31))
#define flag_unset(%1,%2) %1 &= ~(1 << (%2 & 31))

new g_ItemID
new g_MadnessBlockDamage

new cvar_zombie_madness_time
new cvar_madness_aura_color_Rcvar_madness_aura_color_Gcvar_madness_aura_color_B

public plugin_init()
{
register_plugin("[ZP] Item: Zombie Madness"ZP_VERSION_STRING"ZP Dev Team")

RegisterHam(Ham_Spawn"player""fw_PlayerSpawn_Post"1)
RegisterHamBots(Ham_Spawn"fw_PlayerSpawn_Post"1)
RegisterHam(Ham_TraceAttack"player""fw_TraceAttack")
RegisterHamBots(Ham_TraceAttack"fw_TraceAttack")
RegisterHam(Ham_TakeDamage"player""fw_TakeDamage")
RegisterHamBots(Ham_TakeDamage"fw_TakeDamage")
RegisterHam(Ham_Killed"player""fw_PlayerKilled_Post"1)
RegisterHamBots(Ham_Killed"fw_PlayerKilled_Post"1)

cvar_zombie_madness_time register_cvar("zp_zombie_madness_time""5.0")
cvar_madness_aura_color_R register_cvar("zp_madness_aura_color_R""150")
cvar_madness_aura_color_G register_cvar("zp_madness_aura_color_G""0")
cvar_madness_aura_color_B register_cvar("zp_madness_aura_color_B""0")

g_ItemID zp_items_register(ITEM_NAMEITEM_COST)
}

public 
plugin_precache()
{
// Initialize arrays
g_sound_zombie_madness ArrayCreate(SOUND_MAX_LENGTH1)

// Load from external file
amx_load_setting_string_arr(ZP_SETTINGS_FILE"Sounds""ZOMBIE MADNESS"g_sound_zombie_madness)

// If we couldn't load custom sounds from file, use and save default ones
new index
if (ArraySize(g_sound_zombie_madness) == 0)
{
for (
index 0index sizeof sound_zombie_madnessindex++)
ArrayPushString(g_sound_zombie_madnesssound_zombie_madness[index])

// Save to external file
amx_save_setting_string_arr(ZP_SETTINGS_FILE"Sounds""ZOMBIE MADNESS"g_sound_zombie_madness)
}

// Precache sounds
new sound[SOUND_MAX_LENGTH]
for (
index 0index ArraySize(g_sound_zombie_madness); index++)
{
ArrayGetString(g_sound_zombie_madnessindexsoundcharsmax(sound))
precache_sound(sound)
}
}

public 
plugin_natives()
{
register_library("zp50_item_zombie_madness")
register_native("zp_item_zombie_madness_get""native_item_zombie_madness_get")

set_module_filter("module_filter")
set_native_filter("native_filter")
}
public 
module_filter(const module[])
{
if (
equal(moduleLIBRARY_NEMESIS) || equal(moduleLIBRARY_DRAGON) || equal(moduleLIBRARY_NIGHTCRAWLER) || equal(moduleLIBRARY_ASSASSIN) || equal(moduleLIBRARY_GRENADE_FROST) || equal(moduleLIBRARY_GRENADE_FIRE))
return 
PLUGIN_HANDLED;

return 
PLUGIN_CONTINUE;
}
public 
native_filter(const name[], indextrap)
{
if (!
trap)
return 
PLUGIN_HANDLED;

return 
PLUGIN_CONTINUE;
}

public 
native_item_zombie_madness_get(plugin_idnum_params)
{
new 
id get_param(1)

if (!
is_user_alive(id))
{
log_error(AMX_ERR_NATIVE"[ZP] Invalid Player (%d)"id)
return 
false;
}

return 
flag_get_boolean(g_MadnessBlockDamageid);
}

public 
zp_fw_items_select_pre(iditemidignorecost)
{
// This is not our item
if (itemid != g_ItemID)
return 
ZP_ITEM_AVAILABLE;

// Zombie madness only available to zombies
if (!zp_core_is_zombie(id))
return 
ZP_ITEM_DONT_SHOW;

// Zombie madness not available to Nemesis/Assassin/Dragon/Nightcrawler
if (LibraryExists(LIBRARY_NEMESISLibType_Library) && zp_class_nemesis_get(id) || LibraryExists(LIBRARY_ASSASSINLibType_Library) && zp_class_assassin_get(id) || LibraryExists(LIBRARY_DRAGONLibType_Library) && zp_class_dragon_get(id) || LibraryExists(LIBRARY_NIGHTCRAWLERLibType_Library) && zp_class_nightcrawler_get(id))
return 
ZP_ITEM_DONT_SHOW;

// Player already has madness
if (flag_get(g_MadnessBlockDamageid))
return 
ZP_ITEM_NOT_AVAILABLE;

return 
ZP_ITEM_AVAILABLE;
}

public 
zp_fw_items_select_post(iditemidignorecost)
{
// This is not our item
if (itemid != g_ItemID)
return;

// Do not take damage
flag_set(g_MadnessBlockDamageid)

// Madness aura
set_task(0.1"madness_aura"id+TASK_AURA__"b")

// Madness sound
new sound[SOUND_MAX_LENGTH]
ArrayGetString(g_sound_zombie_madnessrandom_num(0ArraySize(g_sound_zombie_madness) - 1), soundcharsmax(sound))
emit_sound(idCHAN_VOICEsound1.0ATTN_NORM0PITCH_NORM)

// Set task to remove it
set_task(get_pcvar_float(cvar_zombie_madness_ time), "remove_zombie_madness"id+TASK_MADNESS)
}

// Ham Player Spawn Post Forward
public fw_PlayerSpawn_Post(id)
{
// Not alive or didn't join a team yet
if (!is_user_alive(id) || !cs_get_user_team(id))
return;

// Remove zombie madness from a previous round
remove_task(id+TASK_MADNESS)
remove_task(id+TASK_AURA)
flag_unset(g_MadnessBlockDamageid)
}

// Ham Trace Attack Forward
public fw_TraceAttack(victimattacker)
{
// Non-player damage or self damage
if (victim == attacker || !is_user_alive(attacker))
return 
HAM_IGNORED;

// Prevent attacks when victim has zombie madness
if (flag_get(g_MadnessBlockDamagevictim))
return 
HAM_SUPERCEDE;

return 
HAM_IGNORED;
}

// Ham Take Damage Forward (needed to block explosion damage too)
public fw_TakeDamage(victiminflictorattacker)
{
// Non-player damage or self damage
if (victim == attacker || !is_user_alive(attacker))
return 
HAM_IGNORED;

// Prevent attacks when victim has zombie madness
if (flag_get(g_MadnessBlockDamagevictim))
return 
HAM_SUPERCEDE;

return 
HAM_IGNORED;
}

public 
zp_fw_grenade_frost_pre(id)
{
// Prevent frost when victim has zombie madness
if (flag_get(g_MadnessBlockDamageid))
return 
PLUGIN_HANDLED;

if (
flag_get(g_MadnessBlockDamageid) && !zp_grenade_frost_get(id)) zp_grenade_frost_set(idfalse)

return 
PLUGIN_CONTINUE;
}

public 
zp_fw_grenade_fire_pre(id)
{
// Prevent burning when victim has zombie madness
if (flag_get(g_MadnessBlockDamageid))
return 
PLUGIN_HANDLED;

if (
flag_get(g_MadnessBlockDamageid) && !zp_grenade_fire_get(id)) zp_grenade_fire_set(idfalse)

return 
PLUGIN_CONTINUE;
}

public 
zp_fw_core_cure(idattacker)
{
// Remove zombie madness task
remove_task(id+TASK_MADNESS)
remove_task(id+TASK_AURA)
flag_unset(g_MadnessBlockDamageid)
}

// Ham Player Killed Post Forward
public fw_PlayerKilled_Post(victimattackershouldgib)
{
// Remove zombie madness task
remove_task(victim+TASK_MADNESS)
remove_task(victim+TASK_AURA)
flag_unset(g_MadnessBlockDamagevictim)
}

// Remove Spawn Protection Task
public remove_zombie_madness(taskid)
{
// Remove aura
remove_task(ID_MADNESS+TASK_AURA)

// Remove zombie madness
flag_unset(g_MadnessBlockDamageID_MADNESS)
}

public 
client_disconnect(id)
{
// Remove tasks on disconnect
remove_task(id+TASK_MADNESS)
remove_task(id+TASK_AURA)
flag_unset(g_MadnessBlockDamageid)
}

// Madness aura task
public madness_aura(taskid)
{
zp_set_player_aura(ID_AURAget_pcvar_num(cvar_madness_aura_color_R), get_pcvar_num(cvar_madness_aura_color_G), get_pcvar_num(cvar_madness_aura_color_B), 20)


Last edited by ShaunCraft; 02-11-2022 at 11:16.
ShaunCraft is offline
ShaunCraft
Junior Member
Join Date: Sep 2021
Location: Alger, Algeria
Old 02-11-2022 , 11:15   Re: [ZP] Addon: FPS Menu (Full Package)
Reply With Quote #8

Flare Grenade (zp50) Example:

PHP Code:
/*================================================================================
    
    ---------------------------
    -*- [ZP] Grenade: Flare -*-
    ---------------------------
    
    This plugin is part of Zombie Plague Mod and is distributed under the
    terms of the GNU General Public License. Check ZP_ReadMe.txt for details.
    
================================================================================*/

#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <amx_settings_api>
#include <cs_weap_models_api>
#include <zp50_core>

// Settings file
new const ZP_SETTINGS_FILE[] = "zombieplague.ini"

// Default sounds
new const sound_grenade_flare_explode[][] = { "items/nvg_on.wav" }

#define MODEL_MAX_LENGTH 64
#define SOUND_MAX_LENGTH 64
#define SPRITE_MAX_LENGTH 64

// Models
new g_model_grenade_flare[MODEL_MAX_LENGTH] = "models/zombie_plague/v_grenade_flare.mdl"

native zp_set_player_flare(idc1,c2,c3radiusduration)

// Sprites
new g_sprite_grenade_trail[SPRITE_MAX_LENGTH] = "sprites/laserbeam.spr"

new Array:g_sound_grenade_flare_explode

// HACK: pev_ field used to store custom nade types and their values
const PEV_NADE_TYPE pev_flTimeStepSound
const NADE_TYPE_FLARE 4444
const PEV_FLARE_COLOR pev_punchangle
const PEV_FLARE_DURATION pev_flSwimTime

new g_trailSpr

new cvar_grenade_flare_durationcvar_grenade_flare_radiuscvar_grenade_flare_color

public plugin_init()
{
    
register_plugin("[ZP] Grenade: Flare"ZP_VERSION_STRING"ZP Dev Team")
    
    
register_forward(FM_SetModel"fw_SetModel")
    
RegisterHam(Ham_Think"grenade""fw_ThinkGrenade")
    
    
cvar_grenade_flare_duration register_cvar("zp_grenade_flare_duration""60")
    
cvar_grenade_flare_radius register_cvar("zp_grenade_flare_radius""25")
    
cvar_grenade_flare_color register_cvar("zp_grenade_flare_color""0")
}

public 
plugin_precache()
{
    
// Initialize arrays
    
g_sound_grenade_flare_explode ArrayCreate(SOUND_MAX_LENGTH1)
    
    
// Load from external file
    
amx_load_setting_string_arr(ZP_SETTINGS_FILE"Sounds""GRENADE FLARE"g_sound_grenade_flare_explode)
    
    
// If we couldn't load custom sounds from file, use and save default ones
    
new index
    
if (ArraySize(g_sound_grenade_flare_explode) == 0)
    {
        for (
index 0index sizeof sound_grenade_flare_explodeindex++)
            
ArrayPushString(g_sound_grenade_flare_explodesound_grenade_flare_explode[index])
        
        
// Save to external file
        
amx_save_setting_string_arr(ZP_SETTINGS_FILE"Sounds""GRENADE FLARE"g_sound_grenade_flare_explode)
    }
    
    
// Load from external file, save if not found
    
if (!amx_load_setting_string(ZP_SETTINGS_FILE"Weapon Models""GRENADE FLARE"g_model_grenade_flarecharsmax(g_model_grenade_flare)))
        
amx_save_setting_string(ZP_SETTINGS_FILE"Weapon Models""GRENADE FLARE"g_model_grenade_flare)
    if (!
amx_load_setting_string(ZP_SETTINGS_FILE"Grenade Sprites""TRAIL"g_sprite_grenade_trailcharsmax(g_sprite_grenade_trail)))
        
amx_save_setting_string(ZP_SETTINGS_FILE"Grenade Sprites""TRAIL"g_sprite_grenade_trail)
    
    
// Precache models
    
precache_model(g_model_grenade_flare)
    
g_trailSpr precache_model(g_sprite_grenade_trail)
}

public 
zp_fw_core_cure_post(idattacker)
{
    
// Set custom grenade model
    
cs_set_player_view_model(idCSW_SMOKEGRENADEg_model_grenade_flare)
}

public 
zp_fw_core_infect(idattacker)
{
    
// Remove custom grenade model
    
cs_reset_player_view_model(idCSW_SMOKEGRENADE)
}

// Forward Set Model
public fw_SetModel(entity, const model[])
{
    
// We don't care
    
if (strlen(model) < 8)
        return;
    
    
// Narrow down our matches a bit
    
if (model[7] != 'w' || model[8] != '_')
        return;
    
    
// Get damage time of grenade
    
static Float:dmgtime
    pev
(entitypev_dmgtimedmgtime)
    
    
// Grenade not yet thrown
    
if (dmgtime == 0.0)
        return;
    
    
// Grenade's owner is zombie?
    
if (zp_core_is_zombie(pev(entitypev_owner)))
        return;
    
    
// Smoke Grenade
    
if (model[9] == 's' && model[10] == 'm')
    {
        
// Build flare's color
        
static rgb[3]
        switch (
get_pcvar_num(cvar_grenade_flare_color))
        {
            case 
0// white
            
{
                
rgb[0] = 255 // r
                
rgb[1] = 255 // g
                
rgb[2] = 255 // b
            
}
            case 
1// red
            
{
                
rgb[0] = random_num(50,255// r
                
rgb[1] = // g
                
rgb[2] = // b
            
}
            case 
2// green
            
{
                
rgb[0] = // r
                
rgb[1] = random_num(50,255// g
                
rgb[2] = // b
            
}
            case 
3// blue
            
{
                
rgb[0] = // r
                
rgb[1] = // g
                
rgb[2] = random_num(50,255// b
            
}
            case 
4// random (all colors)
            
{
                
rgb[0] = random_num(50,200// r
                
rgb[1] = random_num(50,200// g
                
rgb[2] = random_num(50,200// b
            
}
            case 
5// random (r,g,b)
            
{
                switch (
random_num(13))
                {
                    case 
1// red
                    
{
                        
rgb[0] = random_num(50,255// r
                        
rgb[1] = // g
                        
rgb[2] = // b
                    
}
                    case 
2// green
                    
{
                        
rgb[0] = // r
                        
rgb[1] = random_num(50,255// g
                        
rgb[2] = // b
                    
}
                    case 
3// blue
                    
{
                        
rgb[0] = // r
                        
rgb[1] = // g
                        
rgb[2] = random_num(50,255// b
                    
}
                }
            }
            case 
6:
            {
                
rgb[0] = 100
                rgb
[1] = 45
                rgb
[2] = 9
            
}
        }
        
        
// Give it a glow
        
fm_set_rendering(entitykRenderFxGlowShellrgb[0], rgb[1], rgb[2], kRenderNormal16);
        
        
// And a colored trail
        
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
        
write_byte(TE_BEAMFOLLOW// TE id
        
write_short(entity// entity
        
write_short(g_trailSpr// sprite
        
write_byte(10// life
        
write_byte(10// width
        
write_byte(rgb[0]) // r
        
write_byte(rgb[1]) // g
        
write_byte(rgb[2]) // b
        
write_byte(200// brightness
        
message_end()
        
        
// Set grenade type on the thrown grenade entity
        
set_pev(entityPEV_NADE_TYPENADE_TYPE_FLARE)
        
        
// Set flare color on the thrown grenade entity
        
set_pev(entityPEV_FLARE_COLORrgb)
    }
}

// Ham Grenade Think Forward
public fw_ThinkGrenade(entity)
{
    
// Invalid entity
    
if (!pev_valid(entity)) return HAM_IGNORED;
    
    
// Get damage time of grenade
    
static Float:dmgtime
    pev
(entitypev_dmgtimedmgtime)
    
    new 
Float:current_time get_gametime()
    
    
// Check if it's time to go off
    
if (dmgtime current_time)
        return 
HAM_IGNORED;
    
    
// Check if it's one of our custom nades
    
switch (pev(entityPEV_NADE_TYPE))
    {
        case 
NADE_TYPE_FLARE// Flare
        
{
            
// Get its duration
            
new duration pev(entityPEV_FLARE_DURATION)
            
            
// Already went off, do lighting loop for the duration of PEV_FLARE_DURATION
            
if (duration 0)
            {
                
// Check whether this is the last loop
                
if (duration == 1)
                {
                    
// Get rid of the flare entity
                    
engfunc(EngFunc_RemoveEntityentity)
                    return 
HAM_SUPERCEDE;
                }
                
                
// Light it up!
                
flare_lighting(entityduration)
                
                
// Set time for next loop
                
set_pev(entityPEV_FLARE_DURATION, --duration)
                
set_pev(entitypev_dmgtimecurrent_time 2.0)
            }
            
// Light up when it's stopped on ground
            
else if ((pev(entitypev_flags) & FL_ONGROUND) && fm_get_speed(entity) < 10)
            {
                
// Flare sound
                
static sound[SOUND_MAX_LENGTH]
                
ArrayGetString(g_sound_grenade_flare_exploderandom_num(0ArraySize(g_sound_grenade_flare_explode) - 1), soundcharsmax(sound))
                
emit_sound(entityCHAN_WEAPONsound1.0ATTN_NORM0PITCH_NORM)
                
                
// Set duration and start lightning loop on next think
                
set_pev(entityPEV_FLARE_DURATIONget_pcvar_num(cvar_grenade_flare_duration)/2)
                
set_pev(entitypev_dmgtimecurrent_time 0.1)
            }
            else
            {
                
// Delay explosion until we hit ground
                
set_pev(entitypev_dmgtimecurrent_time 0.5)
            }
        }
    }
    
    return 
HAM_IGNORED;
}

// Flare Lighting Effects
flare_lighting(entityduration)
{
    
// Get origin and color
    //static Float:origin[3], 
    
static color[3]
    
//pev(entity, pev_origin, origin)
    
pev(entityPEV_FLARE_COLORcolor)
    
    
/*// Lighting
    engfunc(EngFunc_MessageBegin, MSG_PAS, SVC_TEMPENTITY, origin, 0)
    write_byte(TE_DLIGHT) // TE id
    engfunc(EngFunc_WriteCoord, origin[0]) // x
    engfunc(EngFunc_WriteCoord, origin[1]) // y
    engfunc(EngFunc_WriteCoord, origin[2]) // z
    write_byte(get_pcvar_num(cvar_grenade_flare_radius)) // radius
    write_byte(color[0]) // r
    write_byte(color[1]) // g
    write_byte(color[2]) // b
    write_byte(21) //life
    write_byte((duration < 2) ? 3 : 0) //decay rate
    message_end()
    
    // Sparks
    engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, origin, 0)
    write_byte(TE_SPARKS) // TE id
    engfunc(EngFunc_WriteCoord, origin[0]) // x
    engfunc(EngFunc_WriteCoord, origin[1]) // y
    engfunc(EngFunc_WriteCoord, origin[2]) // z
    message_end()*/
    
    
zp_set_player_flare(entitycolor[0], color[1], color[2], get_pcvar_num(cvar_grenade_flare_radius), (duration 2) ? 0)
    
}

// Set entity's rendering type (from fakemeta_util)
stock fm_set_rendering(entityfx kRenderFxNone255255255render kRenderNormalamount 16)
{
    static 
Float:color[3]
    
color[0] = float(r)
    
color[1] = float(g)
    
color[2] = float(b)
    
    
set_pev(entitypev_renderfxfx)
    
set_pev(entitypev_rendercolorcolor)
    
set_pev(entitypev_rendermoderender)
    
set_pev(entitypev_renderamtfloat(amount))
}

// Get entity's speed (from fakemeta_util)
stock fm_get_speed(entity)
{
    static 
Float:velocity[3]
    
pev(entitypev_velocityvelocity)
    
    return 
floatround(vector_length(velocity));


Last edited by ShaunCraft; 02-11-2022 at 11:16.
ShaunCraft is offline
ALonsoVIP4141
BANNED
Join Date: May 2021
Location: https://t.me/pump_upp
Old 02-19-2022 , 17:35   Re: [ZP] Addon: FPS Menu (Full Package)
Reply With Quote #9

Nice Plugin But Can you add Hid team players?
ALonsoVIP4141 is offline
Send a message via ICQ to ALonsoVIP4141 Send a message via AIM to ALonsoVIP4141 Send a message via Yahoo to ALonsoVIP4141 Send a message via Skype™ to ALonsoVIP4141
Lighht
New Member
Join Date: Jan 2024
Old 01-01-2024 , 15:25   Re: [ZP] Addon: FPS Menu (Full Package)
Reply With Quote #10

I dont have the include file for zp50_nightvision. May you provide one please?
Lighht 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 10:24.


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