Archived copy of warcraft-source.com, the Warcraft: Source (WCS) forum (2007–2011), rebuilt from the Internet Archive by wc3mods.net. This page was captured on 2009-01-26 (original capture). Home · Forum · All archived topics · Downloads
Warcraft-Source.com - WCS mod for CSS
January 26, 2009, 11:45:02 PM *
Welcome, Guest. Please login or register.
Login with username, password and session length
News: Races and Items added into Download section from our great Race Coders!
Such as... HOLLIDAY|NovaKiller|Stinkyfax|Frodo|TeacherCreature|Phat_Wizard
Google  
  Home   Forum   Help Search Login Register   *
Pages: [1]   Go Down
  Print  
This topic has not yet been rated! You have not rated this topic. Select a rating:
Author Topic: Help preventing players from shooting.  (Read 63 times)
S3Xmagik
Level 0 Beginner

Online Online

United States United States

Posts: 4




scsiscope
S3Xmagik
« on: January 23, 2009, 10:03:33 PM »

I was working on coding a fun little ultimate I came up with and I've run across a bit of a problem. I want the victim to be unable to use their weapons while the ultimate is in effect, but I wanted to do this without stripping / restricting / removing ammo from the victim. If anybody knows a way to do this, please share. I'm coding this skill as a block (well, multiple blocks really) just in case that's relevant to this.




...Also, first post Cheesy.
Logged
maxxi
Level 7 Expert
*****
Online Online

Netherlands Netherlands

Posts: 510





myServer 81.26.221.156:27015
(Warning: click connects through Steam)
« Reply #1 on: January 23, 2009, 10:09:08 PM »

es playerget event_var(userid )

clip <var> <userid> <weapon / slot> - Get the amount of ammo in the player's clip
ammo <var> <userid> <weapon / slot> - Get the amount of ammo in the player's reserve

then est_setclipammo
est_setammo
he didn't wanted to remove ammo but its just the best way
Logged

Server = work in progress Smiley
[Oddity]TeacherCreature
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 970




bonggged

myServer 208.167.227.103:27015
(Warning: click connects through Steam)
« Reply #2 on: January 23, 2009, 10:10:41 PM »

Welcome to the forum!

Perhaps unbind his fire key? (Can you still do that?)

Otherwise I would suggest removing his ammo temporarily even though you did not want to.

You could also KEYSET the victim,
and under weapon_fire re add the ammo they fire with.
under player_hurt do keyget if variable !0 then est_health the victim
and display a big message that says you may not fire !
Logged

S3Xmagik
Level 0 Beginner

Online Online

United States United States

Posts: 4




scsiscope
S3Xmagik
« Reply #3 on: January 23, 2009, 10:18:06 PM »

Well, you guys certainly are prompt on this forum. I'm impressed =).

Anyway, I thought about emptying the clips and using keyvalues to store the amount in them, then restoring them later. The complication came from what the rest of the ultimate does. Basically I'm recreating the smoker's tongue attack from L4D (for those of you who don't know what that is it grabs a player and drags them closer to you). The problem is that while the victim is being dragged there's a chance of them running over another weapon and picking it up, thus being able to kill the attacker when they were supposed to be helpless. I'm hesitant to get into restricting and unrestricting all int eh ultimate because if I do that then I have to deal with problems like the skill unrestricting guns after being used against a knife race.




Also, hey there Oddity, I remember you from your rare few posts on the UV forums. =).


EDIT - reread Oddity's post. I thought you were telling me to do something else. Oops, I'll look into it.


EDIT 2 - I also need to prevent the victim from using his knife. I suppose I can just restrict and unrestrict that if nobody has a better idea. I don't think we have any knife restricted races anyway, so unrestricting it shouldn't be an issue.
« Last Edit: January 23, 2009, 10:22:38 PM by S3Xmagik » Logged
[Oddity]TeacherCreature
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 970




bonggged

myServer 208.167.227.103:27015
(Warning: click connects through Steam)
« Reply #4 on: January 23, 2009, 10:23:59 PM »

Well create a kniferace key value then.
or set a restriction unrestriction based on their current guns...
Get their guns save to a key
restrict all guns

then later
unrestrict all guns
and give them the guns they had.
Logged

S3Xmagik
Level 0 Beginner

Online Online

United States United States

Posts: 4




scsiscope
S3Xmagik
« Reply #5 on: January 23, 2009, 10:43:49 PM »

Well create a kniferace key value then.
or set a restriction unrestriction based on their current guns...
Get their guns save to a key
restrict all guns

then later
unrestrict all guns
and give them the guns they had.


Very well, I guess I'll just do it the old fashioned way. Gotta love them keys =). Thanks anyway.
Logged
S3Xmagik
Level 0 Beginner

Online Online

United States United States

Posts: 4




scsiscope
S3Xmagik
« Reply #6 on: January 23, 2009, 10:54:39 PM »

Last thing (sorry for the double post, but it serves as a bump).


It's been awhile since I've done work in blocks, I don't remember, can i run a block from within itself (basically have it loop with a doblock inside of the block) or do I have to like 'bounce' it off another block to make it run again?
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Last 7 Shouts:
Today at 07:57:32 PM
Thx)
Today at 07:51:22 PM
NAMOLEM LEVEL 7 EXPERT!
CONGRATULATIONS !
Today at 04:06:10 PM
there are some tuts made by Zawmbee i think Tongue
check in his section
Today at 01:19:53 PM
hey guys how (where) can i find information on how to make a wcs race ?
Today at 11:02:09 AM
upload more pics on D.Event
January 25, 2009, 07:05:55 PM
hey brett
January 25, 2009, 06:41:16 PM
The amount of ego and power tripping going on around here is truly hilarious.
Recent
[Today at 11:42:07 PM]

[Today at 11:21:10 PM]

[Today at 09:54:35 PM]

[Today at 09:22:08 PM]

[Today at 08:35:31 PM]

[Today at 07:52:01 PM]

[Today at 07:40:48 PM]

[Today at 07:36:13 PM]

[Today at 07:31:21 PM]

[Today at 06:50:05 PM]
Theme switch

Powered by MySQL Powered by PHP Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC
TinyPortal v0.9.8 © Bloc
Valid XHTML 1.0! Valid CSS!
Page created in 0.043 seconds with 24 queries.