[Help]i need help with this code

04/19/2010 21:09 folip5#1
when im coding packets i would needa do something like ushort
PHP Code:
PacketType 0x3f2;
byte[] Packet = new byte[24];
  
uint Timer = (uint)Environment.TickCount
and when ur coding packets like this
PHP Code:
   *((ushort*)(2)) = (ushort)PacketType;
((
uint*)(4)) = (uint)Timer;

*((
ushort*)(8)) = (ushort)Charr.LocMap;
  *(
22) = (byte)(0x4a 0xff); 
so i needa explanations for uint Timer (uint)Environment.TickCount; need exlanations for the *((ushort*)(p + {"the number"}) = (uint)Timer
dunno whats that into the curly brackets and the type casted timer also
04/19/2010 23:02 DarkMessiah#2
Quote:
Originally Posted by folip5 View Post
when im coding packets i would needa do something like ushort
PHP Code:
PacketType 0x3f2;
byte[] Packet = new byte[24];
  
uint Timer = (uint)Environment.TickCount
and when ur coding packets like this
PHP Code:
   *((ushort*)(2)) = (ushort)PacketType;
((
uint*)(4)) = (uint)Timer;

*((
ushort*)(8)) = (ushort)Charr.LocMap;
  *(
22) = (byte)(0x4a 0xff); 
so i needa explanations for uint Timer (uint)Environment.TickCount; need exlanations for the *((ushort*)(p + {"the number"}) = (uint)Timer
dunno whats that into the curly brackets and the type casted timer also
Timer = timestamp
*((ushort*)(p + 2)) = (ushort)PacketType uses void pointer typcasted as a ushort* to store the value of the packet type (which is a ushort) at the offset
in the curly braces are offsets based on your (copypasta) packet structs.

if you can't get it from this, trade your pc in for a mac, cause viewing pictures is about as much as you will need to do :facepalm:
04/19/2010 23:19 MasterFletch#3
Quote:
Originally Posted by folip5 View Post
when im coding packets i would needa do something like ushort
PHP Code:
PacketType 0x3f2;
byte[] Packet = new byte[24];
  
uint Timer = (uint)Environment.TickCount
and when ur coding packets like this
PHP Code:
   *((ushort*)(2)) = (ushort)PacketType;
((
uint*)(4)) = (uint)Timer;

*((
ushort*)(8)) = (ushort)Charr.LocMap;
  *(
22) = (byte)(0x4a 0xff); 
so i needa explanations for uint Timer (uint)Environment.TickCount; need exlanations for the *((ushort*)(p + {"the number"}) = (uint)Timer
dunno whats that into the curly brackets and the type casted timer also
The problem is you are using C# code as PHP.
04/19/2010 23:34 Nullable#4
Quote:
Originally Posted by MasterFletch View Post
The problem is you are using C# code as PHP.
It's just a code tag.. I use that tag sometimes
OP: What darkmessiah said
04/19/2010 23:43 MasterFletch#5
Quote:
Originally Posted by Nullable View Post
It's just a code tag.. I use that tag sometimes
OP: What darkmessiah said
:facepalm:
04/19/2010 23:50 Nullable#6
Quote:
Originally Posted by MasterFletch View Post
:facepalm:
:awesome:
04/20/2010 00:23 DarkMessiah#7
Quote:
Originally Posted by Nullable View Post
:awesome:
[Only registered and activated users can see links. Click Here To Register...]
04/20/2010 15:40 folip5#8
Well i need better explanations thanks for trying anyways ill try to get it from that one but im not sure i will be able to.
04/20/2010 15:42 folip5#9
Quote:
Originally Posted by MasterFletch View Post
The problem is you are using C# code as PHP.
Well if you know another way lol
04/20/2010 18:25 Dr.unreal#10
Quote:
Originally Posted by folip5 View Post
Well if you know another way lol
:rtfm: :facepalm:
04/20/2010 23:16 Trigorio#11
Quote:
Originally Posted by folip5 View Post
Well if you know another way lol
Have you tied *code* */code* replacing the * with [ ]

Like this

Code:
 
Console.WriteLine("Test Test");
04/22/2010 04:25 DarkMessiah#12
Quote:
Originally Posted by Trigorio View Post
Have you tied *code* */code* replacing the * with [ ]

Like this

Code:
 
Console.WriteLine("Test Test");
[code] *insert stuff here* [/code]