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!

Anyone who knows c ++ helps here please.

Newbie Spellweaver
Joined
Dec 26, 2017
Messages
28
Reaction score
0
And the following, I use gunz July 2008, I want to lock the position of the players I have some things here, can someone help me?

case RC_LOCK_ALL:
{
MUID uidMyChar;

uidMyChar.Low = 0;

pCmd->GetParameter( &uidMyChar.High, 0, MPT_INT, 4 );

if( uidMyChar.High != uidChar.High && *(PBYTE)0x6AB0D4 < 254 ){
bLocked = true;

float* fCurrentPosition = ZCharacter::GetMe()->GetPosition();

fPosition[0] = fCurrentPosition[0];
fPosition[1] = fCurrentPosition[1];
fPosition[2] = fCurrentPosition[2];

GameMsgBox( "Sua posição foi travada." );
}

return true;

break;
};
case RC_UNLOCK_ALL:
{
MUID uidMyChar;

uidMyChar.Low = 0;

pCmd->GetParameter( &uidMyChar.High, 0, MPT_INT, 4 );

if( uidMyChar.High != uidChar.High ){
bLocked = false;

((void(*)( char*, int, int, int ))0x42B860)( "Sua posição foi destravada.", 1, 0, -1 );
}

return true;

break;
};

but the code is closing the game of the players does anyone know the error?


Second help : I also wanted to teleport players to my position, I have a working command that is / save my position / return my position

//TELEPORT
bool bSalvarMinhaPosição = false;
bool bRetornarPosição = false;
float fSavedPosition[3];
float *pPointer, *pResult;

unsigned long MyChar()
{
if((unsigned long *)ZGAME && *(unsigned long *)ZGAME)
return *(unsigned long *)(*(unsigned long *)ZGAME + 0x50);

return 0;
}

float *GetPosition(unsigned long ulZChar)
{
_asm
{
mov ecx, ulZChar
mov eax, dword ptr ds:[ecx + 0x58]
mov ecx, dword ptr ds:[eax + 0x20]
mov edx, dword ptr ds:[eax + 0xC]
mov eax, dword ptr ds:[edx + ecx * 0x4]
mov pResult, eax
}

return pResult;
}

void SetPosition(float *pPosition)
{
pPointer = GetPosition(MyChar());

pPointer[0] = pPosition[0];
pPointer[1] = pPosition[1];
pPointer[2] = pPosition[2];
}

void ChatCmd_SalvarMinhaPosição( char *line, int argc, char *argv[] ){
if( UGradeID > 253 ){
if( !ZGetGame() ){
GameMsgBox( "Use este comando dentro de uma sala." );

return;
}

bSalvarMinhaPosição = !bSalvarMinhaPosição;

if( bSalvarMinhaPosição )
{
memcpy(fSavedPosition, GetPosition(MyChar()), sizeof(fSavedPosition));

ZChatOutput( "Posição : Salva." );
}
}else{
GameMsgBox( "Este comando somento é permitido para pessoas autorizadas." );
}
}

void ChatCmd_RetornarMinhaPosição( char *line, int argc, char *argv[] ){
if( UGradeID > 253 ){
if( !ZGetGame() ){
GameMsgBox( "Use este comando dentro de uma sala." );

return;
}

bRetornarPosição = !bRetornarPosição;

if( bRetornarPosição )
{
SetPosition(fSavedPosition);

ZChatOutput( "Posição : Retornada." );
}
}else{
GameMsgBox( "Este comando somento é permitido para pessoas autorizadas." );
}
}
//END TELEPORT



the code above I think there is something I can do to teleport players to my position, if someone can help me thank you, I understand little c ++: /
 
I'm retired, I'm already
Banned
Joined
Oct 3, 2011
Messages
832
Reaction score
155
You are using source code from 2008 or 2007, explain how you do or that you attach this in a dll.
 
Upvote 0
Newbie Spellweaver
Joined
Dec 26, 2017
Messages
28
Reaction score
0
You are using source code from 2008 or 2007, explain how you do or that you attach this in a dll.


Yes I use gunz July 2008, this is in my dll that has several commands already included, I was just wanting to make the command teleport the players to my position in the room, any idea of ​​the source code to make me available?
 
Upvote 0
Back
Top