AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   DLLFunc_KeyValue (wtf m8?) (https://forums.alliedmods.net/showthread.php?t=11290)

Twilight Suzuka 03-14-2005 19:37

DLLFunc_KeyValue (wtf m8?)
 
DLLFunc_KeyValue, // void ) ( edict_t *pentKeyvalue, KeyValueData *pkvd );

How the hell do you use KeyValue to set one key value onto one entity? It only takes a keyvalue and a value, I'm so confused ;_;

In the engine C++ version of the native DispatchKeyValue, it uses a storage type KeyValue, which we can unfortunately, not make in small.

Code:
        cell *cVal = MF_GetAmxAddr(amx, params[1]);         int iValue = *cVal;         CHECK_ENTITY(iValue);         edict_t *pEntity = INDEXENT2(iValue);         KeyValueData kvd;         int iLength=0;         char *char1 = MF_GetAmxString(amx, params[2], 0, &iLength);         char *char2 = MF_GetAmxString(amx, params[3], 1, &iLength);         kvd.szClassName = (char*)STRING(pEntity->v.classname);         kvd.szKeyName = char1;         kvd.szValue = char2;         kvd.fHandled = 0;         MDLL_KeyValue(pEntity, &kvd);

See? Its different. So how the hell do we use this command for ONLY ONE entity, in small, through FM.


All times are GMT -4. The time now is 14:10.

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