Raised This Month: $51 Target: $400
 12% 

[TF2] Kart Horns 1.3


Post New Thread Reply   
 
Thread Tools Display Modes
Author
TonyBaretta
Senior Member
Join Date: Mar 2014
Location: nope.avi
Plugin ID:
4404
Plugin Version:
1.3
Plugin Category:
Fun Stuff
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
    5 
    Plugin Description:
    kart horn calling medic
    Old 11-02-2014 , 20:30   [TF2] Kart Horns 1.3
    Reply With Quote #1

    This plugin change medic call to play a random car horn noise , for prevent spam u can able to play 1 sound every 5 sec , work only when u are into the kart.

    How to install:
    Download zip file , unzip into tf folder, upload files into FASTDL folder into your fastdl


    change log :

    Version 1.0 initial release
    Version 1.1 Fixed lots of errors
    Version 1.2 another fix
    Version 1.2.1 fixed
    Version 1.3 Timer Fixed ty to PCDrivers
    Attached Files
    File Type: zip karthorn13.zip (412.8 KB, 1254 views)
    File Type: sp Get Plugin or Get Source (karthorn.sp - 1678 views - 3.2 KB)
    __________________

    Last edited by TonyBaretta; 11-04-2014 at 13:45.
    TonyBaretta is offline
    Dr. Greg House
    Professional Troll,
    Part-Time Asshole
    Join Date: Jun 2010
    Old 11-02-2014 , 22:14   Re: [TF2] Kart Horns 1.0
    Reply With Quote #2

    wtf, why:

    -Does the code look so disorganized?
    -Are you using a timer instead of a simple timestamp?
    -Are you precaching stuff that's never used?
    -Not use a string array to store the filepaths in?
    -Are you declaring g_iMedic when it's never used?
    -Are you globally limiting the use of horns for the duration of the timer, with the first timer instance falsely unlocking horns again before they actually should be used, but only if that person happens to still be in a car?
    -Are you passing clientIDs in a timer?
    -Are you using a wrong description in the obviously copy-pasted ConVar declaration?
    -No idea what that's even supposed to do:
    Code:
    EmitSoundToClient(client, "");
    I request instant unapproval.
    __________________
    Santa or Satan?

    Watch out when you're paying people for private requests! Most stuff already exists and you can hardly assess the quality of what you'll get, and if it's worth the money.

    Last edited by Dr. Greg House; 11-02-2014 at 23:00.
    Dr. Greg House is offline
    Chdata
    Veteran Member
    Join Date: Aug 2012
    Location: Computer Chair, Illinois
    Old 11-02-2014 , 22:19   Re: [TF2] Kart Horns 1.0
    Reply With Quote #3

    Interesting TF2Ware plugin you got there.
    __________________
    Chdata is offline
    ddhoward
    Veteran Member
    Join Date: May 2012
    Location: California
    Old 11-02-2014 , 23:16   Re: [TF2] Kart Horns 1.0
    Reply With Quote #4

    Code has a lot of problems, yeah. Dr. House pretty much summed it up, feel free to ask if you need any help correcting them.

    Also, using EmitSoundToClient causes the sound to be only audible to the person honking. No other player can hear the honks; he can only hear his own honks.

    But anyway, this is seriously the best idea ever. I'm laughing so hard right now I'm having a very hard time typing this. Oh my god I have so many ideas for my own version of this plugin but I would feel like a total jackass if I just made my own and stole your idea. ;.;
    __________________

    Last edited by ddhoward; 11-02-2014 at 23:54.
    ddhoward is offline
    TonyBaretta
    Senior Member
    Join Date: Mar 2014
    Location: nope.avi
    Old 11-03-2014 , 03:07   Re: [TF2] Kart Horns 1.0
    Reply With Quote #5

    Fixed EmitSound , and other errors .

    Sorry for the prev buggy version but when i have upload it here are 4 am , i haven't checked at all.

    @ dr. house :facepalm:
    SORRY I'M NOT A PRO LIKE U
    __________________

    Last edited by TonyBaretta; 11-13-2014 at 17:26.
    TonyBaretta is offline
    ddhoward
    Veteran Member
    Join Date: May 2012
    Location: California
    Old 11-03-2014 , 03:29   Re: [TF2] Kart Horns 1.0
    Reply With Quote #6

    A few more things, most of which have already been pointed out:
    • g_iMedic is literally doing nothing.
    • IN_CALLMEDIC is literally doing nothing.
    • Indentation is off, everywhere.
    • You are still using a timer while using timestamps would be better
    • While the timer should be removed entirely, in the future you should not pass a client index through a timer; you should rather use a userID or entref or client serial.
    • g_nospam isn't even an array... Each person's cooldown isn't even tracked individually. It's all really strange; one person honking causes other people to not be able to honk, and if a lot of people all honk at once, strange things happen. But like I said three points ago, the cooldown system needs to be completely reworked.
    • You are repeating the same file paths over and over and over, rather than just storing them globally in an array of strings.
    • Using the global array would also allow you to use a single EmitSound instruction, rather than a ton of them.
    __________________

    Last edited by ddhoward; 11-03-2014 at 03:32.
    ddhoward is offline
    TonyBaretta
    Senior Member
    Join Date: Mar 2014
    Location: nope.avi
    Old 11-03-2014 , 15:19   Re: [TF2] Kart Horns 1.1
    Reply With Quote #7

    updated to 1.3

    All work fine now
    __________________

    Last edited by TonyBaretta; 11-04-2014 at 13:33.
    TonyBaretta is offline
    Sheepy
    Junior Member
    Join Date: Feb 2014
    Old 11-07-2014 , 07:20   Re: [TF2] Kart Horns 1.3
    Reply With Quote #8

    works perfectly spam that e tho
    Sheepy is offline
    PCDrivers
    AlliedModders Donor
    Join Date: Feb 2013
    Location: Canary Islands
    Old 11-12-2014 , 07:46   Re: [TF2] Kart Horns 1.3
    Reply With Quote #9

    Good Work
    __________________

    TrollFortress Spanish Community
    PCDrivers is offline
    Reply



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 14:41.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode