Author Topic: Satchel Spawn Script? Umm you know the script Kit when you can get  (Read 2109 times)

0 Members and 1 Guest are viewing this topic.

Csimami

  • Cheater Apprentice
  • *
  • Posts: 15
  • Beginner on scripting :)
    • View Profile
Re: Satchel Spawn Script? Umm you know the script Kit when you can get
« Reply #15 on: April 12, 2012, 05:48:45 am »
titletext ["you got c4","plain down"];
player addWeapon ("Put");
player addMagazine ("PipeBomb"); 
player addMagazine ("PipeBomb");
player addMagazine ("PipeBomb"); 
player addMagazine ("PipeBomb");



this is just for c4 basic code, it works the same with anything.

player addWeapon "M9";
player addMagazine "15Rand_9x19_M9";
player addMagazine "15Rnd_9x19_M9";
player addMagazine "15Rnd_9x19_M9";
player addMagazine "15Rnd_9x19_M9";
player addMagazine "15Rnd_9x19_M9";
player addMagazine "15Rnd_9x19_M9";
player addMagazine "15Rnd_9x19_M9";
player addMagazine "15Rnd_9x19_M9";
exit;

see, difrent ways to add code ,works the same , theres alot a ways to work this.
1. exit command is used only in sqs syntax and is ignored in sqf.
2. addWeapon command should go after addMagazine or you'll get unloaded weapon and you'll have to reload it.
3. It's too primitive to add 8 strings of addMagazine.

No offense but this code looks like it was written by 6 years old kid or by a guy with low IQ or a guy who's IQ is equal to 6 years old kid lol
Just curious, if I'll need 20 magazines does it mean that I'll have to add 20 strings of same command? LOL!

LOL first i looked at your avatar and saw youre user rating (-21) and i tought wtf...but after i read youre post it explained itself dont call other people 6 year old kids -_-
« Last Edit: April 12, 2012, 03:41:23 pm by Csimami »

Ruscheater

  • Intentional Cheater
  • **
  • Posts: 43
  • Hakka
    • View Profile
Re: Satchel Spawn Script? Umm you know the script Kit when you can get
« Reply #16 on: April 12, 2012, 07:07:50 am »
Gerk is right. I see he has expierence so you have to listen him. Do not use sqs, it is outdated shit. Use loop instead of that, use proper name of commands: "Addmagazine" is a bad, "addMagazine" is a good. Use fastest type of commands as it possible, for ex. createVehicle [] is best way to create vehicle than createVehicle. for "" is faster than for [] etc.

Code: [Select]
for "_i" from 1 to 12 step 1 do {player addMagazine "30Rnd_545x39_AK";}; player addWeapon "AK_107_pso";or
Code: [Select]
for "_i" from 1 to 12 step 1 do
{
player addMagazine "30Rnd_545x39_AK";
};
player addWeapon "AK_107_pso";
is a good styled code.

And most of us are hated by other players and we get a negative karma.
« Last Edit: April 12, 2012, 07:14:39 am by Ruscheater »
"HaxXxor!!! Admin restart the server!!!"

Fishgun123

  • Online Villain
  • ***
  • Posts: 223
    • View Profile
Re: Satchel Spawn Script? Umm you know the script Kit when you can get
« Reply #17 on: April 12, 2012, 01:17:27 pm »
Thank you very much, I don't know where I went wrong on the 'M9' One, but I'm new to scripting and hopefully going to get better at it in time.

joopig

  • Insane Joker
  • ****
  • Posts: 602
    • View Profile
    • A Place Of Dreams
Re: Satchel Spawn Script? Umm you know the script Kit when you can get
« Reply #18 on: April 12, 2012, 03:15:14 pm »
It is more efficient to add a for loop, but for those who don't know how to do it or simply cant be arsed it makes a very small difference and if your not going to release it why bother doing it any different than you want, sure it might be a nano second slower all of that lost time!!! Oh and gerk the scroll list is very much working on every server i have tried. You can stop insulting people intelligence just because you do things a little differently.
« Last Edit: April 12, 2012, 04:43:46 pm by joopig »

i mss old ofp

  • Insane Joker
  • ****
  • Posts: 982
  • i love the fact that you hate me.
    • View Profile
    • TKC
Re: Satchel Spawn Script? Umm you know the script Kit when you can get
« Reply #19 on: April 12, 2012, 05:02:52 pm »
lmao @ gerk, i copyed pasted this from your mod-app ,.
so again you are not here to help you are just here to run people down.
all i was realy trying to show him is if exit is used sqs, he needs to put ;
but here you are being ignorant (again).
you come here all the time hand feeding insults.
this script that i coped is from your mod-app.
« Last Edit: April 12, 2012, 05:34:24 pm by i mss old ofp »
692063616E206C6F616420612070626F6F6E2074686520666C79206C6D616F00

the joke is you!!!!

joopig

  • Insane Joker
  • ****
  • Posts: 602
    • View Profile
    • A Place Of Dreams
Re: Satchel Spawn Script? Umm you know the script Kit when you can get
« Reply #20 on: April 12, 2012, 05:04:25 pm »
People do it this way because it simpler.

Ruscheater

  • Intentional Cheater
  • **
  • Posts: 43
  • Hakka
    • View Profile
Re: Satchel Spawn Script? Umm you know the script Kit when you can get
« Reply #21 on: April 12, 2012, 09:01:45 pm »
I guess it was outdated mod-app.

There is only reason to use slow sqs now: to execute non-scheduled script in some cases (but not all). In all other ways it should be avoided.

Quote
if your not going to release it why bother doing it any different than you want
Style of the code and optimization is a very important thing whatever you do: simple script or a some large and complex commercial application. If you learned programming with "classic" school you would know about it. Copypasting with a same line is not good solution.
« Last Edit: April 12, 2012, 09:11:32 pm by Ruscheater »
"HaxXxor!!! Admin restart the server!!!"

i mss old ofp

  • Insane Joker
  • ****
  • Posts: 982
  • i love the fact that you hate me.
    • View Profile
    • TKC
Re: Satchel Spawn Script? Umm you know the script Kit when you can get
« Reply #22 on: April 13, 2012, 01:26:09 am »
i agree, but call me wrong but i started from these simple codes,  copy and pasting was and in some cases still the way to go, unless im writing new scripts , what is the point of writing somthing new that is already there, (for a beginner). so lets stop pissing in the wind on each other. im not here to show anything but helpful info, im not leading anyone on. if anyone feels  they can do better ,then post and shut the +&65% up...point is sqs is slower than sqf, but it all works, if you dont like sqs, then use somthing eles. you only need to optimize your code if you want to or because you have alot and see a notisable difrance. ffs somones always trying to squear off with me lol.

who hear can tell me why to write the scripts with out capital letter?
do you know?
i know why, and im betting you dont.

ps, dont get me wrong Gerk(off) is one of the best scripters here.
i just dont like him, or his ways.

« Last Edit: April 13, 2012, 01:36:52 am by i mss old ofp »
692063616E206C6F616420612070626F6F6E2074686520666C79206C6D616F00

the joke is you!!!!

joopig

  • Insane Joker
  • ****
  • Posts: 602
    • View Profile
    • A Place Of Dreams
Re: Satchel Spawn Script? Umm you know the script Kit when you can get
« Reply #23 on: April 13, 2012, 01:40:42 am »
^^ +1

Fishgun123

  • Online Villain
  • ***
  • Posts: 223
    • View Profile
Re: Satchel Spawn Script? Umm you know the script Kit when you can get
« Reply #24 on: April 13, 2012, 01:51:32 am »
So joopig can you please just find me the norecoil one.. trust me i wont ask you anymore. I will try and find out myself etc for me to be better.

XJ

  • Online Villain
  • ***
  • Posts: 246
  • Find what you love and let it kill you.
    • View Profile
Re: Satchel Spawn Script? Umm you know the script Kit when you can get
« Reply #25 on: April 13, 2012, 04:16:16 pm »
i agree, but call me wrong but i started from these simple codes,  copy and pasting was and in some cases still the way to go, unless im writing new scripts , what is the point of writing somthing new that is already there, (for a beginner). so lets stop pissing in the wind on each other. im not here to show anything but helpful info, im not leading anyone on. if anyone feels  they can do better ,then post and shut the +&65% up...point is sqs is slower than sqf, but it all works, if you dont like sqs, then use somthing eles. you only need to optimize your code if you want to or because you have alot and see a notisable difrance. ffs somones always trying to squear off with me lol.

who hear can tell me why to write the scripts with out capital letter?
do you know?
i know why, and im betting you dont.

ps, dont get me wrong Gerk(off) is one of the best scripters here.
i just dont like him, or his ways.

It doesn't make any difference in parsing if camelCase is used, but it does make the whole thing a lot more readable. I can only speak for myself, but I'd rather have setWaypointCompletionRadius than setwaypointcompletionradius.  :icon_thumbsup

Alucard

  • Intentional Cheater
  • **
  • Posts: 45
    • View Profile
Re: Satchel Spawn Script? Umm you know the script Kit when you can get
« Reply #26 on: April 13, 2012, 04:43:17 pm »
who have unwanted script for chernarus life?

i mss old ofp

  • Insane Joker
  • ****
  • Posts: 982
  • i love the fact that you hate me.
    • View Profile
    • TKC
Re: Satchel Spawn Script? Umm you know the script Kit when you can get
« Reply #27 on: April 13, 2012, 04:46:22 pm »
i agree, but call me wrong but i started from these simple codes,  copy and pasting was and in some cases still the way to go, unless I'm writing new scripts , what is the point of writing something new that is already there, (for a beginner). so lets stop pissing in the wind on each other. I'm not here to show anything but helpful info, I'm not leading anyone on. if anyone feels  they can do better ,then post and shut the +&65% up...point is sqs is slower than sqf, but it all works, if you don't like sqs, then use something Else. you only need to optimize your code if you want to or because you have allot and see a noticeable difference. ffs someones always trying to square off with me lol.

who hear can tell me why to write the scripts with out capital letter?
do you know?
i know why, and I'm betting you don't.

ps, don't get me wrong Gerk(off) is one of the best scriptures here.
i just don't like him, or his ways.

It doesn't make any difference in parsing if camelCase is used, but it does make the whole thing a lot more readable. I can only speak for myself, but I'd rather have setWaypointCompletionRadius than setwaypointcompletionradius.  :icon_thumbsup

writing in small letters = the same differences as sqs to sqf
pertaining to playing on a Linux or windows server, Linux doesn't like capital letters.
hearsay 70% of servers are Linux.
so if your on windows system joining a Linux server it takes a nano amount of time for Linux to UN capitalize your scripts.
692063616E206C6F616420612070626F6F6E2074686520666C79206C6D616F00

the joke is you!!!!

Ruscheater

  • Intentional Cheater
  • **
  • Posts: 43
  • Hakka
    • View Profile
Re: Satchel Spawn Script? Umm you know the script Kit when you can get
« Reply #28 on: April 14, 2012, 09:17:12 pm »
There is not only style difference between sqs and sqf but some other important differences, for example:
  • SQF is a much faster than SQS, because it uses differenet (newer) scripting virtual machine.
  • SQS in event handler cannot be executed in scheduled mode, SQF can.
"HaxXxor!!! Admin restart the server!!!"

i mss old ofp

  • Insane Joker
  • ****
  • Posts: 982
  • i love the fact that you hate me.
    • View Profile
    • TKC
Re: Satchel Spawn Script? Umm you know the script Kit when you can get
« Reply #29 on: April 14, 2012, 10:56:43 pm »
this is already common sence what is faster, and we know sqs is being fazed out, but it is still usable and i could post scripts in sqs that will not work in sqf, or would take alot of time to recode,
so were ever we are going with the point of this, all i can say is sqs is good for what it does, its  reliable but dirty and slow.

alot of misson makers still use sqs along with sqf,.
and im positive arma3 will also have sqs.
when we start scripting in fms for hacking that'll be a thing to post about.


p.s. dont take me wrong you are correct, but i dont understand in the long run why any of this is important,
the speed quality will never be noticed in 90% of  the scripts. start.sqs or start.sqf i use neither.so is mine faster or slower?
to optimize is more shorting the code from crap it dosnt need to read, wether thats sqs/sqf/cpp/hpp/fms/.h/ the list goes on and on....
692063616E206C6F616420612070626F6F6E2074686520666C79206C6D616F00

the joke is you!!!!