Raised This Month: $ Target: $400
 0% 

server spray decal


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 12-14-2009 , 12:52   Re: server spray decal
Reply With Quote #1

You may block player decal and put your own using SVC_TEMPENTITY

PHP Code:
#define TE_WORLDDECAL               116      // Decal applied to the world brush
// write_byte(TE_WORLDDECAL)
// write_coord(position.x) decal position (center of texture in world)
// write_coord(position.y)
// write_coord(position.z)
// write_byte(texture index of precached decal texture name) 
I don't know if I'm right with that.
Maybe you can change what players see but not the local player sprite.
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.

Last edited by joropito; 12-14-2009 at 13:04.
joropito is offline
Send a message via MSN to joropito
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-14-2009 , 13:57   Re: server spray decal
Reply With Quote #2

Try this :

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

#define VERSION "0.0.1"

#define write_coord_f(%1) engfunc(EngFunc_WriteCoord, %1)

new g_iUniqueDecal

public plugin_init()
{
    
register_plugin("All Player Same Tag"VERSION"ConnorMcLeod")

    
g_iUniqueDecal engfuncEngFunc_DecalIndex "{siteB" )

    
register_message(SVC_TEMPENTITY"Message_TempEntity")
}

public 
Message_TempEntity()
{
    if( 
get_msg_arg_int(1) == TE_PLAYERDECAL )
    {
        
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
        
write_byte(TE_WORLDDECAL)
        
write_coord_f(get_msg_arg_float(2))
        
write_coord_f(get_msg_arg_float(3))
        
write_coord_f(get_msg_arg_float(4))
        
write_byte(g_iUniqueDecal)
        
message_end()
        return 
PLUGIN_HANDLED
    
}
    return 
PLUGIN_CONTINUE


-edit-
WTF engfunc( EngFunc_DecalIndex , "{siteB" ) returns always 0

I was using this in a private gore plugin and was working fine (hadn't rested it)
PHP Code:
GetBloodDecals()
{
    new 
szDecalName[11], i
    
while( sizeofg_iBloodDecals ) )
    {
        
formatex(szDecalNamecharsmaxszDecalName ), "{blood%d"1)
        
g_iBloodDecalsi++ ] = engfuncEngFunc_DecalIndex szDecalName )
    }
    
0
    
while( sizeofg_iBigBloodDecals ) )
    {
        
formatex(szDecalNamecharsmaxszDecalName ), "{bigblood%d"1)
        
g_iBigBloodDecalsi++ ] = engfuncEngFunc_DecalIndex szDecalName )
    }

__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 12-14-2009 at 14:09.
ConnorMcLeod is offline
Old 12-14-2009, 14:53
xbatista
This message has been deleted by xbatista. Reason: oh nooo
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 01:27.


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