AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Once again : Sprites =) (https://forums.alliedmods.net/showthread.php?t=10596)

hellraser 02-24-2005 06:31

Once again : Sprites =)
 
Hey all,today i'm trying to draw sprites on client hud so here's my code:
Code:

public testspr()  {
new sprite;
sprite = precache_model("sprites/TEST.spr");
message_begin(MSG_BROADCAST,SVC_TEMPENTITY);
write_byte(17);
write_coord(10); // coord, coord, coord (position)
write_coord(10);
write_coord(10);
write_short(sprite); // short (sprite index)
write_byte(20); // byte (scale in 0.1's) 
write_byte(200); // byte (brightness)
message_end();
}

And that actually doesn't do anything...I remeber once seeing a list of all base sprites included in CS but i can't find it anymore,could you guys please hook me up??

Thx,

XxAvalanchexX 02-24-2005 14:57

Only works in CS:

Code:
message_begin(MSG_ONE,get_user_msgid("StatusIcon"),{0,0,0},id); write_byte(1); // status (0=hide, 1=show, 2=flash) write_string("item_longjump"); // sprite name write_byte(0); // red write_byte(210); // green write_byte(0); // blue message_end();

Here is a complete list for CS:

selection
bucket1
bucket2
bucket3
bucket4
bucket5
bucket0
dmg_poison
dmg_bio
dmg_chem
dmg_drown
dmg_gas
dmg_cold
dmg_heat
dmg_rad
dmg_shock
number_0
number_1
number_2
number_3
number_4
number_5
number_6
number_7
number_8
number_9
divider
cross
dollar
minus
plus
c4
defuserstopwatch
smallskull
smallc4
smallvip
buyzone
rescue
escape
vipsafety
suit_full
suit_empty
suithelmet_full
suithelmet_empty
flash_full
flash_empty
flash_beam
train_back
train_stop
train_forward1
train_forward2
train_forward3
autoaim_c
title_half
title_life
d_knife
d_ak47
d_awp
d_deagle
d_famas
d_fiveseven
d_flashbang
d_g3sg116
d_galil16
d_glock18
d_grenade
d_m249
d_m3
d_m4a1
d_mp5navy
d_p228
d_p90
d_scout
d_sg550
d_sg552
d_ump45
d_usp
d_tmp
d_xm1014
d_skull
d_tracktrain
d_aug
d_mac10
d_elite
d_headshot
item_battery
item_healthkit
item_longjump
radar
hostage
bombticking1
bombticking
hostage4a
hostage3a
hostage2a
hostage1a
hostage4hostage3
hostage2
hostage1
radaropaque

They appear on the left side of the screen where other icons (like buy zone and C4) appear.

TotalNoobScripter 02-24-2005 16:51

Can you make sprtes appaer on huds for mods seperate than CS?

hellraser 02-24-2005 16:54

thx m8,do i need to precache the sprites?

TotalNoobScripter 02-24-2005 16:55

im assuming yes, but back to my question...

hellraser 02-24-2005 17:23

Just one thing,i created my sprite with Sprwiz,done the precaching but when using:
Code:

public makespr(id)  {
message_begin(MSG_ONE,get_user_msgid("StatusIcon"),{0,0,0},id);
write_byte(1); // status (0=hide, 1=show, 2=flash)
write_string("sprites/test.spr"); // sprite name
write_byte(0); // red
write_byte(210); // green
write_byte(0); // blue
message_end();
}

It won't show up on the hud,any ideas please?

Ps:Yes you can print sprites to huds on other mods,saw an NS plugin once doing it...

XxAvalanchexX 02-24-2005 18:46

You can only select a name from the list I showed you, you cannot add your own. You do not to precache them.

TotalNoobScripter 02-24-2005 19:01

what if u edit your sprites.txt or .ini or whatever?

XxAvalanchexX 02-24-2005 21:55

If you edit your cstrike/sprites/hud.txt then YOU will be able to see custom sprites, provided you know how to add them, but no one else will unless you can get everyone on your server to edit it on their own.

hellraser 02-25-2005 04:03

Oki doki thx m8 and
Code:

precache_generic
wouldn't do it right...?


All times are GMT -4. The time now is 14:01.

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