Raised This Month: $32 Target: $400
 8% 

[TF2] Cakevich


Post New Thread Reply   
 
Thread Tools Display Modes
Author
FlaminSarge
Veteran Member
Join Date: Jul 2010
Plugin ID:
2531
Plugin Version:
1.0
Plugin Category:
Fun Stuff
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
    5 
    Plugin Description:
    Throw cakes at people.
    Old 08-31-2011 , 05:54   [TF2] Cakevich
    Reply With Quote #1

    Lets Heavies throw cakes instead of sandviches/steaks (produces the same effect)

    Client Command: sm_cakevich [0, 1, or 2] - 0 to stop throwing cakes, 1 to throw the medium cake plate, 2 to throw a large cake plate (still acts as a medium)

    Then there's the version cvar, sm_cakevich_version, and the enabled cvar:
    sm_cakevich_enabled <0/1> allow or disable cake throwing. Defaults to 1.

    Requires SDKHooks

    I GOT BORED OK?!
    Attached Files
    File Type: sp Get Plugin or Get Source (cakevich.sp - 586 views - 3.4 KB)
    File Type: smx cakevich.smx (4.0 KB, 909 views)
    __________________
    Bread EOTL GunMettle Invasion Jungle Inferno will break everything. Don't even ask.

    All plugins: Randomizer/GiveWeapon, ModelManager, etc.
    Post in plugin threads with questions.
    Steam is for playing games.
    You will be fed to javalia otherwise.
    Psyduck likes replays.

    Last edited by FlaminSarge; 09-08-2011 at 16:25.
    FlaminSarge is offline
    Drixevel
    AlliedModders Donor
    Join Date: Sep 2009
    Location: Somewhere headbangin'
    Old 08-31-2011 , 07:58   Re: [TF2] Cakevich
    Reply With Quote #2

    This is just a big lul. haha
    Drixevel is offline
    JoBarfCreepy
    Member
    Join Date: Feb 2011
    Location: Next to Sweden and Norwa
    Old 08-31-2011 , 16:11   Re: [TF2] Cakevich
    Reply With Quote #3

    And who says boredom is bad? Well, technically I did, but I was wrong at this point.
    JoBarfCreepy is offline
    Unreal1
    AlliedModders Donor
    Join Date: Dec 2010
    Old 09-08-2011 , 15:44   Re: [TF2] Cakevich
    Reply With Quote #4

    lol mad fun!
    Unreal1 is offline
    wawazy
    Member
    Join Date: Aug 2009
    Old 09-08-2011 , 15:58   Re: [TF2] Cakevich
    Reply With Quote #5

    hmm

    got this server log

    Quote:
    Unknown command "sm_cakevich_enabled"
    ty

    wa
    wawazy is offline
    FlaminSarge
    Veteran Member
    Join Date: Jul 2010
    Old 09-08-2011 , 16:11   Re: [TF2] Cakevich
    Reply With Quote #6

    It's a cvar, not a command.
    __________________
    Bread EOTL GunMettle Invasion Jungle Inferno will break everything. Don't even ask.

    All plugins: Randomizer/GiveWeapon, ModelManager, etc.
    Post in plugin threads with questions.
    Steam is for playing games.
    You will be fed to javalia otherwise.
    Psyduck likes replays.
    FlaminSarge is offline
    wawazy
    Member
    Join Date: Aug 2009
    Old 09-08-2011 , 16:22   Re: [TF2] Cakevich
    Reply With Quote #7

    i need to put thos line in server.cfg

    Quote:
    //Cake sandvich section
    //sm_cakevich_version version of
    sm_cakevich_enabled 1 // 0 or 1 allow or disable cake throwing.
    sm_cakevich 1
    //[0, 1, or 2] - 0 to stop throwing cakes, 1 to throw the medium cake plate, 2
    //to throw a large cake plate (still acts as a medium)
    im right or im stupid lol

    wawazy is offline
    FlaminSarge
    Veteran Member
    Join Date: Jul 2010
    Old 09-08-2011 , 16:24   Re: [TF2] Cakevich
    Reply With Quote #8

    Cakevich defaults to enabled. You don't need to automatically put everything you see in the "cvar" section of a plugin post into server.cfg. Only if you want to change default values do you do so.

    sm_cakevich isn't even a cvar.
    __________________
    Bread EOTL GunMettle Invasion Jungle Inferno will break everything. Don't even ask.

    All plugins: Randomizer/GiveWeapon, ModelManager, etc.
    Post in plugin threads with questions.
    Steam is for playing games.
    You will be fed to javalia otherwise.
    Psyduck likes replays.
    FlaminSarge is offline
    wawazy
    Member
    Join Date: Aug 2009
    Old 09-08-2011 , 16:50   Re: [TF2] Cakevich
    Reply With Quote #9

    ok ty


    but can you make it work automaticly no need to type command ??

    ty

    wa
    wawazy is offline
    RedSword
    SourceMod Plugin Approver
    Join Date: Mar 2006
    Location: Quebec, Canada
    Old 09-08-2011 , 16:56   Re: [TF2] Cakevich
    Reply With Quote #10

    Simple and nice plugin. Thanks for sharing.

    Codewise, I believe you could change this :

    Code:
    	for (new i = 0; i <= MaxClients; i++)
    	{
    		OnClientPutInServer(i);
    	}
    to this :

    Code:
    	for (new i = 1; i <= MaxClients; i++)
    	{
    		OnClientPutInServer(i);
    	}
    edit :
    Quote:
    Originally Posted by wawazy View Post
    ok ty


    but can you make it work automaticly no need to type command ??

    ty

    wa
    change line #69 :

    Code:
    public OnClientPutInServer(client) cake[client] = 0;
    to

    Code:
    public OnClientPutInServer(client) cake[client] = 1;
    (or 2 for big cakes)

    and recompile. Not tested but it should work as it did, but with everyone's default set to drop cakes.
    __________________
    My plugins :
    Red Maze
    Afk Bomb
    RAWR (per player/rounds Awp Restrict.)
    Kill Assist
    Be Medic

    You can also Donate if you appreciate my work

    Last edited by RedSword; 09-08-2011 at 16:59.
    RedSword is offline
    Reply


    Thread Tools
    Display Modes

    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 19:49.


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