Get (GameEvents)

From - SDK
Jump to: navigation, search

These are a list of functions that allow you to get a value based off of a game event's key.


bool GetBool(void * evptr, const char * key)

int GetInteger(void * evptr, const char * key)

long GetLong(void * evptr, const char * key)

const char * GetString(void * evptr, const char * key)

float GetFloat(void* evptr, const char* key)

Required Arguments

evptr: The Event Information Pointer.

key The key found in the event's structure.


  • The value of the key, matching of the related type.


This example announces in your cheat console who died and what weapon was used.

void on_player_death( void * event_data )
    auto dead_player = GetPlayerFromEvent( sdk_information, sdk_event_information, event_data );
    sdk_information->OutputConsole( "%s just died to a %s",, sdk_event_information->GetString( event_data, "weapon") );