AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Sprite Draw Above Player. (https://forums.alliedmods.net/showthread.php?t=9411)

TaRgEt*TuRkEy 01-18-2005 02:13

Sprite Draw Above Player.
 
I am wanting to know how to draw a sprite over a specfied user's head, but I am not sure how to start. I know how to precache, but lost everywhere else. If somebody could show me a plugin that works with drawing sprites around users, please point me to the plugin, or if you have some short code to help me, post that too. Thanks.

BTW - You'll be helping my next plugin :).

PM 01-18-2005 07:04

Maybe you could use the TE_PLAYERATTACHMENT message.. More info on it is in HLSdk somewhere in const.h. Or just search the forum :)

EKS 01-18-2005 18:20

I have a released plugin that does this :) Download rip our the parts of the source you want

TaRgEt*TuRkEy 01-18-2005 19:37

Alright, I think I figured it out, but for some reason it only sometimes works, and when it does, sometimes it is a vest model over the players head, or sometimes a tire model but shooting way out, really werid stuff. I got something like this. Both the player ids work (PlayerNum...) because I have them doing other things too, so that can't be the problem.

Code:
message_begin(MSG_ALL,SVC_TEMPENTITY)         write_byte(124)         write_byte(PlayerNum1_Random)         write_coord(65)         write_short(sprite)         write_short(600)         message_end() message_begin(MSG_ALL,SVC_TEMPENTITY)         write_byte(124)         write_byte(PlayerNum2_Random)         write_coord(65)         write_short(sprite)         write_short(600)         message_end()

I also precache the sprite.

Code:
public plugin_precache(){     sprite = precache_model("sprites/dead_fire.spr") }

TaRgEt*TuRkEy 01-21-2005 01:30

So nobody has had the problem with this thing displaying like dead corpses, gun models, armor vests above players heads? This is weird shit lol.

XxAvalanchexX 01-21-2005 15:57

What mod is this?

TaRgEt*TuRkEy 01-21-2005 17:44

Counterstrike. Sometimes it displays my sprite now though, but other times, it may show nothing, but like I said, sometimes crazy models from all over counterstrike. It's weird.


All times are GMT -4. The time now is 19:24.

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