Raised This Month: $ Target: $400
 0% 

possible write client side ?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
psychedelic_hallucinogen
BANNED
Join Date: Dec 2012
Old 12-26-2012 , 11:17   possible write client side ?
Reply With Quote #1

head shot sprite

plugin work but recuest add line manual

possible write client side ?

cstrike/sprites/hud.txt possible add one line in client hud.txt ?
headshot 640 headshot 0 0 0 0

PHP Code:
#include <amxmodx>
#include <fakemeta>

new time_show_set[33] = {0,...}
new 
spr_current[33] = {0,...}
new 
iconstatus

#define sprites_hud "sprites/hud.txt"

public plugin_init()
{
register_event("DeathMsg","hs","a","3=1")
iconstatus get_user_msgid("StatusIcon")
}

public 
client_connect(id
{

if(
file_exists(sprites_hud)) 
{
write_file(sprites_hud,"headshot 640 headshot 0 0 0 0")
}
}

public 
hs()
{
new 
killer_id read_data(1)
show_spr(killer_id,1)
}

public 
show_spr(ididspr)
{

new 
sec_c get_systime()
time_show_set[id] = sec_c

hide_spr
(idspr_current[id])

new 
spr_name[33]
spr_name get_sprname(idspr)

if(!(
pev(id,pev_button) & FL_ONGROUND))

message_begin(MSG_ONE,iconstatus,{0,0,0},id)
write_byte(2)
write_string(spr_name)
message_end()
}

return 
PLUGIN_CONTINUE


public 
hide_spr(ididspr)
{
if (
idspr 0)
{
new 
spr_name[33]
spr_name get_sprname(idspr)

if(!(
pev(id,pev_button) & FL_ONGROUND))

message_begin(MSG_ONE,iconstatus,{0,0,0},id);
write_byte(0)
write_string(spr_name)
message_end()
}
}
return 
PLUGIN_CONTINUE


get_sprname(idspr)
{
new 
spr_name[33]
if (
idspr==1spr_name "headshot"

return spr_name
}


public 
plugin_precache()
{
precache_model("sprites/headshot.spr")


Last edited by YamiKaitou; 12-26-2012 at 20:16.
psychedelic_hallucinogen is offline
 



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:41.


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