The online racing simulator
#1 - Ziroh
!cake = 'Playername' loves cake.. Help?
Hiya!

Let's say i want the insim to say "/msg "Playername" loves cake" when someone type "!cake".
But how can i make it to say the playername?

External C# in use ;P

This is what i got:

case "!cake":
InSim.Send_MST_Message("/msg loves cake);
break;

I have no idea :P
Neither do I, but you're missing the closing quote in the /msg line.
Its:
case "!cake":
InSim.Send_MST_Message("/msg " + Connections[GetConnIdx(MSO.UCID)].PlayerName + " loves cake");
break;

#4 - Ziroh
Quote from Thijs-boy :Its:
case "!cake":
InSim.Send_MST_Message("/msg " + Connections[GetConnIdx(MSO.UCID)].PlayerName + " loves cake");
break;


Thanks alot!
You was missing: + Connections[GetConnIdx(MSO.UCID)].PlayerName + " loves cake"); too, so you got one error, now its fixed
#6 - Ziroh
huh? ^^
Quote from Ziroh :huh? ^^

That piece of code you forgot basicly pastes the nickname of the player that uses the !cake command in front of the "loves cake" part.
Quote from Ziroh :huh? ^^

Are you learning anything from the code you are being given here?
All i didn't understood was " You was missing: + Connections[GetConnIdx(MSO.UCID)].PlayerName + " loves cake"); too, so you got one error, now its fixed"

I made it work, and yes i'm learning.. Thanks

FGED GREDG RDFGDR GSFDG