Author Topic: [Script request thread] - Request scripting help here!  (Read 2949 times)

0 Members and 1 Guest are viewing this topic.

stealthstick

  • Klass Klown
  • ***
  • Posts: 360
  • Computer Scientist
    • View Profile
[Script request thread] - Request scripting help here!
« on: August 08, 2012, 06:09:51 am »
Just thought we could get something going here on TKC. A thread where people/noobs can ask for scripting help, fixes, or script examples.

For example:
1.
Q:How do I make everyone appear upside down?
A:http://community.bistudio.com/wiki/setVectorDirAndUp - Adjust it until you make yourself or others appear upside down. Maybe loop it incase they somehow go upright. - Make it global.


2.
Q:What's wrong with my code? It doesn't work!
Code: [Select]
hint hello, i am mod-apping you!!!!A:You need to put quotation marks around the text.
Code: [Select]
hint "hello, i am mod-apping you!!!!"////////////////

Just stuff like that.

So, if anyone needs help with scripts, post here, and I or anyone else can probably help!
« Last Edit: August 08, 2012, 06:15:15 am by stealthstick »
It's been a good few years, becoming what I always wanted to be.

EA123

  • Cheater Apprentice
  • *
  • Posts: 17
    • View Profile
Re: [Script request thread] - Request scripting help here!
« Reply #1 on: August 08, 2012, 12:47:54 pm »
Im trying to get all of my friends to dance on a local server. I can make myself dance but how do I change it to make everyone do it?
Quote
player playMove "ActsPercMstpSnonWnonDnon_DancingStefan";

Xerxes

  • Cheater Apprentice
  • *
  • Posts: 10
    • View Profile
Re: [Script request thread] - Request scripting help here!
« Reply #2 on: August 08, 2012, 12:53:11 pm »
Sounds like a good idea

MrMedic

  • MasstKer
  • ********
  • Posts: 8900
  • programmer/dev/software engineer
    • View Profile
Re: [Script request thread] - Request scripting help here!
« Reply #3 on: August 08, 2012, 04:44:35 pm »
Im trying to get all of my friends to dance on a local server. I can make myself dance but how do I change it to make everyone do it?
Quote
player playMove "ActsPercMstpSnonWnonDnon_DancingStefan";

You must send it over the network to affect other connected players or it will only be local to your client.
EnCoded Message: i3iy9yl8kr2xf3g2Txs3pr6ye3ya7jg5ty2z

https://www.youtube.com/watch?v=62_7-AYfdkQ
you need a paypal account for the private versions.

Website:
http://bit.ly/medic101

Teamspeak 3: 85.236.101.5:10157

stealthstick

  • Klass Klown
  • ***
  • Posts: 360
  • Computer Scientist
    • View Profile
Re: [Script request thread] - Request scripting help here!
« Reply #4 on: August 09, 2012, 02:03:44 am »
Im trying to get all of my friends to dance on a local server. I can make myself dance but how do I change it to make everyone do it?
Quote
player playMove "ActsPercMstpSnonWnonDnon_DancingStefan";


Code: [Select]
player setVehicleInit
"
player playMove 'ActsPercMstpSnonWnonDnon_DancingStefan';
";
processInitCommands;
clearVehicleInit player;


setVehicleInit is frowned upon, but it's the simplest way to do this. Don't do it on OA though (atleast on battleye servers, since any smart admin would detect this)
On A2(:free) you have nothing to worry about, unless the server is running a packet filter (which they most likely don't)

Other than that, have fun.
It's been a good few years, becoming what I always wanted to be.

c5

  • Online Villain
  • ***
  • Posts: 174
    • View Profile
Re: [Script request thread] - Request scripting help here!
« Reply #5 on: August 09, 2012, 02:15:18 am »
Q: I want to spawn a bunch of objects with proper handles so I could manipulate with those objects separately later on.

A Brief example of what I'm trying to achive: (excuse my syntax, it isn't the case)

Code: [Select]
countDo = 15;

for .... to countDo do
{
_handle1 = "skoda" createvehicle ....;
}

now the code above would just spawn 15 skodas with handles _handle1 but I want every skoda to have its own handle and go like _handle1 , _handle2 , _handle3 , etc until _handle15

I hope I explained my issue well enough :) But please, it has to be solved using
Code: [Select]
for ... do {}
How do I makes hax?!

MrMedic

  • MasstKer
  • ********
  • Posts: 8900
  • programmer/dev/software engineer
    • View Profile
Re: [Script request thread] - Request scripting help here!
« Reply #6 on: August 09, 2012, 04:40:22 am »
this = mate
EnCoded Message: i3iy9yl8kr2xf3g2Txs3pr6ye3ya7jg5ty2z

https://www.youtube.com/watch?v=62_7-AYfdkQ
you need a paypal account for the private versions.

Website:
http://bit.ly/medic101

Teamspeak 3: 85.236.101.5:10157

Coronel_Niel

  • Insane Joker
  • ****
  • Posts: 846
  • Why can't I pick my own profile picture...
    • View Profile
Re: [Script request thread] - Request scripting help here!
« Reply #7 on: August 09, 2012, 04:45:43 am »
use format, which reads the value out of a variable. format["_handle1%1 = ""skoda"" createvehicle ......"]; might work, i dont know, very early, bed time for me.
"Now we are going to watch my boys do it" - Joopig

c5

  • Online Villain
  • ***
  • Posts: 174
    • View Profile
Re: [Script request thread] - Request scripting help here!
« Reply #8 on: August 09, 2012, 11:08:39 am »
Thanks, I'll give them a try
How do I makes hax?!

Buster

  • Klass Klown
  • ***
  • Posts: 295
  • Kool Kat
    • View Profile
Re: [Script request thread] - Request scripting help here!
« Reply #9 on: August 09, 2012, 06:00:13 pm »
Ok first request from me !
Is it possible or how to copyToClipboard a players name, while in-game ??
I keep trying different ways but none successfully  :icon_sad2

ztonicz

  • Cheater Apprentice
  • *
  • Posts: 19
    • View Profile
Re: [Script request thread] - Request scripting help here!
« Reply #10 on: August 09, 2012, 06:09:00 pm »
Ok first request from me !
Is it possible or how to copyToClipboard a players name, while in-game ??
I keep trying different ways but none successfully  :icon_sad2

You want to copy a players name to clipboard?
You would just use copyToClipboard str(name _person); *Person being replaced with whatever hook in script you use..*

i.e to build an array of all the players connected.

Code: [Select]
_array = [];
{
   if(isPlayer _x) then
   {
       _array = _array + [name _x];
   };
} foreach playableUnits;

copyToClipBoard str(_array);

Clipboard would contain...
["Bang Prostata","STING =BMR=","Noyes","ObscuredUSA","Borat of Kazakhstan"]

« Last Edit: August 09, 2012, 08:48:06 pm by ztonicz »

Buster

  • Klass Klown
  • ***
  • Posts: 295
  • Kool Kat
    • View Profile
Re: [Script request thread] - Request scripting help here!
« Reply #11 on: August 09, 2012, 07:24:14 pm »
Hi ztonicz
Thanks for the reply, I tried something similar to what you've posted but all I get to the clipboard is []
have tried differrent ways but none seem to get picked up  :unsure
Yeah !!!!  :icon_thumbsup
thanks man, I see where I was going wrong isPlayer, I was not using correctly. Thanks again, my headache is now gone  :icon_thumbsup
« Last Edit: August 09, 2012, 07:41:54 pm by Buster »

ZOldDude

  • The Unknown Rank!
  • Administrator
  • MasstKer
  • *
  • Posts: 20874
  • Old School TKC
    • View Profile
    • Admin
Re: [Script request thread] - Request scripting help here!
« Reply #12 on: August 09, 2012, 09:32:55 pm »
"Borat of Kazakhstan"

 :icon_thumbsup

+1 for the smile that brought.

*While we crash and burn, small, low tech, agrarian societies such as the Hmong in the mountains of Laos will continue on without so much as blinking an eye.*

ztonicz

  • Cheater Apprentice
  • *
  • Posts: 19
    • View Profile
Re: [Script request thread] - Request scripting help here!
« Reply #13 on: August 09, 2012, 10:07:06 pm »
"Borat of Kazakhstan"

 :icon_thumbsup

+1 for the smile that brought.

Lol one of my many dummy names. Used to use it for the life stuff, Great success!

ZOldDude

  • The Unknown Rank!
  • Administrator
  • MasstKer
  • *
  • Posts: 20874
  • Old School TKC
    • View Profile
    • Admin
Re: [Script request thread] - Request scripting help here!
« Reply #14 on: August 10, 2012, 05:05:24 am »
"Borat of Kazakhstan"

 :icon_thumbsup

+1 for the smile that brought.

Lol one of my many dummy names. Used to use it for the life stuff, Great success!

I used to like Giant Midget for VC and Baghdad Bob for Arma1 myself....when I played with server admin invite knowing I admin here.
Good times.

*While we crash and burn, small, low tech, agrarian societies such as the Hmong in the mountains of Laos will continue on without so much as blinking an eye.*