Es.getgame

From EventScripts Community Encyclopedia



Method: getgame

Module: es
Class: (no class)
EventScripts version: 2.0

Method Overview

Table of Contents

Contents


Description

Stores the name of the current Source game that loaded EventScripts
This is the Python equivalent of: http://www.eventscripts.com/pages/es_getgame

Arguments

es.getgame()


Examples

import es
def load():
        es.regsaycmd('!game', 'script/game')
def game():
        game = es.getgame()
        es.msg('You are playing '+ game)

When the player says "!game" it will print the game you are playing in the chatbox.

Notes

The return of this will be (depending of the game):
"Counter-Strike: Source"
"Day of Defeat: Source"
"Half-Life 2 Deathmatch"


See Also

blog comments powered by Disqus