hi! atm i have all my '!help' commands to work, and a button called 'Cash'. Does any body know how it can show you the cash and you earn it while you drive ? Thanks. If you can help please post it in here. Thanks again! Owen s2 licenced.
Sorry to sound harsh (I don't intend to dissuade you), but I'm going to keep linking to this post until you learn:
a) You need to learn a decent amount about how to program in your chosen language before attempting to program an InSim application for LFS. You also need to learn problem-solving skills, or you'll never get anywhere with your application as people will get sick of writing code samples for you to just copy-paste.
b) You don't need a new thread for every question you have.
c) If you fulfil point a, you won't have to keep doing what you do in b... because you'll be able to work out how to do simple tasks by yourself.
Yeah sun no point in asking for help for every single task you want to get done, its starting to get annoying.
As people have pointed out before, its good that you have the interest and actually making an effort, but asking first and researching later wont get you anywhere, it works the other way round.
I suggest reading C# bible, its a very good book for beginners/intermediate .NET programmers.
No. But if you can't show some form of independent learning - then we're not going to do it all for you. Go away, and learn your language before asking us how to do LFS-specific things. You couldn't even understand what to do with two structs someone pasted for you. A struct is a very simple language construct.
No. I can point you to at least 4 threads (off the top of my head, there's probably more) where you've asked either the same question or asked something that can be solved by thinking about what you want. You're asking over and over again for code to copy and paste in.
The insim buttons threads springs to mind. You posted in another thread asking about buttons (amongst other things) and there was some code that someone placed in there for you about using whatever library you're using (LFS_External or LFSlib, I don't remember which). You then ask another question about buttons in a new thread, where someone pasted something from InSim.txt, which is bundled with LFS, and you asked where that should be pasted.
Fundamentally you're clearly not understanding something because you effectively asked how to do something twice in that example and you were unable to differentiate between 2 distinct languages.
In this thread you've basically asked the same question you asked a few weeks ago.
You've clearly not managed to comprehend what you're doing exactly.
To use an analogy, to me it seems like you're going to a baker and asking how to make a cake. The baker then suggests a few ingredients and a good book to help you. You then return to the baker and again ask him/her how to make a cake once you've put the ingredients in a bowl. He tells you to mix them. You then return saying you've put raw sausage meat into your cake mixture and blame the baker for not teaching you how to read or to make the cake for you.
Programming and all of it's concepts are not something that you can pick up in an hour if you're totally new to it. Just like baking you have to build up your experience as you go along. Stop trying to make a 5 tier wedding cake before you can make a fairy cake.
I will point out that this is exactly why the tertiary industry exists. I can't go and make a 5 tier wedding cake myself. But I can get someone else to do it for me.
No, what will help is if you actually bother to do some work yourself. I think most people in this forum are at the point where they will flat out refuse to help you unless you go away and learn how to do some basic programming tasks first.
You really have two choices, as I see it:
a) Go away and learn
b) Give up
I personally don't mind which you do, but just do one of them.
On the chance that you're not actually trying to push people's buttons, I'll risk this post.
The reason that I've dropped to the level of "cake" is that you're clearly not grasping what people have been trying to tell you over and over and over and over and over and over and over and over. The fact you can't grasp an analogy, or that you're intentionally being obtuse is very telling.
The LFS programmers subforum has never been about teaching people to program from scratch. There are lots and lots of resources dedicated to that on the internet already. A lot of it repeats itself and a lot of effort has been put in to these documents. It is for these reasons that everytime the question comes up "how do I program" the op gets pointed to the various resources on the internet.
You have shown absolutely no evidence that you've even read any documentation about programming or the actual library you're trying to use, whatsoever.
Maybe this is a big misunderstanding and you don't get that the idea of using LFSlib or LFS_External is so that you don't have to read Insim.txt, and that you just need to write the logic, or bits-that-make-it-work, of your program. Not the boring crap about how you actually talk to LFS.
Programming is not yet at the stage where you can just write a text file that says "DO WHAT I WANT" and then save that as an executable. Because of this:
* Programming can be complicated.
* Programming requires a lot of effort.
* Programming requires that you have patience.
* Programming requires that you read.
A case in point is mcgas001. A few months ago he was much like yourself (in terms of never having programmed before). He went away and with very little help from various people, he has put together some nice applications that may see the light of day some day soon.
The reason for this is that he has put a lot of effort into learning.
Sun, the point that we're trying to make here is that we aren't going to spoonfeed you if you haven't bothered to put the effort in and try to make it work yourself. (this includes learning a programming language) Now, I know i have posted a couple of threads here.... those were way after i was thru pulling my hair out trying to fix something (both of which i figured out for myself after anyways)... so it would only be fair that you be expected to learn how to do things on your own. We're not here to discourage you, but the "begging" behaviour is just not cool.
But the thing is its not just ' i need a little bit of help ' i know barely anything about programming yet i KNOW it will take alot of effort for you to create this and what do you think will make this better then everyother cruise insim then whats already out there when you dont know how to make the cash work?!?! Man read what people advise you ^ up there ^! And yes i think you should learn how to do all this programming .. etc so you can actually achieve something rather than spamming this forum with posts that are silly.
Not strictly, no... but the principles are required. He doesn't even know how these things work - so how he expects to be able to use an InSim library effectively of some description is quite beyond me.
Nope... like i said i know how to proggram commands and buttons, and i'am using LFS_External_Client. The 'Form1.cs', and i know how some things work, all i need is know how do i control the mci packet for earning cash.
Thats the thing everyones trying to say sun. You don't need to know how to send a "cash packet" or other thing you need to learn everything else based around what your using. That way you don't come back tomorrow asking how to give people access to a new car. (This is just an example). If you learn how the overall structure works - which includes reading how networking works, and how insim works and anything else your using (File I/O ...). If you do this you will be able to know how to do more things without asking after each task you have in mind.
If we took away any reference material, or anything you could copy-paste. Could you even code and compile a program that sets up an InSim connection and instantiates a button?
I thought not.
You need to go away and learn general programming principles - THEN you will be able to do these things like cash. This is the last time I'm explaining it.
Actually, the vast majority of what that code consists of is my work...infact I've seen the code, and I can't recall seeing any code that you yourself thought of and wrote, and isn't copy and pasted from somewhere...
Not trying to knock you, just saying that you need to learn it yourself...although if the above posts have had no success, I don't see what chance I have...