AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   possible write client side ? (https://forums.alliedmods.net/showthread.php?t=204011)

psychedelic_hallucinogen 12-26-2012 11:17

possible write client side ?
 
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")



Arkshine 12-26-2012 11:25

Re: possible write client side ?
 
No.

psychedelic_hallucinogen 12-26-2012 11:52

Re: possible write client side ?
 
possible make new get_user_msgid("StatusIcon") ? with new hud2.txt file ?
how dhudmessage

Arkshine 12-26-2012 12:30

Re: possible write client side ?
 
Not possible.

Xalus 12-26-2012 15:33

Re: possible
 
psychedelic_hallucinogen;
Could you stop resetting ur topics when you they answer you?

Why?
1. Its anoyying, and later it will answer other players.
2. There will get a moment that they wont help you anymore because of it.

Thanks


All times are GMT -4. The time now is 13:41.

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