Chat command - Teleport

Page 2 of 2 FirstFirst 12
Results 16 to 30 of 30
  1. #16
    Proficient Member damn321 is offline
    MemberRank
    Dec 2012 Join Date
    176Posts

    Re: Chat command - Teleport

    Quote Originally Posted by Vusion View Post
    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
    Attached Thumbnails Attached Thumbnails untitled.jpg  

  2. #17
    Developer / Patch Finder Tankado is offline
    MemberRank
    Oct 2011 Join Date
    The NetherlandsLocation
    451Posts

    Re: Chat command - Teleport

    Quote Originally Posted by damn321 View Post
    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

  3. #18
    Hi, I'm Omar! Vusion is offline
    MemberRank
    Jan 2011 Join Date
    HereLocation
    1,658Posts

    Re: Chat command - Teleport

    Quote Originally Posted by damn321 View Post
    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.

  4. #19
    Proficient Member damn321 is offline
    MemberRank
    Dec 2012 Join Date
    176Posts

    Re: Chat command - Teleport

    i got last error

    char* szPlayerName = argv[1];

  5. #20
    Hi, I'm Omar! Vusion is offline
    MemberRank
    Jan 2011 Join Date
    HereLocation
    1,658Posts

    Re: Chat command - Teleport

    I updated the code in the main post, just redo it and it should work.

  6. #21
    RailGunZ Soon! megol is offline
    MemberRank
    Jun 2012 Join Date
    261Posts

    Re: Chat command - Teleport

    perfect as is the lack of teleport just respawn only.

  7. #22
    Proficient Member damn321 is offline
    MemberRank
    Dec 2012 Join Date
    176Posts

    Re: Chat command - Teleport

    i dont use CQ

    never mind its done Thanks Fixed already

  8. #23
    Hi, I'm Omar! Vusion is offline
    MemberRank
    Jan 2011 Join Date
    HereLocation
    1,658Posts

    Re: Chat command - Teleport

    Quote Originally Posted by sahar042 View Post
    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.
    Last edited by Vusion; 16-01-13 at 11:00 PM.

  9. #24
    RailGunZ Soon! megol is offline
    MemberRank
    Jun 2012 Join Date
    261Posts

    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'

  10. #25
    Proficient Member damn321 is offline
    MemberRank
    Dec 2012 Join Date
    176Posts

    Re: Chat command - Teleport

    Vusion after applying teleport my client was Crash,exit Why i Build Gunz and Korea release

  11. #26
    Account Upgraded | Title Enabled! Wish Q is offline
    MemberRank
    Jul 2012 Join Date
    LiveScoreLocation
    456Posts

    Re: Chat command - Teleport

    oh i see sahar didnt know that
    Joe9099 should work on security.

  12. #27
    Yaaay! Tannous is offline
    MemberRank
    Jul 2012 Join Date
    KonohaLocation
    840Posts

    Re: Chat command - Teleport

    Great release my friend.. and I agree with Sahar !

  13. #28
    RailGunZ Soon! megol is offline
    MemberRank
    Jun 2012 Join Date
    261Posts

    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'

  14. #29
    Hi, I'm Omar! Vusion is offline
    MemberRank
    Jan 2011 Join Date
    HereLocation
    1,658Posts

    Re: Chat command - Teleport

    Quote Originally Posted by megol View Post
    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.

  15. #30
    Enthusiast Lexuse is offline
    MemberRank
    Jan 2013 Join Date
    48Posts

    Re: Chat command - Teleport

    Good Release Ty :D



Page 2 of 2 FirstFirst 12

Advertisement