Raised This Month: $32 Target: $400
 8% 

server spray decal


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Cheap_Suit
Veteran Member
Join Date: May 2004
Old 12-13-2004 , 17:05   server spray decal
Reply With Quote #1

anyknow how to set all users sprays to what ever spray decal in the server.

like if I only want them to spray my logo..
__________________
HDD fried, failed to backup files. Sorry folks, just don't have free time anymore. This is goodbye.
Cheap_Suit is offline
IMBA
BANNED
Join Date: Oct 2009
Old 12-14-2009 , 12:33   Re: server spray decal
Reply With Quote #2

I NEED THIS !
IMBA is offline
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 12-14-2009 , 12:52   Re: server spray decal
Reply With Quote #3

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 #4

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
Toastt
BANNED
Join Date: Nov 2009
Old 12-14-2009 , 21:09   Re: server spray decal
Reply With Quote #5

whats the command to set the time for the spray to reload
like someone sprayed, and now they have to wait a certain ammount of time to spray again o.O
Toastt is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-15-2009 , 05:48   Re: server spray decal
Reply With Quote #6

Global cvar is decalfrequency.
This cvar is used to set players offset m_flNextDecalTime (486) based on gametime when they spawn or when they kill a player.

Also, offset m_nCustomSprayFrames (485) seems to be -1 when tags are not allowed (the lambda hl logo for everyone) and 1 when it's a custom tag, HLSDK says that it can take values from 1 to 8 but it seems that sprays with more than 1 frame are not implemented.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Reply


Thread Tools
Display Modes

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 15:10.


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