منتدي اكواد

منتدي اكواد (https://code.vpscairo.com/index.php)
-   تطوير سيرفرات كونكر (https://code.vpscairo.com/forumdisplay.php?f=11)
-   -   System GameUpdates (https://code.vpscairo.com/showthread.php?t=133)

محمد ياسر 2019-04-23 02:17 PM

System GameUpdates
 

ده سستم الي اول ما الاعب يفتح اللعبه يلاقي رساله رزقه
بتقوله في تحديث في اللعبه وده كلام انت الي اتكتبه براحتك
كود PHP:

Network 

ۈآڤـﭥﺢـ ڤـۈلْـﮈړ

كود PHP:

 GamePackets 

اٌعٍمِـلِـ كُلِـاٌسُ جِدّيٌـدّ بّــ اٌسُمِـ ,
كود PHP:

GameUpdates 

ﺿﯾﭬ ﭴۆاھَہّ ﮃا

كود PHP:

using System
using System.Collections.Generic
using System.Linq
using System.Text

namespace 
LordsRoad.Network.GamePackets 

public class 
GameUpdates WriterInterfaces.IPacket 

private 
byte[] Buffer

public const 
byte 
Header 
0
Body 1
Footer 2

public 
GameUpdates(byte _Typestring _String

this.Buffer = new byte[29 _String.Length]; 
WriteUInt16((ushort)(Buffer.Length Cool0Buffer); 
WriteUInt16(20322Buffer); 
WriteUInt32((uint)Time32.timeGetTime().GetHashCode(), 4Buffer); 
Buffer[15] = 112
Buffer[16] = 1
Type _Type
_string _String


public 
byte Type 

get { return Buffer[14]; } 
set Buffer[14] = value; } 


public 
string _string 

get { return System.BitConverter.ToString(Buffer18Buffer[17]); } 
set WriteStringWithLength(value17Buffer); } 

public 
void Send(Client.GameClient client

client.Send(Buffer); 

public 
void Deserialize(byte[] buffer

this.Buffer buffer


public 
byte[] ToArray() 

return 
Buffer




خًشْ عٍ كُلِـاٌسُ
كود PHP:

PacketHandler.cs 

ﯚﺂ̣̥̐ﺑـﺣﺜ ﻋﻧـ ,

كود PHP:

static void AppendConnect(Connect appendConnectClient.GameClient client

آقٍّفٍّلِّهِّ مِّـنِّ آلِّسَّآلِّبٍّ وٍّحَّطِّ تٍّحَّتٍّيِّهِّ دٍّهِّ ,

كود PHP:

 private static void HeaderUpdates(string updateGameClient client

client.Send(new GameUpdates(GameUpdates.Headerupdate)); 

private static 
void BodyUpdates(string updateGameClient client

client.Send(new GameUpdates(GameUpdates.Bodyupdate)); 

private static 
void FooterUpdates(string updateGameClient client

client.Send(new GameUpdates(GameUpdates.Footerupdate)); 


خـشًـ ﻋ ڤـۈلْـﮈړ
كود PHP:

System 

آعَمـَلَ ﻛَلَآسُ جَدِيْدِ بِـ آسُمـَ ,

كود PHP:

GameUpdetess 

ﺿﯾﭬ ﭴۆاھَہّ ﮃا
كود PHP:

using System
using System.Collections.Generic
using System.Linq
using System.Text

namespace 
TroZenA.Database 

internal class GameUpdetess 

public static 
string Header ""
public static 
string Body1 ""
public static 
string Body2 ""
public static 
string Body3 ""
public static 
string Body4 ""
public static 
string Body5 ""
public static 
string Body6 ""
public static 
string Date ""


public static 
void LoadRates() 

MySqlReader reader = new MySqlReader(new MySqlCommand(MySqlCommandType.SELECT).Select("gameupdates")); 
if (
reader.Read()) 

Header reader.ReadString("Header"); 
Body1 reader.ReadString("Body1"); 
Body2 reader.ReadString("Body2"); 
Body3 reader.ReadString("Body3"); 
Body4 reader.ReadString("Body4"); 
Body5 reader.ReadString("Body5"); 
Body6 reader.ReadString("Body6"); 
// Body6 = reader.ReadString("Date"); 



Console.WriteLine("System GameUpdates Loaded."); 





رًّوّحّْ عَّلَّيٌّ كّْلَّاٍّسًّ
كود PHP:

 Writer 

ابحث عن ,
كود PHP:

public class Writer 


تحت القوس عـ طول ضيف ,
كود PHP:

public static void WriteStringWithLength(string argint offsetbyte[] buffer

if (
buffer == null
return; 
if (
offset buffer.Length 1
return; 
int till buffer.Length offset
till Math.Min(arg.Lengthtill); 
buffer[offset] = (byte)arg.Length
offset++; 
byte[] argEncoded Program.Encoding.GetBytes(arg); 
Array.
Copy(argEncoded0bufferoffsettill); 


خش ع كلاس
كود PHP:

PacketHandler.cs 

ابحث عن ,
كود PHP:

client.UnionExploits client.UnionExploits

هتلاقي تحتيه ,
كود PHP:

client.LoadItemStats(); 

تحتيها عـ طول ضيف ,
كود PHP:

#region Game Updates 


HeaderUpdates("Welcome All in Server" DateTime.Now.ToString(), client); 
BodyUpdates("The Server Has Hard Drops 200 Cps Randomn "client); 
BodyUpdates("All New Characters And System Is Here ! Smile"client); 
BodyUpdates("Guild War Start Eevry Friday At [20:00] End Every At [24:00]"client); 
BodyUpdates("Any One Need Any Help"client); 
FooterUpdates("Enjoy With Us in Server! Smile"client); 


#endregion 

لو عايز تعدل ع الرسائل عدل عليها من هنا
كود PHP:

#region Game Updates 


HeaderUpdates("Welcome All in Server" DateTime.Now.ToString(), client); 
BodyUpdates("The Server Has Hard Drops 200 Cps Randomn "client); 
BodyUpdates("All New Characters And System Is Here ! Smile"client); 
BodyUpdates("Guild War Start Eevry Friday At [20:00] End Every At [24:00]"client); 
BodyUpdates("Any One Need Any Help"client); 
FooterUpdates("Enjoy With Us in Server! Smile"client); 


#endregion 


MohamedModyAdel 2019-06-25 10:56 PM

رد: System GameUpdates
 
تسلم


الساعة الآن 08:00 AM

مرحبا بكم في منتدي اكواد لتطوير الالعاب