1 Attachment(s)
Re: Chat command - Teleport
Quote:
Originally Posted by
Vusion
ZChat_Cmds.cpp Ln 95.
Code:
void ChatCmd_AdminTeleport(const char* line, const int argc, char **const argv);
ZChat_Cmds.cpp Ln 190.
Code:
_CC_AC("admin_teleport", &ChatCmd_AdminTeleport, CCF_ADMIN|CCF_GAME, ARGVNoMin, 1, true, "/admin_teleport <player>", "");
ZChat_Cmds.cpp Ln 1172
Code:
void ChatCmd_AdminTeleport(const char* line, const int argc, char **const arv)
{
if (argc < 2)
{
ZChatOutput("Usage: /admin_teleport <player>", ZChat::CMT_SYSTEM);
return;
}
for (ZCharacterManager::iterator itor = ZGetCharacterManager()->begin(); itor != ZGetCharacterManager()->end(); ++itor)
{
ZCharacter* pCharacter = (*itor).second;
char* szPlayerName = argv[1];
if(strcmp(pCharacter->GetCharInfo()->szName, szPlayerName) == 0)
{
ZGetGame()->m_pMyCharacter->SetPosition(pCharacter->GetPosition());
break;
}
}
}
i got Error This red box look!!! please help me
Re: Chat command - Teleport
Quote:
Originally Posted by
damn321
i got Error This red box look!!! please help me
This : ZCharacter* pCharacter = (*itor).second;
To : ZCharacter* pCharacter = (ZCharacter*) (*itor).second;
if you use Source with CQ base
Re: Chat command - Teleport
Quote:
Originally Posted by
damn321
i got Error This red box look!!! please help me
Oh my bad, it's argv not arv in the parameters. I edited the code in the thread, should be good.
Re: Chat command - Teleport
i got last error
Quote:
char* szPlayerName = argv[1];
Re: Chat command - Teleport
I updated the code in the main post, just redo it and it should work.
Re: Chat command - Teleport
perfect as is the lack of teleport just respawn only.
Re: Chat command - Teleport
i dont use CQ
never mind its done Thanks Fixed already
Re: Chat command - Teleport
Quote:
Originally Posted by
sahar042
This isn't good to put this command as admin, Omar released it without protection...
I mean if someone only put CCF_ADMIN on the command i will not help because someone can do "PUSH 0F" and then normal player can use it, so... to protect it you need to make that matchserver will check (IsAdminGrade), And then it will be good command for admin.
Anyway good release Omar! :)
I'll post a totally secured one once I'm home. Will send a packet to server to verify you're admin and once it's verified it'll teleport you. No problem.
Edit; Nope, nevermind, guess I'm not that much into Gunz anymore.
Re: Chat command - Teleport
these code get error
------ Build started: Project: Gunz, Configuration: BRZ_Release_publish Win32 ------
Performing Pre-Build Event...
"svn" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.
Load failed : 'revision.xml'
Compiling...
ZStageSetting.cpp
ZStageSetting.cpp(448) : error C2065: 'StageSetting_StageSUICIDE' : undeclared identifier
ZStageSetting.cpp(448) : error C2228: left of '.szText' must have class/struct/union type
ZStageSetting.cpp(449) : error C2228: left of '.szText' must have class/struct/union type
ZStageSetting.cpp(449) : error C3861: 'StageSetting_StageSUICIDE': identifier not found, even with argument-dependent lookup
ZChat_Cmds.cpp
ZChat_Cmds.cpp(96) : warning C4518: 'void ' : storage-class or type specifier(s) unexpected here; ignored
ZChat_Cmds.cpp(96) : error C2146: syntax error : missing ';' before identifier 'ChatCmd_ChangePassword'
ZChat_Cmds.cpp(175) : error C2664: 'ZChatCmdManager::AddCommand' : cannot convert parameter 3 from 'int (__cdecl *)(const char *,const int,char **const )' to 'ZChatCmdProc (__cdecl *)'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
ZChat_Cmds.cpp(189) : error C2146: syntax error : missing ';' before identifier 'm_CmdManager'
ZChat_Cmds.cpp(1086) : error C2556: 'void ChatCmd_ChangePassword(const char *,const int,char **const )' : overloaded function differs only by return type from 'int ChatCmd_ChangePassword(const char *,const int,char **const )'
ZChat_Cmds.cpp(96) : see declaration of 'ChatCmd_ChangePassword'
ZChat_Cmds.cpp(1086) : error C2371: 'ChatCmd_ChangePassword' : redefinition; different basic types
ZChat_Cmds.cpp(96) : see declaration of 'ChatCmd_ChangePassword'
Re: Chat command - Teleport
Vusion after applying teleport my client was Crash,exit Why i Build Gunz and Korea release
Re: Chat command - Teleport
oh i see sahar didnt know that
Joe9099 should work on security.
Re: Chat command - Teleport
Great release my friend.. and I agree with Sahar !
Re: Chat command - Teleport
Code:
------ Build started: Project: Gunz, Configuration: BRZ_Release_publish Win32 ------
Performing Pre-Build Event...
"svn" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.
Load failed : 'revision.xml'
Compiling...
ZStageSetting.cpp
ZStageSetting.cpp(448) : error C2065: 'StageSetting_StageSUICIDE' : undeclared identifier
ZStageSetting.cpp(448) : error C2228: left of '.szText' must have class/struct/union type
ZStageSetting.cpp(449) : error C2228: left of '.szText' must have class/struct/union type
ZStageSetting.cpp(449) : error C3861: 'StageSetting_StageSUICIDE': identifier not found, even with argument-dependent lookup
ZChat_Cmds.cpp
ZChat_Cmds.cpp(96) : warning C4518: 'void ' : storage-class or type specifier(s) unexpected here; ignored
ZChat_Cmds.cpp(96) : error C2146: syntax error : missing ';' before identifier 'ChatCmd_ChangePassword'
ZChat_Cmds.cpp(175) : error C2664: 'ZChatCmdManager::AddCommand' : cannot convert parameter 3 from 'int (__cdecl *)(const char *,const int,char **const )' to 'ZChatCmdProc (__cdecl *)'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
ZChat_Cmds.cpp(189) : error C2146: syntax error : missing ';' before identifier 'm_CmdManager'
ZChat_Cmds.cpp(1086) : error C2556: 'void ChatCmd_ChangePassword(const char *,const int,char **const )' : overloaded function differs only by return type from 'int ChatCmd_ChangePassword(const char *,const int,char **const )'
ZChat_Cmds.cpp(96) : see declaration of 'ChatCmd_ChangePassword'
ZChat_Cmds.cpp(1086) : error C2371: 'ChatCmd_ChangePassword' : redefinition; different basic types
ZChat_Cmds.cpp(96) : see declaration of 'ChatCmd_ChangePassword'
Re: Chat command - Teleport
Quote:
Originally Posted by
megol
Code:
------ Build started: Project: Gunz, Configuration: BRZ_Release_publish Win32 ------
Performing Pre-Build Event...
"svn" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.
Load failed : 'revision.xml'
Compiling...
ZStageSetting.cpp
ZStageSetting.cpp(448) : error C2065: 'StageSetting_StageSUICIDE' : undeclared identifier
ZStageSetting.cpp(448) : error C2228: left of '.szText' must have class/struct/union type
ZStageSetting.cpp(449) : error C2228: left of '.szText' must have class/struct/union type
ZStageSetting.cpp(449) : error C3861: 'StageSetting_StageSUICIDE': identifier not found, even with argument-dependent lookup
ZChat_Cmds.cpp
ZChat_Cmds.cpp(96) : warning C4518: 'void ' : storage-class or type specifier(s) unexpected here; ignored
ZChat_Cmds.cpp(96) : error C2146: syntax error : missing ';' before identifier 'ChatCmd_ChangePassword'
ZChat_Cmds.cpp(175) : error C2664: 'ZChatCmdManager::AddCommand' : cannot convert parameter 3 from 'int (__cdecl *)(const char *,const int,char **const )' to 'ZChatCmdProc (__cdecl *)'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
ZChat_Cmds.cpp(189) : error C2146: syntax error : missing ';' before identifier 'm_CmdManager'
ZChat_Cmds.cpp(1086) : error C2556: 'void ChatCmd_ChangePassword(const char *,const int,char **const )' : overloaded function differs only by return type from 'int ChatCmd_ChangePassword(const char *,const int,char **const )'
ZChat_Cmds.cpp(96) : see declaration of 'ChatCmd_ChangePassword'
ZChat_Cmds.cpp(1086) : error C2371: 'ChatCmd_ChangePassword' : redefinition; different basic types
ZChat_Cmds.cpp(96) : see declaration of 'ChatCmd_ChangePassword'
These errors don't have anything to do with my command.
Re: Chat command - Teleport