Im trying to add automated selfkill to my bot, but on 'awaiting gamestate,' the game crashes. Here's the code:
Code:void doSelfKill() { int health = cg->snap->ps.stats[STAT_HEALTH]; bool kill = false; if( health < ffs_selfkilllevel.value && health >= 0 ) { kill = true; if( ffs_selfkill.value == 1 && kill) { trap_SendConsoleCommand("kill\n"); } } else kill = false; }


LinkBack URL
About LinkBacks
Reply With Quote







Bookmarks