منتدي اكواد

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

محمد ياسر 2019-04-24 08:55 AM

Npc شير vip
 

حط الانبي سي ده في كلاس
NPCS.CS
كود PHP:

#region [#Share] [#VIP]
                
case 1425245:
                    {
                        switch (
npcRequest.OptionID)
                        {

                            case 
0:
         
                                
dialog.Text("Hello this is the vip Share master .. I can help you to share a players");
                                
dialog.Input("Input the player's name"2532);
                                
dialog.Option("Nah !"255);
                                
dialog.Send();
                                break;
                            case 
25:
                             
                                    
string lowered npcRequest.Input.ToLower().Replace(" ""~");
                                    var 
player Kernel.GamePool.Values.FirstOrDefault(=> p.Entity.LoweredName == lowered);

                                    if (
player == null)
                                    {
                                        
dialog.Text("This person must be offline because I cannot find him/her. Are you sure this is the right name?");
                                        
dialog.Option("Let me try again!"0);
                                        
dialog.Option("Forget it!"255);
                                        
dialog.Send();
                                    }
                                    else
                                    {
                                        if (
player.Entity.VIPLevel client.Entity.VIPLevel)
                                        {
                                            
client.MessageBox("Are you sure you wanna share " player.Entity.Name " ?"delegate(GameClient p)
                                            {
                                                
player.Entity.VIPLevel client.Entity.VIPLevel;
                                                
client.Entity.VIPLevel -= 1;
                                                
player.MessageBox(client.Entity.Name " had share you Vip to u  ur now vip "+player.Entity.VIPLevel+"!"nullnull0);
                                                
dialog.Text("Great! Now your Target got the vip ! You Now VIP " client.Entity.VIPLevel "");
                                               
                                                
dialog.Option("Thanks bro !"255);
                                                
dialog.Send();
                                            }, 
null0);
                                        }
                                        else
                                            
client.MessageBox("He's already got vip " client.Entity.VIPLevel " so you cant share him !"nullnull0);
                                        break;

                                    }
                                
                              
                                break;

                        }
                        break;
                    }
                
#endregion 

شغل النفي كات سهله فانا اسيبه ليكم



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

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