Raised This Month: $ Target: $400
 0% 

pev_owner gets server name?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 07-13-2007 , 12:45   pev_owner gets server name?
Reply With Quote #1

I'm trying to display the owners name of their weapon type on Team Fortress Classic. Some reason out of the 3 weapons below only the concussion grenade will display the real owner. The other 2 will display the servers host name. Does anyone know why this is and how to fix it?

PHP Code:
public hook_SetModel(entmodel[])
{
    
// THIS WILL GET THE REAL OWNERS NAME
    
if(equali(model"models/conc_grenade.mdl"))
    {
        new 
id pev(entpev_owner);
        
        new 
name[33];
        
get_user_name(idname32);
        
client_print(0print_chat"%s used a conc."name);
        
        
concsUsed[id] += 1;
    }
    
    
// THIS GETS THE SERVERS NAME
    
if(equali(model"models/pipebomb.mdl"))
    {
        new 
id pev(entpev_owner);
        
        new 
name[33];
        
get_user_name(idname32);
        
client_print(0print_chat"%s used a pipe."name);
        
        
pipesUsed[id] += 1;
    }
    
    
// THIS GETS THE SERVERS NAME
    
if(equali(model"models/rpgrocket.mdl"))
    {
        new 
id pev(entpev_owner);
        
        new 
name[33];
        
get_user_name(idname32);
        
client_print(0print_chat"%s used a rocket."name);
        
        
rocketsUsed[id] += 1;
    }
    
    return 
FMRES_HANDLED;

hlstriker is offline
 



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 21:29.


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