Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Gunz 1.5 saving command

Junior Spellweaver
Joined
Nov 13, 2011
Messages
147
Reaction score
6
Hello, i was wondering how to save a Camera command by @ Vusion.. Other commands when you example: /damagebar then damagebar will show up even if you quit gunz and restart.. only the camera command isn't saving.. i tryed to add <CAMERA>400</CAMERA> to config.xml in client folder but nothing happened..

here is the camera command in Zchat_cmds.ccp It is working fine but it is NOT saving.. When u even leave the room and joining a new game room u have to do again /camera 400.. I want that it saves that people never has to change it more only if they want..

PHP:
void ChatCmd_Camera(const char* line, const int argc, char **const argv)
{
	if (argc < 2) 
	{
		ZChatOutput("Usage: /camera value (or default)", ZChat::CMT_SYSTEM);
		return;
	}

	if(!ZGetGame())
	{
		ZChatOutput("You must be in-game!", ZChat::CMT_SYSTEM);
		return;
	}

	float fDist = 0.0f;
	char szMsg[512] = "";

	if(strcmp(strlwr(argv[1]), "default") == 0)
		fDist = CAMERA_DEFAULT_DISTANCE;
	else
	{
		fDist = atoi(argv[1]);
		
		if((int)fDist < 150 || (int)fDist > 1000)
		{
			ZChatOutput("Must be between 150 and 1000!", ZChat::CMT_SYSTEM);
			return;
		}
	}

	ZCamera* pCamera = ZGetGameInterface()->GetCamera();
	pCamera->m_fDist = fDist;

	sprintf(szMsg, "Camera changed to %i!", (int)fDist);
	ZChatOutput(szMsg, ZChat::CMT_SYSTEM);
}
 
Back
Top