Re: SMLIB 0.9 BETA (266 Function Stocks)
Quote:
Quote:
However there is also Edict_FindByName, that doesn't need a classname to be specified, which searches for edicts only, edicts are all entities with index < 2048, it should be what you need :) name == m_iName == targetname, it's all the same. I don't why Valve has chosen such a weird keyvalue name for the entity name, but the keyvalue targetname is just an alias for m_iName. But don't mix this with the entity's classname, that are different functions. |
Re: SMLIB 0.9 BETA (266 Function Stocks)
Quote:
The issue i could see with just calling it that (i know its the same) is that he HAS functions for targetnames. I realize he is just extending the Valve confusion about this, but while he's writing wrappers, could he not add one that loops all entities AND the non-ent edicts for a "name" without classname. Also he should name the function i quoted Entity_FindByClassName |
Re: SMLIB 0.9 BETA (266 Function Stocks)
No, you got it wrong.
Entity_FindByName searches for a name, not classname, but it needs the classname to be specified, otherwise it has no way of finding none-edicts (serverside, logical or brush entities). But I would say if you want to get an entity by it's name, you know its classname mostly too, otherwise use Edict_FindByName(). I don't extend Valve's confusion, I escape it by naming it correctly. |
Re: SMLIB 0.9 BETA (266 Function Stocks)
What? It's simple to iterate all entities to find the matching targetname.
|
Re: SMLIB 0.9 BETA (266 Function Stocks)
This is great, just read over the entire list. I am going to start using this on the very next plugin I make!
|
Re: SMLIB 0.9 BETA (266 Function Stocks)
This function must not be correct :?
I would think that "connectspectate.phrases" should be replaced with path and "translations/connectspectate.phrases.txt" with szTranslationsPath. PHP Code:
|
Re: SMLIB 0.9 BETA (266 Function Stocks)
This function really should have and use the maxlen parameter mentioned in the comment, that is not present in the actual function, instead of the literal 2147483647!
PHP Code:
|
Re: SMLIB 0.9 BETA (266 Function Stocks)
Quote:
Thanks we just fixed that and will release a new smlib version shortly. Quote:
the function is actually right, the comment is just wrong. A size parameter isn't needed, since we we would never make the string bigger, it can only get shorter, that's why we take the max value of an unsigned integer. |
Re: SMLIB 0.9 BETA (266 Function Stocks)
I noticed that when using:
Client_SetActiveWeapon(client, weapon); if you set it to knife you do not see it until you fire. |
Re: SMLIB 0.9 BETA (266 Function Stocks)
I'll try to reproduce this on my testserver, but I think I know already know what is wrong, thx.
|
All times are GMT -4. The time now is 10:56. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.