Get PlayerIndex from entity ID?
Hi!
Just found out that register_touch feeds the callfunc with two entities.. So how do I get the PlayerIndex based on the entity ID? :| |
Re: Get PlayerIndex from entity ID?
The first is Touched and the an other is Toucher?
|
Re: Get PlayerIndex from entity ID?
Ye, but the Toucher/Touched is not a playerindex.
|
Re: Get PlayerIndex from entity ID?
A player index can be a number from 0 - 32 (0 is all, 1 is a player, 2 is a player and so..)
|
Re: Get PlayerIndex from entity ID?
Nevermind, I was using pToucher insted of pTouched!
Sorry TitANious - Your right, I'm wrong |
Re: Get PlayerIndex from entity ID?
Generally, and if you need to block the touch, do :
register_touch("entity_class", "player", "function") Then : public function(iEntity, iPlayer) { } wiki about register_touch says that you have to register twice but this is false. |
Re: Get PlayerIndex from entity ID?
As note, to block you have to return PLUGIN_HANDLED;
|
| All times are GMT -4. The time now is 18:23. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.