Raised This Month: $ Target: $400
 0% 

AddToFullPack


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 01-15-2011 , 15:42   AddToFullPack
Reply With Quote #1

Well I'm trying to make terrorists visible to other terrorists, but for some reason, when there are two or more players in the server it crashes. (We were both on CT)

PHP Code:
public func_AddToFullPack(es_handleeenthosthostflagsplayerpSet)
{
    if(!
player)
    {
        return 
FMRES_IGNORED
    
}
    
    if( 
cs_get_user_team(host) == CS_TEAM_T && cs_get_user_team(ent) == CS_TEAM_T )
    {
        
set_es(entES_RenderFxkRenderFxDistort)
        
set_es(entES_RenderColor, {000})
        
set_es(entES_RenderModekRenderTransAdd)
        
set_es(entES_RenderAmt127)
    }
    
    return 
FMRES_IGNORED 
}[ 
__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.
GXLZPGX is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-15-2011 , 15:53   Re: AddToFullPack
Reply With Quote #2

if( !player || !get_orig_retval() )
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 01-15-2011 , 19:31   Re: AddToFullPack
Reply With Quote #3

Quote:
Originally Posted by ConnorMcLeod View Post
if( !player || !get_orig_retval() )
Doesn't fix the issue :/
__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.
GXLZPGX is offline
Elusive138
Senior Member
Join Date: Dec 2010
Old 01-15-2011 , 21:09   Re: AddToFullPack
Reply With Quote #4

set_es uses es_handle, not ent id.

PHP Code:
// These functions are used with the entity_state data structure (FM_AddToFullPack)
// Get: 0 extra params - Return integer; 1 extra param - by ref float or vector or array
// Set: Use anything
// Use 0 for es_handle to specify the global entity_state handle
native get_es(es_handleEntityState:member, {Float,_}:...);
native set_es(es_handleEntityState:member, {Float,_}:...); 
Also, when I used AddToFullPack, I had to take out returns for it to work (might be just my code)...
Elusive138 is offline
Ryokin
Senior Member
Join Date: Jan 2010
Old 01-15-2011 , 22:05   Re: AddToFullPack
Reply With Quote #5

this should work..
PHP Code:
if(is_user_alive(host) && is_user_alive(ent) && cs_get_user_team(host) == CS_TEAM_T && cs_get_user_team(ent) == CS_TEAM_T)
{
        
set_es(es_handleES_RenderFxkRenderFxDistort)
        
set_es(es_handleES_RenderColor, {000})
        
set_es(es_handleES_RenderModekRenderTransAdd)
        
set_es(es_handleES_RenderAmt127)

</SPAN>
__________________
NH4CL + NaOH -> NH3 + H2O + NaCL
Ryokin is offline
Old 01-16-2011, 05:50
ConnorMcLeod
This message has been deleted by ConnorMcLeod. Reason: useless
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 02:08.


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