The online racing simulator
Searching in All forums
(4 results)
Nixor
S2 licensed
Quote from dougie-lampkin :I understand, yes

That isn't easy, unless you have a police system already made. And even then, it depends on how you did it...

im working on it atm, but its hard for someone that dosent have lots of c++ skill
Nixor
S2 licensed
Quote from dougie-lampkin :What's wrong with it?

well if you type !pay 100 , the cash just goes away, but what i want is that the cash goes into a account,

for example

if player drives in 100mp/h and the limit is 80mp/h, and player2 is a cop, then the cop (player2) stops player1 and charges him for 10$, now i want the 10$ to go into player2 account, but atm the 10$ just disepers into the cyberworld...

do you understand what i mean? if not please say so and i will try again

thx
Nixor
S2 licensed
Quote from dougie-lampkin :Doesn't it come with !pay? If not, it's probably the easiest command you can make...When someone types it, just subtract the second split of the message from their cash...

case "!pay":
if (StrMsg.Length > 0)
{
if (StrMsg[1].Contains("-"))
InSim.Send_MTC_MessageToConnection("^7Invalid command", MSO.UCID, 0);
else
{
int Pay = int.Parse(StrMsg[1]);
Connections[GetConnIdx(MSO.UCID)].Cash -= Pay;
InSim.Send_MST_Message("/msg " + Connections[GetConnIdx(MSO.UCID)].PlayerName + "^7 paid $" + Pay + " fine");
}
}
break;

static public int GetUserCash(string Username)
{
StreamReader Sr = new StreamReader(UserInfo + "\\" + Username + ".txt");

string line = null;
while ((line = Sr.ReadLine()) != null)
{
if (line.Substring(0, 4) == "Cash")
{
string[] Msg = line.Split('=');
Sr.Close();
return int.Parse(Msg[1].Trim());
}
}
Sr.Close();

it looks like this atm.. not rly sure where i can change to get it right.
Last edited by Nixor, .
Nixor
S2 licensed
Hi, im trying to build a swedish Cruise server with some friends, we have got the basics done, but i would like to ask if someone could help us with a !pay mod, so if you drive to fast and i stop the person and i would like to charge him for 100$ for speeding. but how do i make so i get the money ?

been trying to fix it bymyself for a few hrs but no luck sofar, so maby someone here can help me out.

this is the last mod we need to get our server up and running. so please help


thx
Last edited by Nixor, .
FGED GREDG RDFGDR GSFDG