Raised This Month: $ Target: $400
 0% 

Subplugin Submission [ZP] Extra Item : Player Aura V1.6


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
alan_el_more
Veteran Member
Join Date: Jul 2008
Location: amxmodx-es.com
Old 04-23-2009 , 17:21   Re: [ZP] Extra Item : Player Aura
Reply With Quote #1

Use pcvars instead of cvars, a variable to verify that the player has the aura and remove the module hamsandwich because it is unnecessary.
__________________
alan_el_more is offline
Zombie Lurker
Senior Member
Join Date: Mar 2009
Old 04-24-2009 , 08:15   Re: [ZP] Extra Item : Player Aura
Reply With Quote #2

Quote:
Originally Posted by _lol_ View Post
i recommend you to use client_prethink for this plugin....instead of your disgusting task....

bye !
Quote:
Originally Posted by alan_el_more View Post
Use pcvars instead of cvars, a variable to verify that the player has the aura and remove the module hamsandwich because it is unnecessary.
Thanks you for your suggestions! I think I'll just stick to the way I made the plugin... But be sure to give me more ideas! Gonna post an update once I get something to work and test it!
__________________
Zombie Lurker is offline
alan_el_more
Veteran Member
Join Date: Jul 2008
Location: amxmodx-es.com
Old 04-24-2009 , 08:20   Re: [ZP] Extra Item : Player Aura
Reply With Quote #3

I forget to tell you something...
In the string of cvar zp_aura_rgb should be separate issues have to be separated and must have 3 digits.
__________________
alan_el_more is offline
SwInGeR
Member
Join Date: Jan 2008
Location: Russia
Old 10-15-2010 , 11:17   Re: [ZP] Extra Item : Player Aura V1.6
Reply With Quote #4

Plugins work? This plugin give AUG
SwInGeR is offline
Zombie Lurker
Senior Member
Join Date: Mar 2009
Old 04-23-2009 , 19:01   Re: [ZP] Extra Item : Player Aura
Reply With Quote #5

alright then, I'll update the scripts after i get back from school.
__________________
Zombie Lurker is offline
dels
Senior Member
Join Date: Apr 2009
Old 04-24-2009 , 01:53   Re: [ZP] Extra Item : Player Aura
Reply With Quote #6

can someone suggest what color in RGB to create aura like in podbot omg itstoodark?
dels is offline
Zombie Lurker
Senior Member
Join Date: Mar 2009
Old 04-24-2009 , 04:50   Re: [ZP] Extra Item : Player Aura
Reply With Quote #7

Quote:
Originally Posted by dels View Post
can someone suggest what color in RGB to create aura like in podbot omg itstoodark?
What do you mean? You want to change the colour of the aura? Just use the 4 CVARs stated in the first post... and the scale is 0-255. 255 is the highest.
__________________
Zombie Lurker is offline
ZP_user#1
Junior Member
Join Date: Apr 2009
Old 04-24-2009 , 05:00   Re: [ZP] Extra Item : Player Aura
Reply With Quote #8

i found a bug....
you buy it -> you get killed (not infected) -> items remains to the next round

and could you plz bind a key so it can be turn on/off .....because sometimes it just shows zombies where you are and i want to turn it off....
ZP_user#1 is offline
Zombie Lurker
Senior Member
Join Date: Mar 2009
Old 04-24-2009 , 05:35   Re: [ZP] Extra Item : Player Aura
Reply With Quote #9

Quote:
Originally Posted by ZP_user#1 View Post
i found a bug....
you buy it -> you get killed (not infected) -> items remains to the next round

and could you plz bind a key so it can be turn on/off .....because sometimes it just shows zombies where you are and i want to turn it off....
Thats not a bug... its suppose to do so. I may add a CVAR to select if its for 1 round or not. And yes, I'l try to add a bind key to turn it on/off. (like flashlight)
__________________
Zombie Lurker is offline
alan_el_more
Veteran Member
Join Date: Jul 2008
Location: amxmodx-es.com
Old 04-24-2009 , 07:50   Re: [ZP] Extra Item : Player Aura
Reply With Quote #10

Something so i said
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <zombieplague>

#define TASK_AURA 5000
#define ID_AURA (taskid - TASK_AURA)

/*================================================================================
 [Plugin Customization]
=================================================================================*/

new const g_item_name[] = { "Player Aura" }
const 
g_item_cost 10
new const g_sound_buyaura[] = { "items/nvg_on.wav" }

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

new g_itemid_playeraurag_hasaura[33], radiusaura_rgb

public plugin_precache()
{
    
precache_sound(g_sound_buyaura)
}

public 
plugin_init()
{
    
register_plugin("[ZP] Extra Item: Player Aura""1.0""Zombie Lurker")
    
    
g_itemid_playeraura zp_register_extra_item(g_item_nameg_item_costZP_TEAM_HUMAN)

    
radius register_cvar("zp_aura_radius""20.0")
    
aura_rgb register_cvar("zp_aura_rgb""150 150 150")
}

public 
zp_extra_item_selected(playeritemid)
{
    if (
itemid == g_itemid_playeraura)
    {
        
engfunc(EngFunc_EmitSoundplayerCHAN_BODYg_sound_buyaura1.0ATTN_NORM0PITCH_NORM)
        new 
rgb
        
new Color[10], rgb[3][4]
        
get_pcvar_string(aura_rgbColorcharsmax(Color));
        
parse(Colorrgb[0], 3rgb[1], 3rgb[2], 3)
        
clamp(str_to_num(rgb[0]), 0255)
        
clamp(str_to_num(rgb[1]), 0255)
        
clamp(str_to_num(rgb[2]), 0255)
        
PLAYERAURA(player+TASK_AURAr,b)
        
g_hasaura[player] = true
    
}
}

public 
PLAYERAURA(taskidrgb)
{
    static 
Float:originF[3]
    
pev(taskidpev_originoriginF)
    
    
engfunc(EngFunc_MessageBeginMSG_PVSSVC_TEMPENTITYoriginF0)
    
write_byte(TE_DLIGHT)
    
engfunc(EngFunc_WriteCoordoriginF[0]) // x
    
engfunc(EngFunc_WriteCoordoriginF[1]) // y
    
engfunc(EngFunc_WriteCoordoriginF[2]) // z
    
write_byte(get_pcvar_num(radius)) // radius
    
write_byte(r// red
    
write_byte(g// green
    
write_byte(b// blue
    
write_byte(2// life
    
write_byte(0// decay rate
    
message_end()
}

public 
zp_user_infected_post(id)
{
    if (
g_hasaura[id])
        
remove_task(id+TASK_AURA)
}
public 
zp_user_humanized_post(id)
{
    if (
zp_get_user_survivor(id) && g_hasaura[id])
        
remove_task(id+TASK_AURA)

__________________

Last edited by alan_el_more; 04-24-2009 at 08:01.
alan_el_more 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 16:13.


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