The online racing simulator
#1 - XmaX
Cruise Insim: User File and Givemoney Command or Button
Hi guys. Im an newbie at Programming. I tryed do to an userfile for my Cruise insim. But it dont work. I also need a Givemoney button oder command only for admin. Please help, Greetz
For an "!send" command, DarkTimes made one Here
#3 - XmaX
see already, have it in my script already. But i want send not from me. Example. An Admin is the Bank, with a command he can give money without losing his own.

Thank you
Yes that what the !send command is that Dark Made.
It gives a user money without taking it away from the admin.
#5 - XmaX
ahh yes thx, dont know that, and it work. Than you all. Can you tell me were there userfile is saved or how i can create userfiles ?

Greetz
C:\Users
#7 - XmaX
Thats the correct answer :P Thank you very much. Nice Community

-XmaX
#8 - XmaX
hi i need a pitlane command... i tried already but it was wrong
case "!pitlane":
InSim.Send_MST_Message("/pitlane" + Connections[GetConnIdx(MSO.UCID)].PlayerName + "was serviced", MSO.UCID, 0);
break;

#9 - vane
remove the "was serviced" bit
#10 - XmaX
sorry but dont work. I got a message too:
No overcharging for the Send_MST_Message - method takes 3 arguments. (Translatet with Google tranlator :P)

case "!pitlane":
InSim.Send_MST_Message("/pitlane " + Connections[GetConnIdx(MSO.UCID)].Username);
break;

#12 - XmaX
Wow, little bug an all its wrong. Than you
#13 - XmaX
Can i paste a clocke for each user who is on the server ?

Greetz
#14 - vane
i guess you mean clock probably not an analogue clock but a digital clock would be ok, im sure there is a tag in C# to get the time from the computer the insimo is on, dont know if it is posible to get the time of the people who are connected though :s unless you gave them a setup menu which allowed them to choose GMT +1 or something
#15 - XmaX
Yes clock. I thinked when a new come on the server he can chose him/his timezone by a button and the clock is displayed when you type !clock and you can close it with a close button.
its not showing up ?
hia im new to all of this, ive copyed the clock from doug's open souce cruise server to mine and its not showing up, no bug reports so i dono what im doing wrong please help


[SIZE=2][COLOR=#0000ff]private[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]void[/COLOR][/SIZE][SIZE=2] CheckUser_Elapsed([/SIZE][SIZE=2][COLOR=#0000ff]object[/COLOR][/SIZE][SIZE=2] sender, System.Timers.[/SIZE][SIZE=2][COLOR=#2b91af]ElapsedEventArgs[/COLOR][/SIZE][SIZE=2] e)[/SIZE]
[SIZE=2]{[/SIZE]
[SIZE=2][COLOR=#0000ff]foreach[/COLOR][/SIZE][SIZE=2] ([/SIZE][SIZE=2][COLOR=#2b91af]clsConnection[/COLOR][/SIZE][SIZE=2] C [/SIZE][SIZE=2][COLOR=#0000ff]in[/COLOR][/SIZE][SIZE=2] Connections)[/SIZE]
[SIZE=2]{[/SIZE]
[SIZE=2][COLOR=#0000ff]string[/COLOR][/SIZE][SIZE=2] Time = [/SIZE][SIZE=2][COLOR=#2b91af]Convert[/COLOR][/SIZE][SIZE=2].ToString(System.[/SIZE][SIZE=2][COLOR=#2b91af]DateTime[/COLOR][/SIZE][SIZE=2].Now.TimeOfDay.Hours).PadLeft(2, [/SIZE][SIZE=2][COLOR=#a31515]'0'[/COLOR][/SIZE][SIZE=2]) + [/SIZE][SIZE=2][COLOR=#a31515]":"[/COLOR][/SIZE][SIZE=2] + [/SIZE][SIZE=2][COLOR=#2b91af]Convert[/COLOR][/SIZE][SIZE=2].ToString(System.[/SIZE][SIZE=2][COLOR=#2b91af]DateTime[/COLOR][/SIZE][SIZE=2].Now.TimeOfDay.Minutes).PadLeft(2, [/SIZE][SIZE=2][COLOR=#a31515]'0'[/COLOR][/SIZE][SIZE=2]);[/SIZE]
[SIZE=2]InSim.Send_BTN_CreateButton([/SIZE][SIZE=2][COLOR=#a31515]"^7"[/COLOR][/SIZE][SIZE=2] + Time, [/SIZE][SIZE=2][COLOR=#2b91af]Flags[/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#2b91af]ButtonStyles[/COLOR][/SIZE][SIZE=2].ISB_DARK, 5, 15, 6, 90, 6, C.UniqueID, 2, [/SIZE][SIZE=2][COLOR=#0000ff]false[/COLOR][/SIZE][SIZE=2]);[/SIZE]
[SIZE=2]}[/SIZE]
[SIZE=2]}[/SIZE]

never mind i worked it out
simply had it in the wrong place lol
How can I set it up though.?
-
(the_angry_angel) DELETED by the_angry_angel
#19 - sun
I'm not being like rude in any way, but do you read through the open source tutorials? And do you know the launguage ok? Because it might help

PS: I will find the code for you out of my InSim, for the time.
#20 - sun
private void CheckUser_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
foreach (clsConnection C in Connections)
{
if (Stage == 1)
{

}
else
{
string Time = Convert.ToString(System.DateTime.Now.TimeOfDay.Hours).PadLeft(2, '0') + ":" + Convert.ToString(System.DateTime.Now.TimeOfDay.Minutes).PadLeft(2, '0');
InSim.Send_BTN_CreateButton("^2" + Time, Flags.ButtonStyles.ISB_C4, 5, 10, 40, 142, 3, C.UniqueID, 2, false);
}

Hope that helps!
-
(BurnOut69) DELETED by the_angry_angel : Unhelpful.
edit: irrelevant.
#22 - sun
Quote from DarkTimes :Sorry, was just idly thinking, you could make that time to string line a lot shorter and neater.

string Time = string.Format("{0:00}:{1:00}", DateTime.Now.Hour, DateTime.Now.Minute);


hehe :nod

FGED GREDG RDFGDR GSFDG