Raised This Month: $ Target: $400
 0% 

weapon_c4 at round start


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
katna
Senior Member
Join Date: May 2010
Old 08-10-2011 , 05:31   weapon_c4 at round start
Reply With Quote #1

i'm trying to save the c4 entity id in a global variable but when the round start, instead of getting one "weapon_c4", i got 2 entity of c4 bombs... my question is, why do i get 2 of them ( at any map ) and which one is the real one...

at round start event. the code is only for checking why do i get 2
gBomb is returning the first c4 id but why there are 2 weapon_c4
Code:
gBomb = engfunc(EngFunc_FindEntityByString, -1, "classname", "weapon_c4")
	if (!gBomb)	
		return
Code:
        new EntClass[32]
	new Entity
	new Float:fOrigin[3]
	pev(1, pev_origin, fOrigin)
	while((Entity = engfunc (EngFunc_FindEntityInSphere, Entity, fOrigin, -1)))
	{
		pev(Entity, pev_classname, EntClass, 31)
		ColorChat(0, "Entity id: %d, Entity class: %s", Entity, EntClass)
	}
katna is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:45.


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