Start at the start. Like you said yourself: You're a newbie and you obviously have no idea what you are doing...
Learn the basics of scripting first, because this is way too advanced for a newbie. This is not just some command you can copy/paste and expect it to work. It a whole system with lots of important code spread around the whole script to make it work.
You should accept the fact that learning to script is a matter of months/years. So start with an empty script, open the
samp-wiki and work your way up.