منتدي اكواد

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

محمد ياسر 2019-04-24 10:16 AM

بنك السي بي كامل
 


نخش فى الموضوع على طول

الموضوع باين من اسمو انبسي بيحفظ السبئس فيه


ضيف دة فى NPC
كود PHP:

#region Bank cps
                    
case 12317:
                        {
                            switch (
npcRequest.OptionID)
                            {
                                case 
0:
                                    {
                                      
                                        
dialog.Text("Hello friend. I can help you get on the top faster you need save cps here you give" client.Entity.CpsBank " Cps here .");
                                        
dialog.Option("you need add cps."1);
                                        
dialog.Option("you need withdraw cps:"4);
                                        
dialog.Option("No thank you."255);
                                       break;
                                    }

                                
#region addcps
                                
case 1:
                                    {
                                        
dialog.Input("you need add cps:"310);

                                        break;
                                    }

                                case 
2:
                                    {
                                        if (
client.Entity.ConquerPoints >= client.NpcCpsInput && client.NpcCpsInput != 0)
                                        {
                                            
client.Entity.CpsBank += client.NpcCpsInput;
                                            
client.Entity.ConquerPoints -= client.NpcCpsInput;
                                            
client.NpcCpsInput 0;
                                        }
                                        break;
                                    }
                                case 
3:
                                    {
                                        
uint input;
                                        if (
uint.TryParse(npcRequest.Inputout input))
                                        {
                                            if (
input && input 2000000000)
                                            {
                                                
dialog.Text("Hello friend.you shore need add cps you give" client.Entity.CpsBank " Cps here .");
                                                
dialog.Text("you shore need add cps..");
                                                
dialog.Input("I need It :"19);
                                                
dialog.Option("No thank you."255);
                                                return;
                                            }
                                            if (
client.Entity.ConquerPoints >= input)
                                            {
                                                
client.NpcCpsInput input;
                                                
dialog.Text("Are you sure you want to Save " input " CPs? .");
                                                
dialog.Option("Yes"2);
                                                
dialog.Option("No thank you."255);
                                            }

                                        }
                                        else
                                        {
                                            
dialog.Text("You Must save 1:2000000000 cps.");
                                            
dialog.Input("Insert amount:"19);
                                            
dialog.Option("No thank you."255);
                                        }
                                        break;
                                    }
                                    
#endregion
                                #region withdraw cps

                                
case 4:
                                    {
                                        
dialog.Input("you need withdraw cps:"510);

                                        break;
                                    }
                                case 
6:
                                    {
                                        if (
client.Entity.CpsBank >= client.NpcCpsInput && client.NpcCpsInput != 0)
                                        {
                                            
client.Entity.CpsBank -= client.NpcCpsInput;
                                            
client.Entity.ConquerPoints += client.NpcCpsInput;
                                            
client.NpcCpsInput 0;
                                        }
                                        break;
                                    }
                                case 
5:
                                    {
                                        
uint input;
                                        if (
uint.TryParse(npcRequest.Inputout input))
                                        {
                                            if (
input && input 2000000000)
                                            {
                                                
dialog.Text("Hello friend.you shore need withdraw cps you give" client.Entity.CpsBank " Cps here .");
                                                
dialog.Text("you shore need add cps..");
                                                
dialog.Input("I need It :"19);
                                                
dialog.Option("No thank you."255);
                                                return;
                                            }
                                            if (
client.Entity.CpsBank >= input)
                                            {
                                                
client.NpcCpsInput input;
                                                
dialog.Text("Are you sure you want to withdraw " input " CPs? .");
                                                
dialog.Option("Yes"6);
                                                
dialog.Option("No thank you."255);
                                            }

                                        }
                                        else
                                        {
                                            
dialog.Text("You Must in cps cps.");
                                            
dialog.Input("Insert amount:"49);
                                            
dialog.Option("No thank you."255);
                                        }
                                        break;
                                    }
                                
#endregion
                                    
}
                            }
                            break;
                    
#endregion 

وفي Entity ضيف ده
كود PHP:

long _CpsBank;
        public 
long CpsBank
        
{
            
get
            
{
                return 
_CpsBank;
            }
            
set
            
{
                
value Math.Max(0value);
                
_CpsBank value;
                
Database.EntityTable.UpdateCpsbank(this.Owner);
 
            }
        } 

وافتح ملف EntityTable

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

    client.Entity.Name 

وضيف ده
كود PHP:

    client.Entity.CpsBank reader.ReadInt64("CpsBank"); 

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

    public static void UpdateMoney 

اقفلها بل سالب وضيف تحتها دي
كود PHP:

public static void UpdateCpsbank(Client.GameClient client)
        {
            
UpdateData(client"CpsBank"client.Entity.CpsBank);
        } 

وابحث علي
كود PHP:

.Set("Body"

وضيف تحتو
كود PHP:

    .Set("CpsBank"client.Entity.CpsBank

entities
ادخل ودوس ctrl +D
في ضيف ده

CpsBank int 255

وحدد unsigned



الساعة الآن 12:34 PM

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