Is the code you wrote not working then ?
Code:
GetListenServerHost handle GetListenServerHost() Get the host player on a listen server.
GetPlayerFromUserID handle GetPlayerFromUserID(int ID) Given a user id, return the entity, or null.
Both functions return a handle native. Hence the code below should work.
PHP Code:
{
local _player = GetPlayerFromUserID(params.userid);
if(_player != GetListenServerHost())
}
What exactly is the problem? Also what event are you trying to extract the _player from?
This may not be the most efficient way to do it, but you can use the native below and get the Entity index, if that's what you really want.
Code:
GetEntityIndex int GetEntityIndex() Returns the entity index. This is the same type of index used in most game events.
PHP Code:
{
local _player = GetPlayerFromUserID(params.userid);
local _EnID = null;
if(_player != GetListenServerHost())
{
_EnID = _player.GetEntityIndex();
}
}
Note: I did not test or try to compile this code. This is purely for directional purposes as I do not exactly know what you are trying to accomplish here.
__________________