mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-24 13:55:36 +03:00
Added support for TFC weapons in give_item
This commit is contained in:
parent
07ecc9f6fe
commit
0660f872eb
@ -215,13 +215,14 @@ static cell AMX_NATIVE_CALL give_item(AMX *amx, cell *params) // native give_ite
|
||||
//check for valid item
|
||||
if (strncmp(szItem, "weapon_", 7) &&
|
||||
strncmp(szItem, "ammo_", 5) &&
|
||||
strncmp(szItem, "item_", 5)) {
|
||||
strncmp(szItem, "item_", 5) &&
|
||||
strncmp(szItem, "tf_weapon_", 10)
|
||||
) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
//string_t item = MAKE_STRING(szItem);
|
||||
string_t item = ALLOC_STRING(szItem); // Using MAKE_STRING makes "item" contents get lost when we leave this scope! ALLOC_STRING seems to allocate properly...
|
||||
|
||||
// Create the entity, returns to pointer
|
||||
pItemEntity = CREATE_NAMED_ENTITY(item);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user