Post your scripting questions / solutions here
Moderator: Moderators
The Jackal
Sergeant Major
Posts: 101 Joined: Wed May 07, 2003 10:09 am
Contact:
Post
by The Jackal » Tue Sep 02, 2003 9:51 am
I am making an anti-dance script for those noobs with aimbots and trigger bots that frequent our servers and dances while they snipe.
What I am thinking is hurt them while they hold fire and moveleft or move right. My problem is I do not know if I can get that movement key action from players. Like I can with fireheld.
Here is what I came up with so far:
Code: Select all
dance:
while(1)
{
for(local.p = 1; local.p < $player.size+1;local.p++)
{
if($player[local.p].dmteam != "spectator" && $player[local.p].health > 0 && $player[local.p].fireheld == 1 && $player[local.p].???????)
{
$player[local.p] hurt 30
wait 1
$player[local.p] iprint "NO Dancers Allowed Here!"
}
}
wait (.1)
go to dance
}
end
tltrude
Chuck Norris
Posts: 4774 Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:
Post
by tltrude » Tue Sep 02, 2003 12:06 pm
What about players that hold their trigger to fire a machine gun?
Tom Trude,
The Jackal
Sergeant Major
Posts: 101 Joined: Wed May 07, 2003 10:09 am
Contact:
Post
by The Jackal » Tue Sep 02, 2003 12:59 pm
lol I forgot to say it was a snipers only server!
jv_map
Site Admin
Posts: 6521 Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:
Post
by jv_map » Tue Sep 02, 2003 7:02 pm
if(($player[local.p] getmovement)[0] == r) // r(unning)
that'll do it
Your mod may be very annoying though
The Jackal
Sergeant Major
Posts: 101 Joined: Wed May 07, 2003 10:09 am
Contact:
Post
by The Jackal » Tue Sep 02, 2003 9:35 pm
Thanks JV.
Man you don't know the stress these kids give me. I got grey hairs in places I never had hair before. I did a force skin and no force models script for them. Only to find out that the damn neon skin pack uses the stock skins names too.
Just for the sake of definition. Please explain the use of the )
[0]
. What does the ")" mean in the statement? And the array zero?
Thanks
Bjarne BZR
Site Admin
Posts: 3298 Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:
Post
by Bjarne BZR » Tue Sep 02, 2003 9:59 pm
the statement $player[local.p] getmovement
Returns the string "running"
the [0] returns the first element of the array "running"
( thats the letter 'r' )
the line // r(unning) is just a comment
( anything after "//" is ignored by the script interpreter )
Admin .MAP Forums
Head above heels.
The Jackal
Sergeant Major
Posts: 101 Joined: Wed May 07, 2003 10:09 am
Contact:
Post
by The Jackal » Tue Sep 02, 2003 11:31 pm
Don't work people! I put this in my map script file
Code: Select all
waittill spawn
exec global/dancer.scr
And the dancer.scr looks like this:
Code: Select all
dance:
while(1)
{
for(local.p = 1; local.p < $player.size+1;local.p++)
{
if($player[local.p].dmteam != "spectator" && $player[local.p].health > 0 && $player[local.p].fireheld == 1 && $player[local.p] getmovement([0] == r))
{
$player[local.p] hurt 30
wait 2
$player[local.p] iprint "NO Dancing On This Server!"
}
}
wait (.1)
goto dance
}
end
What am I doing wrong? I really want break the legs of dancers. I have never seen Vasili Zaitsev or Carlos "The Jackal" dance while they snipe. So why the heck must I tolerate these noobs withs skins and aimbots?
bdbodger
Moderator
Posts: 2596 Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:
Post
by bdbodger » Wed Sep 03, 2003 1:18 am
you missed a (
$player[local.p] getmovement([0] == r))
should be
( $player[local.p] getmovement([0] == r))
Alcoholic
General
Posts: 1470 Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:
Post
by Alcoholic » Wed Sep 03, 2003 2:42 am
You don't need goto dance, the while loop does it for you.
jv_map
Site Admin
Posts: 6521 Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:
Post
by jv_map » Wed Sep 03, 2003 6:41 am
waittill spawn
should be
level waittill spawn
( $player[local.p] getmovement([0] == r))
should be
( $player[local.p] getmovement) [0] == r)
The Jackal
Sergeant Major
Posts: 101 Joined: Wed May 07, 2003 10:09 am
Contact:
Post
by The Jackal » Tue Sep 09, 2003 7:01 am
Thanks for the help fellas.
I will work on these corrections.
By the way. I never got any email notifications that an update was posted. My Notify box is checked by default. Just thought you would wanna know.
jv_map
Site Admin
Posts: 6521 Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:
Post
by jv_map » Tue Sep 09, 2003 4:04 pm
The Jackal wrote: By the way. I never got any email notifications that an update was posted. My Notify box is checked by default. Just thought you would wanna know.
Hmm I think more users experience this problem
works fine for me though