Prev Previous Post   Next Post Next
Old 02-21-2009   #1
jiahsuan
Registered User
Newbie Member
 
jiahsuan's Avatar
 
Join Date: Jan 2009
Posts: 2
jiahsuan is an unknown quantity at this point
Help Teleport to waypoint

Code:
int __cdecl GET_BLIP_COORDS(int a1, int a2)  //0x00A0C430
{
int v2; // eax@1
int result; // eax@5

v2 = sub_7B53E0(a1);
if ( v2 < 0 )
{
   result = a2;
   __asm
   {
     xorps   xmm0, xmm0
     movss   dword ptr [eax+8], xmm0
     movss   dword ptr [eax+4], xmm0
     movss   dword ptr [eax], xmm0
   }
}
else
{
   _EAX = dword_FB1AF0[v2];
   if ( *(_BYTE *)(_EAX + 8) )
   {
     __asm
     {
       movss   xmm0, dword ptr [eax+30h]
       movss   xmm1, dword ptr [eax+34h]
       movss   xmm2, dword ptr [eax+38h]
     }
   }
   else
   {
     __asm
     {
       movss   xmm0, dword ptr [eax+1Ch]
       movss   xmm1, dword ptr [eax+20h]
       xorps   xmm2, xmm2
     }
   }
   result = a2;
   __asm
   {
     movss   dword ptr [eax], xmm0
     movss   xmm0, [esp+10h+var_4]
     movss   dword ptr [eax+4], xmm1
     movss   dword ptr [eax+8], xmm2
     movss   dword ptr [eax+0Ch], xmm0
   }
}
return result;
}

<!--c2--><!--ec2-->

<!--c1-->





<!--ec1-->
   int const *Blips = (int*)0x00FB1AF0;   //Blips On The Map
   isWpOn = false;

   for(int j = 0; j<50; j++)           //I dont know the limit of the array...
   {
       if(Blips[j] != 0)
       {
               Wpx = *(float*)(Blips[j] + 0x30); 
               Wpy = *(float*)(Blips[j] + 0x34); 
               Wpz = *(float*)(Blips[j] + 0x38);
       }

       if(Wpz == 0) break;        //It is waypoint. Maybe better solution like blip name. 
   }

   if(isWpOn) PrintText(m_font, "Press F12 For Teleport (%d, %d, %d)", (int)Wpx, (int)Wpy, (int)Wpz); //It is my  function to write text to screen.
<!--c2-->
how can make it to ASI ? thanks
jiahsuan is offline   Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 03:34 PM.