[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 »

how to get the civillian mode working? im using 2.24d by 51LV3RY if i click change the play mdoe it wont do anything. and i want that when u get citzen u get civillian not combatant ... could some1 post this please?
<img src='http://lichtdrache.lima-city.de/helbrea ... aramba.gif' border='0' alt='user posted image' />
juggalo2
Spamtastic
Posts: 1144
Joined: Sun Jul 17, 2005 5:28 pm

Post by juggalo2 »

look in

Code: Select all

void CGame::InitPlayerData(int iClientH, char * pData, DWORD dwSize)

Code: Select all


	SetPlayingStatus(iClientH);
	int iTemp, iTemp2;
	iTemp = m_pClientList[iClientH]->m_iStatus;
	iTemp = 0x0FFFFFFF & iTemp;
	iTemp2 = iGetPlayerABSStatus(iClientH);
	iTemp = iTemp | (iTemp2 << 28);
	m_pClientList[iClientH]->m_iStatus = iTemp;

	if (m_pClientList[iClientH]->m_iLevel > 100) //change max civi lvl here
  if (m_pClientList[iClientH]->m_bIsPlayerCivil == TRUE)
  	ForceChangePlayMode(iClientH, FALSE);
Heres Funtion

Code: Select all

void CGame::RequestChangePlayMode(int iClientH)
{

	if (m_pClientList[iClientH] == NULL) return;
	if (m_pClientList[iClientH]->m_iPKCount > 0) return;
	if (m_pClientList[iClientH]->m_bIsInitComplete == FALSE) return;

	if (memcmp(m_pClientList[iClientH]->m_cMapName,"cityhall",8) != 0) return;

	if (m_pClientList[iClientH]->m_iLevel < 100||
  m_pClientList[iClientH]->m_bIsPlayerCivil == TRUE) {
  	if (memcmp(m_pClientList[iClientH]->m_cLocation, "aresden",7) == 0 ) strcpy(m_pClientList[iClientH]->m_cLocation,"arehunter");
  	else if (memcmp(m_pClientList[iClientH]->m_cLocation, "elvine",6) == 0 ) strcpy(m_pClientList[iClientH]->m_cLocation,"elvhunter");
  	else if (memcmp(m_pClientList[iClientH]->m_cLocation, "arehunter",9) == 0 ) strcpy(m_pClientList[iClientH]->m_cLocation,"aresden");
  	else if (memcmp(m_pClientList[iClientH]->m_cLocation, "elvhunter",9) == 0 ) strcpy(m_pClientList[iClientH]->m_cLocation,"elvine");

  	if (m_pClientList[iClientH]->m_bIsPlayerCivil == TRUE)
    m_pClientList[iClientH]->m_bIsPlayerCivil = FALSE;
  	else m_pClientList[iClientH]->m_bIsPlayerCivil = TRUE;

  	SendNotifyMsg(NULL,iClientH,DEF_NOTIFY_CHANGEPLAYMODE,NULL,NULL,NULL,m_pClientList[iClientH]->m_cLocation);
  	SendEventToNearClient_TypeA(iClientH,DEF_OWNERTYPE_PLAYER,MSGID_EVENT_MOTION,100,NULL,NULL,NULL);
  }
}

Try that out and let me know if it helps

edit
this is from 2.24b so just take a look into ur src and chekc if shit the same or replace it
<img src='http://lifeplaysu420.com/unknow/nightsign.png' border='0' alt='user posted image' /><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>Wanna make money for surfing the net sing up at <br><a href='http://www.cashfiesta.com/php/join.php? ... yprivitera' target='_blank'>cash fiesta</a><br>its all free hey why ntot make money while fucking around on the computer<br><br><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Kiruku
Loyal fan
Posts: 268
Joined: Wed Feb 22, 2006 12:00 pm
Contact:

Post by Kiruku »

this code is already in use ... and yea my server runns on a new map... maybe this makes some problems too....
<img src='http://lichtdrache.lima-city.de/helbrea ... aramba.gif' border='0' alt='user posted image' />
SlammeR
Loyal fan
Posts: 219
Joined: Fri Nov 04, 2005 1:52 am
Location: Brazil

Post by SlammeR »

Kiruku wrote: this code is already in use ... and yea my server runns on a new map... maybe this makes some problems too....
you're using all npcs in a place!?
OWNED!<br><img src='http://img50.imageshack.us/img50/1386/p ... 3vsqn2.gif' border='0' alt='user posted image' /><br><br><img src="http://hbtop50.com/button.php?u=hbuonline" alt="Helbreath Top 50 - Keepin' it real." border="0" /><br><a href='http://www.hbuonline.net' target='_blank'>Helbreath United</a>
Kiruku
Loyal fan
Posts: 268
Joined: Wed Feb 22, 2006 12:00 pm
Contact:

Post by Kiruku »

Code: Select all

void CGame::RequestCivilRightHandler(int iClientH, char *pData)
{
 char * cp, cData[100];
 DWORD * dwp;
 WORD * wp, wResult;
 int  iRet;

	if (m_pClientList[iClientH] == NULL) return;
	if (m_pClientList[iClientH]->m_bIsInitComplete == FALSE) return;
	if ((m_bAdminSecurity == TRUE) && (m_pClientList[iClientH]->m_iAdminUserLevel > 0)) return;

	// ?횑쨔횑 횉횗 ì¨￾쨋?쨩?횉 쩌횘쩌횙?íš‘ ?횜쨈횢ì¨￾챕 ì©￾횄쨔횓짹횉?쨩 째징íš￾첬 ì©Œì²  ì©￾첩쨈횢. 
	if (memcmp(m_pClientList[iClientH]->m_cLocation, "NONE", 4) != 0) wResult = 0;
	else wResult = 1;

	// ì¨Œì¨”ì¨˜ì§ ?íš‘ 5 ?횑횉횕쨋처쨉쨉 ì©￾횄쨔횓짹횉?쨩 ì©￾ì±µ?쨩 ì©Œì²  ì©￾첩쨈횢. 
	if (m_pClientList[iClientH]->m_iLevel < 5) wResult = 0;
	
	if (wResult == 1) {
  // íš‰ì² ?챌 ì¨￾횎?횉 ?íš‘ì¨￾ì§ ?쨩 횉횘쨈챌횉횗쨈횢.
  ZeroMemory(m_pClientList[iClientH]->m_cLocation, sizeof(m_pClientList[iClientH]->m_cLocation));
  strcpy(m_pClientList[iClientH]->m_cLocation, m_pMapList[m_pClientList[iClientH]->m_cMapIndex]->m_cLocationName);
	}

	// Side 횉횘쨈챌
	if (memcmp(m_pClientList[iClientH]->m_cLocation, "are", 3) == 0) 
  m_pClientList[iClientH]->m_cSide = 1;

	if (memcmp(m_pClientList[iClientH]->m_cLocation, "elv", 3) == 0) 
  m_pClientList[iClientH]->m_cSide = 2;

	dwp  = (DWORD *)(cData + DEF_INDEX4_MSGID);
	*dwp = MSGID_RESPONSE_CIVILRIGHT;
	wp   = (WORD *)(cData + DEF_INDEX2_MSGTYPE);
	*wp  = wResult;

	// v1.41 ì¨￾횎 ?íš‘ì¨￾ì§  ì©￾íš￾쨌íš￾íš￾횥 
	cp = (char *)(cData + DEF_INDEX2_MSGTYPE + 2);
	memcpy(cp, m_pClientList[iClientH]->m_cLocation, 10);
	cp += 10;

	// ??쨈채 ì¨￾횧ì©￾íš„íš￾ì² ì¨￾ì§￾ 횇짭쨋처?íš‘ì©￾챨횈짰쩔징째횚 ?체쩌횤
	iRet = m_pClientList[iClientH]->m_pXSock->iSendMsg(cData, 16);
	switch (iRet) {
	case DEF_XSOCKEVENT_QUENEFULL:
	case DEF_XSOCKEVENT_SOCKETERROR:
	case DEF_XSOCKEVENT_CRITICALERROR:
	case DEF_XSOCKEVENT_SOCKETCLOSED:
  // ì¨￾횧ì©￾íš„íš￾ì² ì¨￾ì§￾ 쨘ì¨￾쨀ì©￾ì¨‹ì§  ì©”징쨌짱째징 쨔횩쨩첵횉횩쨈횢ì¨￾챕 íš￾ì§￾째횇횉횗쨈횢.
  DeleteClient(iClientH, TRUE, TRUE);
  return;
	}
	// 횈짱쩌쨘?íš‘ 쨔횢짼챤쨔횉쨌횓 쩔횥ì©￾챌?쨩 쨩천쨌횓 쨘ì¨￾쨀ì©￾쨈횢. 
	SendEventToNearClient_TypeA(iClientH, DEF_OWNERTYPE_PLAYER, MSGID_EVENT_MOTION, DEF_OBJECTNULLACTION, NULL, NULL, NULL);
}
maybe it has something to do with this function...
<img src='http://lichtdrache.lima-city.de/helbrea ... aramba.gif' border='0' alt='user posted image' />
SlammeR
Loyal fan
Posts: 219
Joined: Fri Nov 04, 2005 1:52 am
Location: Brazil

Post by SlammeR »

on function:

Code: Select all

void CGame::RequestChangePlayMode(int iClientH)
erase this line:

Code: Select all

if (memcmp(m_pClientList[iClientH]->m_cMapName,"cityhall",8) != 0) return;
;)
OWNED!<br><img src='http://img50.imageshack.us/img50/1386/p ... 3vsqn2.gif' border='0' alt='user posted image' /><br><br><img src="http://hbtop50.com/button.php?u=hbuonline" alt="Helbreath Top 50 - Keepin' it real." border="0" /><br><a href='http://www.hbuonline.net' target='_blank'>Helbreath United</a>
Kiruku
Loyal fan
Posts: 268
Joined: Wed Feb 22, 2006 12:00 pm
Contact:

Post by Kiruku »

1. how to make every map allowed for civis? and 2nd i want that if u get citizen u get civi and not combatant...
<img src='http://lichtdrache.lima-city.de/helbrea ... aramba.gif' border='0' alt='user posted image' />
Tafka12
&lt;3 bd long time
Posts: 772
Joined: Wed Dec 28, 2005 6:32 pm

Post by Tafka12 »

Then search for the function that gives you civil.
Search yourself.
<img src='http://www.hot.ee/carvanho/taavi.png' border='0' alt='user posted image' /><br><br><img src='http://www.hot.ee/carvanho/Elvine.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/LieroX.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/Football.png' border='0' alt='user posted image' />
Kiruku
Loyal fan
Posts: 268
Joined: Wed Feb 22, 2006 12:00 pm
Contact:

Post by Kiruku »

trying...
<img src='http://lichtdrache.lima-city.de/helbrea ... aramba.gif' border='0' alt='user posted image' />
Kiruku
Loyal fan
Posts: 268
Joined: Wed Feb 22, 2006 12:00 pm
Contact:

Post by Kiruku »

okay cause of forcerecall is working so fine its bugged. i must get forcerecall for the towns isnt working (with forcerecalltime...) and the forcerecall for shop is working... for make it able. i cant get any other way. just maybe disable sometime in civi mode but i dont get what it is... so help please some1 :S
<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 »

look in the setplayerstatus function. there are also some other places you must look, i fixed this long ago but have to find my codes. if i find them ill put them out k.
Kiruku
Loyal fan
Posts: 268
Joined: Wed Feb 22, 2006 12:00 pm
Contact:

Post by Kiruku »

how to make Civis not forcerecalling on middleland? heelp :S i need this cause i dont have map aresden all is running on the map 3rdmiddle... and its like promiseland...
<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: how to make Civis not forcerecalling on middleland? heelp :S i need this cause i dont have map aresden all is running on the map 3rdmiddle... and its like promiseland...
its in source, look for it in source and there should be something about civilian mode = false thats not the real statement but just look for it about civs. and you should get it from there
ADDKiD
&lt;3 bd long time
Posts: 967
Joined: Tue Jul 12, 2005 8:07 pm
Location: Washington, USA
Contact:

Post by ADDKiD »

Kiruku wrote: how to make Civis not forcerecalling on middleland? heelp :S i need this cause i dont have map aresden all is running on the map 3rdmiddle... and its like promiseland...
Go kill yourself. If you don't understand it, your a fucking retard. Noobs don't use code!
Tafka12
&lt;3 bd long time
Posts: 772
Joined: Wed Dec 28, 2005 6:32 pm

Post by Tafka12 »

ADDKiD wrote:
Kiruku wrote: how to make Civis not forcerecalling on middleland? heelp :S i need this cause i dont have map aresden all is running on the map 3rdmiddle... and its like promiseland...
Go kill yourself. If you don't understand it, your a fucking retard. Noobs don't use code!
Easy now.
<img src='http://www.hot.ee/carvanho/taavi.png' border='0' alt='user posted image' /><br><br><img src='http://www.hot.ee/carvanho/Elvine.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/LieroX.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/Football.png' border='0' alt='user posted image' />
Post Reply