The online racing simulator
Cruise !Pay
Hello ,

Could you help me i have my !pay command

I want when one people write !pay 250 in chase , fine go to cadet or officer

Exemple :

Officer-Dark chase Toxmen

Toxmen is busted

Officer-dark say please !pay 250

Toxmen !pay 250

I want 250 go to Officer-Dark

Sorry for bad english ='(


<?php 
 
case "!pay":
                        if (
StrMsg.Length == 2
                        {
                            if (
StrMsg[1].Contains("-"))
                                
InSim.Send_MTC_MessageToConnection("^7Invalid command"MSO.UCID0);
                            else
                            {
                                try
                                {
                                    
int Pay int.Parse(StrMsg[1]);
                                    if (
Pay >= 2501 == false)
                                    {
                                        
Connections[GetConnIdx(MSO.UCID)].Cash -= Pay;
                                        
InSim.Send_MST_Message("/msg ^6>^7 " Connections[GetConnIdx(MSO.UCID)].PlayerName " ^7(" Connections[GetConnIdx(MSO.UCID)].Username "^7)" "^7 paid €" Pay " fine");
                                    }
                                    else if (
Pay >= 2501)
                                    {
                                        
InSim.Send_MTC_MessageToConnection("^1Max pay amount is 2500"MSO.UCID0);
                                    }
                                    }
                                catch
                                {
                                    
InSim.Send_MTC_MessageToConnection("^1Invalid pay amount. Please try again."MSO.UCID0);
                                }
                            }
                        }
                        else
                        {
                            
InSim.Send_MTC_MessageToConnection("^1Invalid pay command. Please try again."MSO.UCID0);
                        }
                        break;
?>

Hang on, I will help when I get my old data back, as I have forgotten how to code .
Ok i wait thanks you
help please i can pay

FGED GREDG RDFGDR GSFDG