## ETPub PCR alpha hacks (etpub_pcr_ah) ## (C) 2006-2007 PatheticCockroach.com ## This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 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) "!check all" had a minor output display problem "!heal" didn't work on self ------------------------- MODIFICATION STARTS HERE src\game\g_shrubbot.c (line 3829) **** REPLACE if(count==0) AP("chat \"^/check: ^2no player is godmoded here\" -1"); else AP(va("chat \"^/check: ^1%d players are currently godmoded\" -1", count)); if(count_clip==0) AP("chat \"^/check: ^2no player is noclipped here\" -1"); else AP(va("chat \"^/check: ^8%d players are currently noclipped\" -1", count_clip)); SBP_end(); return qtrue; **** WITH SBP_end(); if(count==0 && count_clip==0) { AP("chat \"^/check: ^2all players are currently clean\" -1"); return qtrue; } if(count==0) AP("chat \"^/check: ^2no player is godmoded here\" -1"); else AP(va("chat \"^/check: ^1%d players are currently godmoded\" -1", count)); if(count_clip==0) AP("chat \"^/check: ^2no player is noclipped here\" -1"); else AP(va("chat \"^/check: ^8%d players are currently noclipped\" -1", count_clip)); return qtrue; (line 2637) **** REPLACE 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: ^7!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: ^7%s\n", err)); return qfalse; } vic = &g_entities[pids[0]]; if(!_shrubbot_admin_higher(ent, &g_entities[pids[0]])) { SP("^/heal: ^7sorry, 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: ^7player must be on a team to be healed\n"); return qfalse; } ReviveEntity(vic , vic); AP(va("chat \"^/heal: ^7%s ^7got healed\" -1", vic->client->pers.netname)); return qtrue; } **** WITH 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) { if(!ent) { SPC("heal: you are on the console"); return qfalse; } vic=ent; } Q_SayArgv(1+skiparg, name, sizeof(name)); if(ClientNumbersFromString(name, pids) != 1) { G_MatchOnePlayer(pids, err, sizeof(err)); SP(va("^/heal: ^7%s\n", err)); return qfalse; } vic = &g_entities[pids[0]]; if(!_shrubbot_admin_higher(ent, &g_entities[pids[0]])) { SP("^/heal: ^7sorry, 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: ^7player must be on a team to be healed\n"); return qfalse; } ReviveEntity(vic , vic); AP(va("chat \"^/heal: ^7%s ^7got healed\" -1", vic->client->pers.netname)); return qtrue; }