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..
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);
}