@@ -169,6 +169,23 @@ native bool DispatchSpawn(int entity);
169169 */
170170native bool DispatchKeyValue (int entity , const char [] keyName , const char [] value );
171171
172+ /* *
173+ * Dispatches a KeyValue into given entity using an integer value.
174+ *
175+ * @param entity Destination entity index.
176+ * @param keyName Name of the key.
177+ * @param value Integer value.
178+ * @return True on success, false otherwise.
179+ * @error Invalid entity index or lack of mod support.
180+ */
181+ stock bool DispatchKeyValueInt (int entity , const char [] keyName , int value )
182+ {
183+ char str [12 ];
184+ FormatEx (str , sizeof (str ), " %d " , value );
185+
186+ return DispatchKeyValue (entity , keyName , str );
187+ }
188+
172189/* *
173190 * Dispatches a KeyValue into given entity using a floating point value.
174191 *
@@ -373,7 +390,7 @@ native void EntityCollisionRulesChanged(int entity);
373390 * Sets an entity's owner (CBaseEntity::SetEntityOwner).
374391 *
375392 * @param entity The entity index.
376- * @param owner The owner entity index, can be invalid.
393+ * @param owner The owner entity index, can be invalid.
377394 * @error Invalid entity or lack of mod support.
378395 */
379396native void SetEntityOwner (int entity , int owner =INVALID_ENT_REFERENCE );
0 commit comments