The online racing simulator
#1 - KuHS
[REQUEST]Is it possible to do?
Hey, i want to know is there possible to do then command is getting playername, like: !givecash playername, you won't need enter colors in chat area, so command will use playername without colors, is that possible?
Thanks.
Yes, you can strip the colours from the player's name, like this:

private void FindPlayer(string MessageOut)
{
string Playername = MessageOut.Replace("!givecash ", ""); // Strip down to the playername
string PlayernameToCheck = "null";
clsConnection Player = new clsConnection();
foreach (clsConnection C in Connections)
{
PlayernameToCheck = C.PlayerName;
// Cycle through each connection to find the correct playername
while (PlayernameToCheck.Contains("^"))
{
// Loop through an remove each colour the player has in their name
PlayernameToCheck = PlayernameToCheck.Remove(PlayernameToCheck.IndexOf('^'), 2);
}
// The player's name is now colour-free
// Check if it's the player we're looking for
if (PlayernameToCheck == Playername)
{
Player = C;
break;
}
}
if (PlayernameToCheck == "null")
{
// No players connected
}
else
{
// 'Player' is the clsConnection of the player we're looking for now
//
// You can use "Player.Cash += X;" to give the player X amount of cash,
// or whatever you need to do.
}
}

I haven't tested this, I've just done it quickly. It should be close enough to what you're looking for though
#3 - KuHS
Thanks, how i can use it?
make cruise insim?

FGED GREDG RDFGDR GSFDG