Raised This Month: $51 Target: $400
 12% 

Probrem with GetEntDataString and GetEntPropString


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Cuban_Dota
Member
Join Date: Jan 2015
Old 04-08-2015 , 13:50   Probrem with GetEntDataString and GetEntPropString
Reply With Quote #1

Hi i am using GetEntDataString and GetEntPropString for retrieving the m_iszPlayerNames property from the CDOTA_PlayerResource. The code is:

PHP Code:
new pr GetPlayerResourceEntity();
new 
Stringname[32];
new 
name_offset FindSendPropInfo("CDOTA_PlayerResource""m_iszPlayerNames");
GetEntDataString(prname_offsetnamesizeof(name)); 
the problem is the string is empty and it shouldnt be.

In the case of GetEntPropString:

GetEntPropString(pr, Prop_Send, "m_iszPlayerNames", name, sizeof(name), 0);

it gives an error that says that m_iszPlayerNames is not a string and it is a string.

Any ideas??

Last edited by Cuban_Dota; 04-08-2015 at 13:51.
Cuban_Dota is offline
Kailo
Senior Member
Join Date: Sep 2014
Location: Moscow, Russia
Old 04-08-2015 , 16:50   Re: Probrem with GetEntDataString and GetEntPropString
Reply With Quote #2

Invoke sm_dump_netprops <file> on server. In dump find your prop and see type. It'll set after prop name.

Last edited by Kailo; 04-08-2015 at 16:50.
Kailo is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 04-08-2015 , 17:16   Re: Probrem with GetEntDataString and GetEntPropString
Reply With Quote #3

If you're trying to fetch the client's name, why wouldn't you just use GetClientName?
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
Cuban_Dota
Member
Join Date: Jan 2015
Old 04-09-2015 , 12:27   Re: Probrem with GetEntDataString and GetEntPropString
Reply With Quote #4

Quote:
Originally Posted by Powerlord View Post
If you're trying to fetch the client's name, why wouldn't you just use GetClientName?
Cause GetClientName only works when a client is connected and i need to get this info no matter what. This netprop is written when a player enters the game and its never erased no matter if the client disconnects

Last edited by Cuban_Dota; 04-09-2015 at 12:27.
Cuban_Dota is offline
Miu
Veteran Member
Join Date: Nov 2013
Old 04-09-2015 , 12:56   Re: Probrem with GetEntDataString and GetEntPropString
Reply With Quote #5

try FindSendPropInfo("CDOTA_PlayerResource", "m_iszPlayerNames.0000");
Miu is offline
Cuban_Dota
Member
Join Date: Jan 2015
Old 04-09-2015 , 12:58   Re: Probrem with GetEntDataString and GetEntPropString
Reply With Quote #6

Quote:
Originally Posted by Miu View Post
try FindSendPropInfo("CDOTA_PlayerResource", "m_iszPlayerNames.0000");
going to try it,hope it works,thx
Cuban_Dota is offline
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 23:36.


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