Raised This Month: $ Target: $400
 0% 

[engine] entity get/set edict


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
striker07
Veteran Member
Join Date: Mar 2012
Location: Solar System/Earth/Belgi
Old 09-21-2012 , 08:45   [engine] entity get/set edict
Reply With Quote #1

I can't seem to get this right and i have no idea what i'm doing wrong here, this is how i coded the
owner of a entity.
I debugged this using server_print

entity_set_edict:
PHP Code:
entity_set_edict(bombs[i], EV_ENT_ownerid// set owner (id is the index of the player)
server_print("%i :  name: %s   is the owner of this bomb"idszName)
 
/*Debug sais the correct id is set as the owner of the entity: 1 :  name: Sky-High  .:}O$G{:.   is the owner of this bomb 
no problems here.*/ 
entity_get_edict:
PHP Code:
new powner entity_get_edict(idEV_ENT_owner
new 
szName[35]
get_user_name(pownerszNamecharsmax(szName))
 
if( !
is_valid_ent(powner) )
   {
        
server_print("<<<<<<<<<DEBUG Get owner of the bombs is invalid: %i   %s,   the entity id is: %i "pownerszNameid )
 
        return 
PLUGIN_HANDLED
   

here is the problem, when retrieving the owner index of the entity id (id),
My server console shows this:
Spoiler
__________________

Working on:
[CSGO/CSS] Mmorpg - an extensive XP/level modulair platform
Progress: [♣♣♣♣♣♣♣|♣♣♣]

Last edited by striker07; 09-21-2012 at 08:46.
striker07 is offline
 


Thread Tools
Display Modes

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 08:22.


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