## ETPub PCR alpha hacks (etpub_pcr_ah) ## (C) 2006-2007 PatheticCockroach.com ## This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License ## Derivative works may only be done if they are distributed with their source code. ## ## The original etpub_pcr_ah source and binaries can be found around http://www.patheticcockroach.com/etserver/etpub_pcr.php ## ## Note : ETPub PCR alpha hacks are just small modifications for ETPub (http://www.etpub.org) ## ## This !heal function was made by CHAOS - http://www.etpub.org/e107_plugins/forum/forum_viewtopic.php?18484.0 !heal : FLAG : H g_tyranny : yes USAGE : !heal (NAME|SLOT) DESCRIPTION : Revives dead ppl... ------------------------- MODIFICATION STARTS HERE src\game\g_shrubbot.c : (line 45) **** AFTER {"gib", G_shrubbot_gib, 'g', SCMDF_TYRANNY, "instantly gib a player", "[^3name|slot#^7]"}, **** ADD {"heal", G_shrubbot_heal, 'H', SCMDF_TYRANNY, "revive a player", "[^3name|slot#^7]"}, (line 2261) **** BEFORE qboolean G_shrubbot_slap(gentity_t *ent, int skiparg) { int pids[MAX_CLIENTS], dmg; **** ADD qboolean G_shrubbot_heal(gentity_t *ent, int skiparg) { int pids[MAX_CLIENTS]; char name[MAX_NAME_LENGTH], err[MAX_STRING_CHARS]; gentity_t *vic; if(Q_SayArgc() < 2+skiparg) { SP("heal usage: !heal [name|slot#]\n"); return qfalse; } Q_SayArgv(1+skiparg, name, sizeof(name)); if(ClientNumbersFromString(name, pids) != 1) { G_MatchOnePlayer(pids, err, sizeof(err)); SP(va("heal: %s\n", err)); return qfalse; } vic = &g_entities[pids[0]]; if(!_shrubbot_admin_higher(ent, &g_entities[pids[0]])) { SP("heal: sorry, but your intended victim has a higher admin" " level than you do.\n"); return qfalse; } if(!(vic->client->sess.sessionTeam == TEAM_AXIS || vic->client->sess.sessionTeam == TEAM_ALLIES)) { SP("heal: player must be on a team to be healed\n"); return qfalse; } ReviveEntity(vic , vic); AP(va("chat \"^oheal: ^7%s ^7Used Heal!\" -1", vic->client->pers.netname)); return qtrue; } src\game\g_shrubbot.h : (line 113) **** AFTER qboolean G_shrubbot_gib(gentity_t *ent, int skiparg); **** ADD qboolean G_shrubbot_heal(gentity_t *ent, int skiparg);