AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Items spawned by map (https://forums.alliedmods.net/showthread.php?t=188256)

Misery 06-24-2012 07:57

Items spawned by map
 
Hi,

I would like to know (it's probably a hard one...), is it possible to get the weapons spawned by the map itself?
I will explain... for example on aim_ak-colt (cstrike) or awp_map (cstrike) or even deathrun maps (cstrike), there are weapons the user can pick, which are part of the map.
For example on aim_* maps user is spawned near these, buy is restricted an he can pick them...

I was wondering, is there a way to know, for example into hook of CBaseEntity::Touch() (I use this so I can detect weapon pickups and get both player ids and weapon ids), if the picked weapon is actually an item spawned by the map?

Something like...

Code:

OnTouchWeapon(id, weaponid)
{
        if (isWeaponFromMap(entity_of_weapon_or_something))
                    bla bla bla
}

Get the idea? Is that possible?

Please help, greatly appreciated!
Thanks!

Cordially,
Misery

hornet 06-24-2012 08:26

Re: Items spawned by map
 
Weapon entities spawned by the map will have there classname be amoury_entity


All times are GMT -4. The time now is 06:15.

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