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

Subplugin Submission [ZP] Addon: Death Sprite[v1.4]


Post New Thread Reply   
 
Thread Tools Display Modes
bibu
Veteran Member
Join Date: Sep 2010
Old 12-04-2010 , 14:24   Re: [ZP] Addon: Death Sprite[v1.3]
Reply With Quote #21

This update with

Quote:
So that the sprite messsage is only displayed to those clients who have the dead player's sprite in their Potential Visible Set [PVS]
didn't work for me, I still see it from my other mates if they die.
bibu is offline
AfteR.
Veteran Member
Join Date: Dec 2008
Location: λ
Old 12-04-2010 , 14:30   Re: [ZP] Addon: Death Sprite[v1.3]
Reply With Quote #22

Pic?
AfteR. is offline
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 12-04-2010 , 14:45   Re: [ZP] Addon: Death Sprite[v1.3]
Reply With Quote #23

Quote:
Originally Posted by bibu View Post
This update with



didn't work for me, I still see it from my other mates if they die.
PVS is something different
Learn scripting and you will get it,
Basically it allows you to reduce data transfer between the client and the server
__________________

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
bibu
Veteran Member
Join Date: Sep 2010
Old 12-04-2010 , 17:10   Re: [ZP] Addon: Death Sprite[v1.3]
Reply With Quote #24

Quote:
Originally Posted by abdul-rehman View Post
PVS is something different
Learn scripting and you will get it,
Basically it allows you to reduce data transfer between the client and the server
It would be more cool to show the sprite only to the person who dies, that's what I meant.
bibu is offline
gunzz
Member
Join Date: Oct 2010
Old 12-04-2010 , 18:45   Re: [ZP] Addon: Death Sprite[v1.3]
Reply With Quote #25

Screen please
gunzz is offline
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 12-05-2010 , 02:25   Re: [ZP] Addon: Death Sprite[v1.3]
Reply With Quote #26

Quote:
Originally Posted by bibu View Post
It would be more cool to show the sprite only to the person who dies, that's what I meant.
You can simply try this:
Code:
#include <amxmodx> // Plugin Version new const VERSION[] = "1.3" // Max sprites const MAX_SPRITES = 3 // Customization(You do not need to add "sprites/") new const DEATH_SPRITE[][] = {     "93skull1" // zp_death_sprite_play 1 } // PCVars and caching of CVars new Toggle, Brightness, Message, Delay, PlayWhich new Toggle_Cached, Brightness_Cached, Float:Delay_Cached, PlayWhich_Cached // Player bools new bool:g_bConnected[33] // Sprite new DeathSprite[MAX_SPRITES] public plugin_init() {     register_plugin("[ZP] Addon: Death Sprite", VERSION, "eXcalibur.007")         // New Round     register_event("HLTV", "event_new_round", "a", "1=0", "2=0")         // Death Message event     register_event("DeathMsg", "event_DeathMsg", "a")         // PCVars     Toggle = register_cvar("zp_death_sprite", "1")     Brightness = register_cvar("zp_death_sprite_brightness", "255")     Message = register_cvar("zp_death_sprite_message", "[R]est.[I]n.[P]eace. - Grim Reaper")     Delay = register_cvar("zp_death_sprite_delay", "1.0")     PlayWhich = register_cvar("zp_death_sprite_play", "0") } public plugin_precache() {     // Format the directory so we do not need to add "sprites/"     static buffer[100], i         for(i = 0; i < sizeof DEATH_SPRITE; i++)     {         formatex(buffer, 99, "sprites/%s.spr", DEATH_SPRITE[i])         DeathSprite[i] = precache_model(buffer)     } } public plugin_cfg() {     // Cache CVars     set_task(0.5, "event_new_round")         // Get configs directory     static cfgdir[64]     get_localinfo("amxx_configsdir", cfgdir, 63)         // Execute custom config file     server_cmd("exec %s/DeathSprite.cfg", cfgdir)     server_exec() } public client_putinserver(id) {     // Set variables     g_bConnected[id] = true } public client_disconnect(id) {     // Set variables     g_bConnected[id] = false } public event_new_round() {     // CVars caching     Toggle_Cached = get_pcvar_num(Toggle)     Brightness_Cached = get_pcvar_num(Brightness)     Delay_Cached = get_pcvar_float(Delay)     PlayWhich_Cached = get_pcvar_num(PlayWhich) } public event_DeathMsg() {     // If CVar "zp_death_sprite" is 0     if(!Toggle_Cached)         return PLUGIN_CONTINUE         // Victim's index     static victim; victim = read_data(2)         // Valid victim & connected     if(victim && g_bConnected[victim])     {         static string[192]         get_pcvar_string(Message, string, 191)                 // Empty spaces = Disables print         if(string[0])             client_print(victim, print_chat, "%s", string)                 // Invalid CVar value         if(PlayWhich_Cached > MAX_SPRITES || PlayWhich_Cached < 0)         {             server_print("Please check zp_death_sprite_play and MAX_SPRITES constant. It must not be more than %i and not less than 0.", MAX_SPRITES)             return PLUGIN_CONTINUE         }                 set_task(Delay_Cached, "show_sprite", victim)     }     return PLUGIN_CONTINUE } public show_sprite(id) {     if(g_bConnected[id])     {         static sprite                 // Valid CVar value         if(PlayWhich_Cached == 0)             sprite = random_num(0, sizeof DEATH_SPRITE - 1)         else             sprite = PlayWhich_Cached - 1                 // Get user's origin         static origin[3]         get_user_origin(id, origin)                 message_begin(MSG_ONE_UNRELIABLE, SVC_TEMPENTITY, origin, id)         write_byte(TE_SPRITE)         write_coord(origin[0])         write_coord(origin[1])         write_coord(origin[2])         write_short(DeathSprite[sprite])         write_byte(15)         write_byte(Brightness_Cached)         message_end()     }     return PLUGIN_CONTINUE }
__________________

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
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 12-05-2010 , 14:27   Re: [ZP] Addon: Death Sprite[v1.3]
Reply With Quote #27

the sprite:

and some screens

seems i don't have them anymore
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 12-10-2010 , 10:36   Re: [ZP] Addon: Death Sprite[v1.3]
Reply With Quote #28

oh here they are from thread https://forums.alliedmods.net/showth...t=92011&page=7

__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 02-11-2011 , 22:17   Re: [ZP] Addon: Death Sprite[v1.3]
Reply With Quote #29

hey can you update this and make it work only for a specified class (human/zombie/nemesis)?
edit: and to scale the sprite up/down. it's huge...
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
bibu
Veteran Member
Join Date: Sep 2010
Old 02-12-2011 , 19:18   Re: [ZP] Addon: Death Sprite[v1.3]
Reply With Quote #30

And cvar for:

Quote:
It would be more cool to show the sprite only to the person who dies, that's what I meant.
bibu 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 13:55.


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