[REQ]Civillian mode

Submit your code requests, and if you are good at coding come help others with their requests.
Kiruku
Loyal fan
Posts: 268
Joined: Wed Feb 22, 2006 12:00 pm
Contact:

Post by Kiruku »

gay there are tonns of Civi = FALSE .... but nowhere anything about forcerecall, not even if its not own town then forcerecall or smthing :S im a noob -.- i know self that im a noob u dont need to say it and spam the forum with that look i can do that self:


IM A NOOB A FUCKIGN RETARD I SUCK DICKS IM FUCKING GAY


lucky now? i dont need your fucking help ill ask some1 other only fucking noobs like me in the forum which doesnt even search just say shit.


p.s. thanks Crossfade this message wasnt to u :)
<img src='http://lichtdrache.lima-city.de/helbrea ... aramba.gif' border='0' alt='user posted image' />
Crossfade
Loyal fan
Posts: 354
Joined: Sun Mar 20, 2005 5:55 pm

Post by Crossfade »

Kiruku wrote:gay there are tonns of Civi = FALSE .... but nowhere anything about forcerecall, not even if its not own town then forcerecall or smthing :S im a noob -.- i know self that im a noob u dont need to say it and spam the forum with that look i can do that self:


IM A NOOB A FUCKIGN RETARD I SUCK DICKS IM FUCKING GAY


lucky now? i dont need your fucking help ill ask some1 other only fucking noobs like me in the forum which doesnt even search just say shit.


p.s. thanks Crossfade this message wasnt to u :)
maybe this will help you?

inside

Code: Select all

void CGame::CheckClientResponseTime()
at the bottom add

Code: Select all

if (m_pClientList[i] == NULL) break;
    if (m_bIsCrusadeMode == FALSE) {
    	if ((memcmp(m_pClientList[i]->m_cLocation, "arehunter", 9) == 0) && (m_pClientList[i]->m_bIsInCombatantOnlyZone == TRUE) && (m_pMapList[i]->m_bIsCitizenLimit == TRUE)) {
      RequestTeleportHandler(i, "2   ", "aresden", -1, -1);
    	}
    	else if ((memcmp(m_pClientList[i]->m_cLocation, "elvhunter", 9) == 0) && (m_pClientList[i]->m_bIsInCombatantOnlyZone == TRUE) && (m_pMapList[i]->m_bIsCitizenLimit == TRUE)) {
      RequestTeleportHandler(i, "2   ", "elvine", -1, -1);
    	}
    }
then inside

Code: Select all

void CGame::SetPlayingStatus(int iClientH)
under

Code: Select all

m_pClientList[iClientH]->m_bIsPlayerCivil = FALSE;
add

Code: Select all

m_pClientList[iClientH]->m_bIsInCombatantOnlyZone = FALSE;
then at the bottom of the same function add (Note* you may have to adjust around your function to fit this in correctly)

Code: Select all

if (memcmp(m_pClientList[iClientH]->m_cMapName, "2ndmiddle", 9) == 0 ||
	memcmp(m_pClientList[iClientH]->m_cMapName, "abaddon", 7) == 0 ||
	memcmp(m_pClientList[iClientH]->m_cMapName, "aresdend1", 9) == 0 ||
	memcmp(m_pClientList[iClientH]->m_cMapName, "areuni", 6) == 0 ||
	memcmp(m_pClientList[iClientH]->m_cMapName, "dglv2", 5) == 0 ||
	memcmp(m_pClientList[iClientH]->m_cMapName, "dglv3", 5) == 0 ||
	memcmp(m_pClientList[iClientH]->m_cMapName, "dglv4", 5) == 0 ||
	memcmp(m_pClientList[iClientH]->m_cMapName, "druncncity", 10) == 0 ||
	memcmp(m_pClientList[iClientH]->m_cMapName, "elvined1", 8) == 0 ||
	memcmp(m_pClientList[iClientH]->m_cMapName, "elvuni", 6) == 0 ||
	memcmp(m_pClientList[iClientH]->m_cMapName, "huntzone1", 9) == 0 ||
	memcmp(m_pClientList[iClientH]->m_cMapName, "huntzone2", 9) == 0 ||
	memcmp(m_pClientList[iClientH]->m_cMapName, "huntzone3", 9) == 0 ||
	memcmp(m_pClientList[iClientH]->m_cMapName, "huntzone4", 9) == 0 ||
	memcmp(m_pClientList[iClientH]->m_cMapName, "icebound", 8) == 0 ||
	memcmp(m_pClientList[iClientH]->m_cMapName, "inferniaA", 9) == 0 ||
	memcmp(m_pClientList[iClientH]->m_cMapName, "inferniaB", 9) == 0 ||
	memcmp(m_pClientList[iClientH]->m_cMapName, "maze", 4) == 0 ||
	memcmp(m_pClientList[iClientH]->m_cMapName, "middled1n", 9) == 0 ||
	memcmp(m_pClientList[iClientH]->m_cMapName, "middled1x", 9) == 0 ||
	memcmp(m_pClientList[iClientH]->m_cMapName, "middleland", 10) == 0 ||
	memcmp(m_pClientList[iClientH]->m_cMapName, "procella", 8) == 0 ||
	memcmp(m_pClientList[iClientH]->m_cMapName, "toh1", 4) == 0 ||
	memcmp(m_pClientList[iClientH]->m_cMapName, "toh2", 4) == 0 ||
	memcmp(m_pClientList[iClientH]->m_cMapName, "toh3", 4) == 0) {
  m_pClientList[iClientH]->m_bIsInCombatantOnlyZone = TRUE;
then add this new function whereever you want

Code: Select all

void CGame::SetCombatantOnlyZone(int iClientH)
{
	char cMapName[11];
	
	if (m_pClientList[iClientH] == NULL) return;
	
	ZeroMemory(cMapName, sizeof(cMapName));
	
	strcpy(cMapName, m_pMapList[m_pClientList[iClientH]->m_cMapIndex]->m_cName);
	
	m_pClientList[iClientH]->m_bIsInCombatantOnlyZone = FALSE;
	
	if (memcmp(m_pClientList[iClientH]->m_cMapName, "2ndmiddle", 9) == 0 ||
  	memcmp(m_pClientList[iClientH]->m_cMapName, "abaddon", 7) == 0 ||
  	memcmp(m_pClientList[iClientH]->m_cMapName, "aresdend1", 9) == 0 ||
  	memcmp(m_pClientList[iClientH]->m_cMapName, "areuni", 6) == 0 ||
  	memcmp(m_pClientList[iClientH]->m_cMapName, "dglv2", 5) == 0 ||
  	memcmp(m_pClientList[iClientH]->m_cMapName, "dglv3", 5) == 0 ||
  	memcmp(m_pClientList[iClientH]->m_cMapName, "dglv4", 5) == 0 ||
  	memcmp(m_pClientList[iClientH]->m_cMapName, "druncncity", 10) == 0 ||
  	memcmp(m_pClientList[iClientH]->m_cMapName, "elvined1", 8) == 0 ||
  	memcmp(m_pClientList[iClientH]->m_cMapName, "elvuni", 6) == 0 ||
  	memcmp(m_pClientList[iClientH]->m_cMapName, "huntzone1", 9) == 0 ||
  	memcmp(m_pClientList[iClientH]->m_cMapName, "huntzone2", 9) == 0 ||
  	memcmp(m_pClientList[iClientH]->m_cMapName, "huntzone3", 9) == 0 ||
  	memcmp(m_pClientList[iClientH]->m_cMapName, "huntzone4", 9) == 0 ||
  	memcmp(m_pClientList[iClientH]->m_cMapName, "icebound", 8) == 0 ||
  	memcmp(m_pClientList[iClientH]->m_cMapName, "inferniaA", 9) == 0 ||
  	memcmp(m_pClientList[iClientH]->m_cMapName, "inferniaB", 9) == 0 ||
  	memcmp(m_pClientList[iClientH]->m_cMapName, "maze", 4) == 0 ||
  	memcmp(m_pClientList[iClientH]->m_cMapName, "middled1n", 9) == 0 ||
  	memcmp(m_pClientList[iClientH]->m_cMapName, "middled1x", 9) == 0 ||
  	memcmp(m_pClientList[iClientH]->m_cMapName, "middleland", 10) == 0 ||
  	memcmp(m_pClientList[iClientH]->m_cMapName, "procella", 8) == 0 ||
  	memcmp(m_pClientList[iClientH]->m_cMapName, "toh1", 4) == 0 ||
  	memcmp(m_pClientList[iClientH]->m_cMapName, "toh2", 4) == 0 ||
  	memcmp(m_pClientList[iClientH]->m_cMapName, "toh3", 4) == 0) {
    m_pClientList[iClientH]->m_bIsInCombatantOnlyZone = TRUE;
  	}
}
make sure to define it in Game.h as

Code: Select all

void SetCombatantOnlyZone(int iClientH);
also inside Client.h add

Code: Select all

BOOL m_bIsInCombatantOnlyZone;

now that can go two ways.. you can turn m_bIsInCombatantOnlyZone = TRUE or FALSE. you should know which does what and play with them to see if you can make it so civilians can go into other maps. if you wanna add more maps just follow the other maps etc.

Credits goto Audioslave for the code.
Post Reply