EventScripts Forums
Mattie's EventScripts and Source Forums
Script Categories
16000 (15) abilities (15) addon (72) addons (18) admin (355) admins (24) advert (30) adverts (32) afk (18) alerts (12) ammo (25) anti (21) armor (11) auth (16) automatic (15) awp (29) ban (25) bank (11) ba_jail (35) bhop (46) block (27) bomb (48) bonus (25) boost (22) bot (36) bot-management (20) bots (24) bullet (13) bunnyhop (19) Buy (27) buymenu (13) c4 (12) cash (77) Change (14) chat (77) cheat (15) clan (17) classes (24) color (30) colors (21) command (23) commands (21) config (28) configurable (11) connect (58) counter (12) Counter-Strike-Source (20) CS:S (20) css (3404) custom (13) Damage (49) database (14) dead (19) Deagle (11) death (20) deathmatch (79) deathrun (17) deutsch (15) dice (12) disconnect (26) Dissolve (12) dm (24) dod:s (11) dods (502) download (13) easy (26) effect (14) effects (126) English (20) entity (24) est (12) es_tools (14) Eventscript (12) exploit (11) flashbang (27) français (104) french (36) fun (312) funny (18) Gabeee (11) game (12) gamemode (13) gameplay (175) German (11) give (22) gravity (16) grenade (28) grenades (32) gun (16) GunGame (31) GunGame5 (11) guns (20) Hack (16) headshot (37) health (72) hegrenade (15) help (11) hit (13) hl2dm (444) HP (26) hudhint (13) hun (18) hungarian (26) info (53) information (19) invisible (11) IP (13) jail (82) jailbreak (14) join (47) jump (19) kick (25) kill (51) kills (24) knife (66) leveling (38) LnD (14) lol (11) magyar (49) management (14) manager (11) mani (16) map (32) map-management (26) maps (17) match (25) Memphis-84 (13) menu (144) message (34) messaging (52) minecraft (12) mod (121) model (18) models (33) modye (16) money (50) motd (13) music (33) mute (20) nades (20) name (15) new (13) noblock (54) orangebox (23) player (49) player-management (31) player-tracking (28) popup (72) prop (13) propmenu (14) props (34) protect (12) protection (32) punish (11) punishment (51) python (80) quake (33) QuakeSounds (12) race (13) races (20) radio (31) random (47) rank (42) rates (15) rcon (12) realism (22) Regeln (23) respawn (69) restrict (41) round (26) rpg (32) rules (63) say (17) score (16) scout (29) Script (25) script-helper (25) scriptpack (33) sdk (171) server (63) server-tools (42) shop (12) showdamage (20) silly (31) simple (33) skin (17) skins (35) slay (13) soccer (14) sound (68) sounds (109) source (14) spanish (20) spawn (82) speed (26) statistics (14) stats (57) status (15) Steam (11) STEAMID (30) Superhero (15) surf (41) Team (30) team-balance (14) teleport (17) text (19) TF2 (142) time (23) timer (15) tools (15) tracers (19) triggers (11) uedi (17) uses_auth (18) vip (24) vote (40) voting (22) war (25) Warcraft (12) warcraft-source (20) wc3 (14) wcs (47) wcs:Python (32) weapon (88) weapons (120) web (16) welcome (14) wuerfeln (11) zm (26) zombie (100) zombiemod (55) zombies (12)
Script Authors
*XYZ*SaYnt (12) .:MiB:. (20) .:modye:. (14) .eMko* (6) 101satoon101 (12) 3R10N (24) 4u571n91 (5) 7355608 (9) Absolute (9) Ace Rimmer (40) adminc (5) adyshor37 (5) Adz (8) AgathaKnuppelkuh (8) aidden (8) ajax (5) ak_47 (6) Al3c Tr3v3lyan (6) allstareng (5) ashbash1987 (9) ATAMAH (7) Ayuto (5) aznone (5) B00M (5) BackRaw (41) BFH_RedBull (8) bigfabi (8) Bioko (10) blackshoxx (9) Blade (10) bladesback (13) bobdole (11) bodzsar1 (8) bonbon (36) Brainsucker (32) cagemonkey (8) capo azzlack (7) captain master (6) carbon-14 (10) CaskioUTF (5) cbirou (15) CbRRR (16) ChaCaLz2psy4 (5) CharlesT (5) Chris1888 (5) Chrisber (5) chrismrulz (10) Chun (6) cladiron (10) clipz934 (8) Colster (21) Cookieman8 (7) CrAzD (6) craziest (11) dani12356 (12) DanielB (19) Darkness123 (8) Dave (9) dbozan99 (7) dead man walker (12) deathx9 (5) Deathyy (16) dhack (17) Di[M]aN (12) DJ Fire-Black prod (8) DoCky (31) Don (15) dordtcore (9) DragonFreddo (8) Drassil (5) dretax14 (11) Einlanzers (47) EmbouT (10) emilplov (7) Errant (10) Eun (6) Fantole (10) FMIS (5) Franc1sco (17) freddukes (18) Frequency (6) Fridge (5) Fugi91 (6) Fulmine (5) G4ME (5) GAMEREN2 (8) german9114 (13) GODJonez (40) GoodfellaDeal (5) Hansi (6) Hisoka (6) HitThePipe (7) HOLLDIDAY (24) Icetouch (6) ichthys (25) Im the new guy (14) iNexus (13) infamous1 (9) isivisi (13) ispaine (7) Jackmaster (9) Jeff91 (45) JoeyT2006 (30) Juba_PornBorn (12) jxl180 (11) KDBFame (6) L'In20Cible (11) L.P.H (8) Largo Usagi (10) LnD (14) Lobe (11) loKkdoKk (8) lolo-le-haricot (7) LosNir (5) [email protected] (9) M4rc3L-XCN (7) macshot (7) magyar-oneill (9) Matth (7) Mattie (21) mave1993 (5) MBchrono (15) McFly (20) Medda (5) Memphis-84 (15) Messiah93 (20) Mickyy (5) micmacx (6) minimal42O (5) Mitchell (5) Mixer57 (5) modye (6) Monster_Bitch1 (9) Mordavolt (7) motomoto (23) MrScriptaz (6) mryoung (6) MyTechZone.de (9) NicolasConfigz (9) Nicolous (23) ojii (31) oliVier (10) Omega68 (6) Omega_K2 (11) Owned|Myself (8) P3N (7) pand3mic (6) parsimba (5) Pascal257 (9) PatPeter (7) PDrop (10) Phaedrus (18) PhantOm Fury (7) phoenix131 (9) pinkyyy -.- (5) pitbull0993 (7) PixelGamer (7) qwern (5) randomknifer (9) Raptor150 (31) Ratzee (6) ReaCtioN2oo9 (6) RedCliff (5) Rennnyyy (17) revolutionfighters (8) RideGuy (12) Rio (9) Roeliekt (6) roof (16) runamagic (13) Ryezin (5) sandking220 (6) Sarcasm_Poisoning (10) saRs| Johnny-5 (13) Schubaal (10) sea212 (5) sega74rus (15) sgt.angel (6) Shad0w (11) ShoTaXx# (7) sicilia (7) sicman_adrian (22) skillz92 (7) sn4k3 (18) Snake12 (7) snake38 (10) sonicsight (7) SpeedFreak (9) spoonman184 (12) stabby (22) stas (27) Stirni (6) stonedegg (8) Strontium Dog (30) SumGuy14 (25) SuperDave (49) surfteam (5) TaCo (5) TanaToS (17) Tealk (6) teowow (16) TheCheeTaH (27) TheDonFather (5) theresthatguy (6) Tiny Tod (7) tooshkan4uk (8) Totyahun (9) uedi (38) ultimatebuster (6) Undead (25) usernamesaretaken (15) wanted241 (9) Warren (13) westham (6) WhiteAvenger (7) Wonder (14) Wundermaxe (5) X-Mania (5) XE_ManUp (14) xfalcon61 (5) zSweetXz (5) ZZMatty (6) [Cs]Lord_Inferno2 (11) [DAP]Kickbutt (5) [NATO]Hunter (28) ||Wolf|| (10)
Search

Post new topic Reply to topic
Author Message
User avatar
Expert
Profile

Posts: 969
Location:
Germany - Heidelberg

Steam Friends Name: millius
 
New postPosted: 2014-01-23, 7:55 pm 
   Post subject: Flying Blade

Flying Blade 1.0
Geschrieben von: dead man walker am 2014-01-23 18:59:55.

Benötigt:Beschreibung:
    Flying Blade gives players the ability to throw their knifes a specific amount of time. For a list of the different settings see the configuration below.
    The configuration can easily be done through an external .cfg file located in the cfg folder:
    Code:
    // *****************************************************************
    // *** Flying Blade Config
    // *****************************************************************


    // Amount of knifes to throw per round. Set to 0 for infinite
       fb_knife_amount 5

    // Alert players of their remaining knifes to throw. 1=yes, 0=no
       fb_knife_amount_msg 1

    // Amount of damge done by the thrown knife. Set to "kill" for instant death
       fb_knife_damage 30

    // Color of the thrown knife in "rgba" format. Spereate with comma (,)
       fb_knife_color "255,255,255,255"

    // Angle the thrown knife is turned. Set to "rotate" for rotating
       fb_knife_angle 60

    // Rotating speed if fb_knife_angle is set to "rotate"
       fb_knife_rotate_speed 10

    // Amount of speed of the thrown knife
       fb_knife_speed 15

    // Scale of the thrown knife model (>0 and <7)
       fb_knife_size 1.7

    // Sound when knife is thrown. Set to 0 for no sound
       fb_knife_sound "weapons/iceaxe/iceaxe_swing1.wav"

    // Classnames of entities the thrown knife ignores (does not get removed). Spereate with semicolons (;)
       fb_ignored_classnames "trigger_soundscape;func_buyzone;func_breakable_surf;func_hostage_rescue"

    // Linux offset of "m_flModelScale". May be changed on update
       fb_model_size_linux_offset 880

    // Windows offset of "CBaseFlex::Teleport". May be changed on update
       fb_teleport_windows_offset 108

    // Windows offset of "CBasePlayer::Touch". May be changed on update
       fb_touch_windows_offset 99


Download: http://addons.eventscripts.com/addons/download/flying_blade
Installation:
    -Extract the unzipped folders into your cstrike folder.
    -Add es_load flying_blade to your autoexec.cfg
    -Restart your server - This is important as a new file (damage.py) will be added to the corelib
Credits:
  • L'In20Cible: Python version of corelib's damage
  • L'In20Cible: Code snippet for setting velocity
  • Ayuto: answering questions/ giving advice
Version Updates:
  • 1.1
    - Plugin does not come with L'In20Cible's Python version of corelib's damage anymore
    - Fixed typo
    - Little performance improvement by not precaching on every tick
    - Fixed file name
  • 1.2
    - No need for L'In20Cible's Python version of corelib's damage anymore
    - No need to specifiy CBaseAnimating.m_flModelScale's offset in the cfg anymore
    - Shortened a property name


Last edited by Dead Man Walker on 2014-01-25, 7:22 pm, edited 3 times in total.




User avatar
Expert
Profile

Posts: 1089
 
New postPosted: 2014-01-24, 8:34 am 
   Post subject: Re: Flying Blade

Well done!

But you have a little typo in es_map_start.
And if I'm right there is no reason to precache a model every tick.

And it might be even better if we hook the player_death event so we can change the death notification weapon icon to a knife instead of a skull.

_________________
My Community | My Servers | My Steam

Image


User avatar
Guru
Guru
Profile

Posts: 1743
Location:
Germany
 
New postPosted: 2014-01-24, 9:12 am 
   Post subject: Re: Flying Blade

There is no need to hook player_death. Just change the damage source to weapon_knife.

_________________
ImageImage


User avatar
Expert
Profile

Posts: 1089
 
New postPosted: 2014-01-24, 9:51 am 
   Post subject: Re: Flying Blade

I used damage earlier and I'm pretty sure that it always showed the skull, no matter which damage source I used.

_________________
My Community | My Servers | My Steam

Image


User avatar
Moderator
Moderator
Profile

Posts: 6615
 
New postPosted: 2014-01-24, 10:42 am 

The updated version, which dmw includes in the download, allows for this. However, you should never include an updated corelib or _libs module in an addon. Not to mention, why call a server command from Python that then calls back to Python in a way that you have to "get" the arguments again, instead of just calling the function directly in Python?

Satoon

_________________
ImageImage


User avatar
Expert
Profile

Posts: 969
Location:
Germany - Heidelberg

Steam Friends Name: millius
 
New postPosted: 2014-01-24, 12:06 pm 
   Post subject: Re: Flying Blade

Thanks for all the comments.

101satoon101 wrote:
However, you should never include an updated corelib or _libs module in an addon

Why is that? So instead I should just post the link as a requirement and not include it? I'll do this at once if you give me a good reason to :). I just wanted to make it as easy as possible for others.

101satoon101 wrote:
Not to mention, why call a server command from Python that then calls back to Python in a way that you have to "get" the arguments again, instead of just calling the function directly in Python?

True, I guess I did that because I used the old corelib's es_damage.txt using the server command. When I included the python damage.py I just changed the last parameter or so.

stonedegg wrote:
But you have a little typo in es_map_start.

Thanks for noticing, I'll fix that.

stonedegg wrote:
And if I'm right there is no reason to precache a model every tick.

I'll check on that and let you know + update this version in case you're right (which would make sense)

_________________
Try some of my addons
- Dead Man Walker -


User avatar
Guru
Guru
Profile

Posts: 1743
Location:
Germany
 
New postPosted: 2014-01-24, 12:23 pm 
   Post subject: Re: Flying Blade

Dead Man Walker wrote:
Thanks for all the comments.

101satoon101 wrote:
However, you should never include an updated corelib or _libs module in an addon

Why is that? So instead I should just post the link as a requirement and not include it? I'll do this at once if you give me a good reason to :). I just wanted to make it as easy as possible for others
Well, then you could also upload ES and SPE. :P

The reason is if you or other people do that with several plugins, all have to be updated if L'In20Cible updates the original.

_________________
ImageImage


User avatar
Expert
Profile

Posts: 969
Location:
Germany - Heidelberg

Steam Friends Name: millius
 
New postPosted: 2014-01-24, 12:45 pm 
   Post subject: Re: Flying Blade

I thought so. I guess that is reason enough^^. If I find time tonight (I always do...) I'll update the addon.
Thanks again for spotting errors/ suggesting improvements. I appreciate each of your comments :)

_________________
Try some of my addons
- Dead Man Walker -


User avatar
Guru
Guru
Profile

Posts: 1743
Location:
Germany
 
New postPosted: 2014-01-24, 2:19 pm 
   Post subject: Re: Flying Blade

Then you might also want to update the addon's name: ../addons/flying_blade/knife.py :P

_________________
ImageImage


User avatar
Expert
Profile

Posts: 969
Location:
Germany - Heidelberg

Steam Friends Name: millius
 
New postPosted: 2014-01-24, 6:17 pm 
   Post subject: Re: Flying Blade

Now that is embarrassing.
Shame on you stonedegg, you find little typos but not the major obvious mistake :D

_________________
Try some of my addons
- Dead Man Walker -


User avatar
Expert
Profile

Posts: 969
Location:
Germany - Heidelberg

Steam Friends Name: millius
 
New postPosted: 2014-01-24, 9:02 pm 
   Post subject: Re: Flying Blade

Version Update 1.1:
- Plugin does not come with L'In20Cible's Python version of corelib's damage anymore
- Fixed typo
- Little performance improvement by not precaching on every tick
- Fixed file name

_________________
Try some of my addons
- Dead Man Walker -


User avatar
Expert
Profile

Posts: 1089
 
New postPosted: 2014-01-25, 7:41 am 
   Post subject: Re: Flying Blade

Dead Man Walker wrote:
Now that is embarrassing.
Shame on you stonedegg, you find little typos but not the major obvious mistake :D


I just looked at the code, nothing else :D
But this is now the second time I tell you this, test the version that you upload, before you upload it. ;)

_________________
My Community | My Servers | My Steam

Image


User avatar
Expert
Profile

Posts: 969
Location:
Germany - Heidelberg

Steam Friends Name: millius
 
New postPosted: 2014-01-25, 7:43 am 
   Post subject: Re: Flying Blade

Quote:
I just looked at the code, nothing else :D

That surprises and satisfies me :)

Quote:
But this is now the second time I tell you this, test the version that you upload, before you upload it. ;)

This is the second time I'll tell you this:
I always test my plugins. But it sometimes is really hard to go through all possible scenarios. That's what this forum is for, to report bugs and erros, so I can fix them. Two eyes cannot see as much as the ES community together. And I really fix those kinds of mistakes right away - meaning within the same day. Dont forget: these plugins are none-commercial and made for the community. We all work together, don't expect 100% perfection and functionallity at first release :)
So, once again, thanks for taking time skimming my script and report errors.

_________________
Try some of my addons
- Dead Man Walker -


User avatar
Expert
Profile

Posts: 1089
 
New postPosted: 2014-01-25, 9:03 am 

I did not say that you didn't test the plugin, but the version that you uploaded, because then you would have seen that it wouldn't load. ;)
Anyways nevermind, this is going in the wrong direction now xD

_________________
My Community | My Servers | My Steam

Image


User avatar
Moderator
Moderator
Profile

Posts: 6615
 
New postPosted: 2014-01-25, 2:42 pm 

I still don't understand why you even have the requirement of the new damage command. Why not simply write that directly into your script? Again, calling a server command that calls back to Python which then has to figure out the arguments you passed it is so much more difficult than just calling a function with the proper arguments. That is why if you read on in the thread, we start looking into adding the functionality directly to playerlib and then having the ESS damage command call up to playerlib.

Satoon

_________________
ImageImage


User avatar
Moderator
Moderator
Profile

Posts: 6615
 
New postPosted: 2014-01-25, 2:51 pm 

Sorry for the double post, but I remember what else I was going to bing up. I see you precache the model now on map start. I cannot remember if it needs just once a map or once a round. Have you tested this through multiple rounds to verify the model only needs precached once a map?

Also, I don't believe you have to set the model of an entity more than once. Once you set it, it will remain that value until something else changes it. Setting the model every tick is pointless.

Any property with ".baseclass" in it can be shortened. CWorld.baseclass.m_nModelIndex can be shortened to CBaseEntity.m_nModelIndex.

Satoon

_________________
ImageImage


User avatar
Expert
Profile

Posts: 969
Location:
Germany - Heidelberg

Steam Friends Name: millius
 
New postPosted: 2014-01-25, 7:13 pm 
   Post subject: Re: Flying Blade

101satoon101 wrote:
I still don't understand why you even have the requirement of the new damage command. Why not simply write that directly into your script?

Alright, alright, you convinced me :) It's implemented.

101satoon101 wrote:
I see you precache the model now on map start. I cannot remember if it needs just once a map or once a round. Have you tested this through multiple rounds to verify the model only needs precached once a map?

I have indeed. Once on map start is enough.

101satoon101 wrote:
Also, I don't believe you have to set the model of an entity more than once. Once you set it, it will remain that value until something else changes it. Setting the model every tick is pointless.

How can you say setting the model every tick is pointless if you don't even know wheather setting it once is enought. In fact I have tried, so has stonedegg, with the conclusion that the models is set back to its original, which is why the model (and the color as well) needs to be set every tick.

101satoon101 wrote:
Any property with ".baseclass" in it can be shortened. CWorld.baseclass.m_nModelIndex can be shortened to CBaseEntity.m_nModelIndex.

Thanks for the info

_________________
Try some of my addons
- Dead Man Walker -


User avatar
Expert
Profile

Posts: 969
Location:
Germany - Heidelberg

Steam Friends Name: millius
 
New postPosted: 2014-01-25, 7:21 pm 
   Post subject: Re: Flying Blade

Version Update 1.2:

- No need for L'In20Cible's Python version of corelib's damage anymore
- No need to specifiy CBaseAnimating.m_flModelScale's offset in the cfg anymore
- Shortened a property name

_________________
Try some of my addons
- Dead Man Walker -


Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 25 posts ]  Go to page 1, 2  Next


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group