| This topic has not yet been rated!
|
You have not rated this topic. Select a rating:
|
|
Author |
Topic: player_shoot (Read 115 times)
|
bretalemeau
Level 1 Trained Beginner
Offline
 United States
Posts: 29
|
 |
« on: September 14, 2009, 11:39:26 PM » |
|
So is there any way to recognize when the player is shooting? Like player_shoot = 1 or anything like that?
|
|
|
|
|
Logged
|
|
|
|
Gen.GenitalZ
Level 1 Trained Beginner
Offline
 United States
Posts: 23
|
 |
« Reply #1 on: September 15, 2009, 08:22:20 PM » |
|
it has to be made into a block, but you can do "player weapon_fire" but yeah, its not skill wise in your wcs_races_db, its a different block entirely that the race has to be directed to, to use.
|
|
|
|
|
Logged
|
|
|
|
|
Koshy
|
 |
« Reply #2 on: September 15, 2009, 09:23:07 PM » |
|
So is there any way to recognize when the player is shooting? Like player_shoot = 1 or anything like that?
In your file (like es_wcs.txt) put: event weapon_fire { Information here } Also this link may help: http://www.eventscripts.com/pages/Weapon_fireThanks, - Koshy
|
|
|
|
|
Logged
|
 <-- WCS Mod Server 100 Tick
|
|
|
Crazy
Level 2 Apprentice

Offline
 United States
Posts: 55
|
 |
« Reply #3 on: September 20, 2009, 07:45:00 PM » |
|
Koshy, would it be possible if you could explain this a little bit more? I'm currently trying to make a skill that if your firing your weapon you will run faster. I want to know how to set it so that the server would recognize this.
|
|
|
|
|
Logged
|
|
|
|
<---TexNo--->
Level 7 Expert
   
Offline
Norway
Posts: 563
< Need Help ? >
texno755 or nichosvgameren755myServer 89.238.160.19:27018(Warning: click connects through Steam)
|
 |
« Reply #4 on: September 20, 2009, 07:49:49 PM » |
|
F.eks !
event weapon_fire { es est_effect 10 #a 0 sprites/lgtning.vmt server_var(hfx_x2) server_var(hfx_y2) server_var(hfx_z2) 60 120 1 15 80 0 255 55 0 255 90 } Then a effect will be shooten.
|
|
|
|
|
Logged
|
 Selling Race pack, 20 $ 230 Races 50 private races. New Stuff, custom stuff private effects.
|
|
|
|
CA.Berettonawak
|
 |
« Reply #5 on: September 21, 2009, 09:14:14 PM » |
|
Koshy, would it be possible if you could explain this a little bit more? I'm currently trying to make a skill that if your firing your weapon you will run faster. I want to know how to set it so that the server would recognize this. First of all, event weapon_fire requires (for stability issues) noisy to be enabled. (es_xdoblock corelib/noisy_on) Secondly, this is an advanced kind of coding, we can help you a bit, or make the skill all by ourself, but we cannot just tell you how to do the whole thing. Just think of it: - detect weapon_fire : add speed to event_var(userid);delayed remove speed. Got it? www.eventscriptS.com is there to help you If you need more help, contact me on steam/msn, or even post here 
|
|
|
|
|
Logged
|
Beret, keep yourself focusing on 1 project. Be sure to memorize that down since it sounds good. i love tuna juice  =CA= Pietro: back =CA= Pietro: sorry, was downstair sharing my chocolate with my cat =CA= Pietro: you should see his face when he ate it xD
|
|
|
Crazy
Level 2 Apprentice

Offline
 United States
Posts: 55
|
 |
« Reply #6 on: September 21, 2009, 10:21:17 PM » |
|
So it would be something like... event weapon_fire { if (event_var(weapon) = knife) do { es est_speed event_var(userID) 1.9 es_delayed 3 es est_speed event_var(userID) 1.4 } } The in the skill1_cmd I would put... "esx_doblock corelib/noisy_on" and I would put the skill_cfg to... weapon_fire? Btw I have corelib on my server. And I wasn't trying to get somebody to code it for me. I kinda have an idea of what to put inside weapon_fire, I'm just lost on how exactly the skill will detect weapon_fire. Thats what I more need help with.
|
|
|
|
« Last Edit: September 21, 2009, 10:34:08 PM by Crazy »
|
Logged
|
|
|
|
|
Yiyas
|
 |
« Reply #7 on: September 21, 2009, 10:23:54 PM » |
|
For some reason 2ndary fire on knife doesn't count as a shot... but why would you want that on weapon_fire?
|
|
|
|
|
Logged
|
|
|
|
Crazy
Level 2 Apprentice

Offline
 United States
Posts: 55
|
 |
« Reply #8 on: September 21, 2009, 10:36:19 PM » |
|
I run a wcs/zombie mod server. I thought it would be an interesting little race. I want it so that when a zombie or a human swings the knife they run faster. This is intended more for the human aspect seeing as it is going to be a knife race. It will have 90% invisibility, chance to do 600 knife damage, extra speed while knifing, and hollidays rapid-fire ultimate changed to accomadate knifing. I have 3 of the skills. I just need this one.
|
|
|
|
|
Logged
|
|
|
|
Crazy
Level 2 Apprentice

Offline
 United States
Posts: 55
|
 |
« Reply #9 on: September 22, 2009, 01:16:02 AM » |
|
I figured it out, thanks guys.
|
|
|
|
|
Logged
|
|
|
|
Crazy
Level 2 Apprentice

Offline
 United States
Posts: 55
|
 |
« Reply #10 on: September 22, 2009, 02:50:48 AM » |
|
Question, is there a way to recognize when a player stops shooting?
|
|
|
|
|
Logged
|
|
|
|
Gen.GenitalZ
Level 1 Trained Beginner
Offline
 United States
Posts: 23
|
 |
« Reply #11 on: September 22, 2009, 03:09:01 AM » |
|
try adding a delay
es es_speed "...blah blah blah" es es_xdelayed .2 es_speed "...back to normal speed, blah blah blah
|
|
|
|
|
Logged
|
|
|
|
|
CA.Berettonawak
|
 |
« Reply #12 on: September 22, 2009, 01:22:15 PM » |
|
es_xdoblock corelib/noisy_on would more be in "preloadcmd"
|
|
|
|
|
Logged
|
Beret, keep yourself focusing on 1 project. Be sure to memorize that down since it sounds good. i love tuna juice  =CA= Pietro: back =CA= Pietro: sorry, was downstair sharing my chocolate with my cat =CA= Pietro: you should see his face when he ate it xD
|
|
|
Crazy
Level 2 Apprentice

Offline
 United States
Posts: 55
|
 |
« Reply #13 on: September 23, 2009, 11:14:33 PM » |
|
Can somebody explain to me why this coding doesn't work. I'm not too great with keysetvalues but maybe thats whats wrong with it. I have this coding in for the skill. "skill2_setting" "0" "skill2_cmd" "es es_xkeysetvalue WCSuserdata server_var(wcs_userid) knifeshit 1" "skill2_sfx" "0" This is what is in es_wcs.txt event weapon_fire { es es_xkeygetvalue knifeshit WCSuserdata event_var(userid) knifeshit if (server_var(knifeshit) = 1) do { if (event_var(weapon) = knife) do { es est_speed event_var(userID) 2.1 es_delayed 3 es est_speed event_var(userID) 1.65 } } } And this is what is in player_spawn_cmd "player_spawn_cmd" "es_xdoblock corelib/noisy_on" I dont see any mistakes. I'm so lost. =-(
|
|
|
|
|
Logged
|
|
|
|
|
CA.Berettonawak
|
 |
« Reply #14 on: September 24, 2009, 12:21:40 PM » |
|
Question, is there a way to recognize when a player stops shooting?
Well you can set a keyvalue on him, delay remove keyvalue, and loop to check if he is still shooting..
|
|
|
|
|
Logged
|
Beret, keep yourself focusing on 1 project. Be sure to memorize that down since it sounds good. i love tuna juice  =CA= Pietro: back =CA= Pietro: sorry, was downstair sharing my chocolate with my cat =CA= Pietro: you should see his face when he ate it xD
|
|
|
|
|
|