Es getplayerhandle
From EventScripts Community Encyclopedia
|
[edit] OverviewSyntax: Note: Command parameters are described inside the
< and > characters. Optional parameters are contained within [ and ] characters.Variation of this command that doesn't expand variables: es_xgetplayerhandle [edit] DescriptionReturns the hOwner property of userid and puts it in variable. [edit] Parameters
[edit] Examplesblock load { es_xload corelib es_xdoblock corelib/noisy_on } block unload { es_xdoblock corelib/noisy_off } event bullet_impact { // Modified version of Wonder's RocketGuns script for ES v1.2. // Create an explosion. es_give event_var(userid) env_explosion es_fire event_var(userid) env_explosion addoutput "imagnitude 100" // Set the location to that of the bullet. es_xsetinfo coords 0 es_format coords "origin %1 %2 %3" event_var(x) event_var(y) event_var(z) es_fire event_var(userid) env_explosion addoutput server_var(coords) // Set the owner to the shooter. es_xsetinfo owner 0 es_getplayerhandle owner event_var(userid) es_setindexprop server_var(eventscripts_lastgive) CBaseEntity.m_hOwnerEntity server_var(owner) // Cause the explosion! es_fire event_var(userid) env_explosion explode }
[edit] Notes
[edit] See also |
