pev_owner gets server name?
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:
|
Re: pev_owner gets server name?
get_user_name will return the hostname if id is lower then 1 or bigger then MaxClients
|
Re: pev_owner gets server name?
Would the players id be stored somewhere with pdata in the rocket/pipe ent itself?
|
Re: pev_owner gets server name?
Not sure. Try to add this.
Code:
|
Re: pev_owner gets server name?
Does the exact same thing with adding that.
|
Re: pev_owner gets server name?
are u on listen server?
|
Re: pev_owner gets server name?
Yes, but that shouldn't effect this problem since it can get the right name on 1 entity, but not the other 2?
|
Re: pev_owner gets server name?
try using a dedicated server
|
Re: pev_owner gets server name?
Tried and it still didn't work : /
I'm thinking about using 'EngFunc_FindEntityInSphere' to see if the pipe or rocket starts near the player that shot it. Think using that would be to unoptimized :O? |
Re: pev_owner gets server name?
Maybe I'm overlooking something here because it seems so simple.
Each weapon should have a corresponding entity "weaponbox" -- the pev_owner of that entity should be what you're looking for. |
| All times are GMT -4. The time now is 21:29. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.