AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [TF2] Cakevich (https://forums.alliedmods.net/showthread.php?t=166143)

FlaminSarge 08-31-2011 05:54

[TF2] Cakevich
 
2 Attachment(s)
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?!

Drixevel 08-31-2011 07:58

Re: [TF2] Cakevich
 
This is just a big lul. haha

JoBarfCreepy 08-31-2011 16:11

Re: [TF2] Cakevich
 
And who says boredom is bad? Well, technically I did, but I was wrong at this point.

Unreal1 09-08-2011 15:44

Re: [TF2] Cakevich
 
lol mad fun!

wawazy 09-08-2011 15:58

Re: [TF2] Cakevich
 
hmm

got this server log

Quote:

Unknown command "sm_cakevich_enabled"
ty

wa

FlaminSarge 09-08-2011 16:11

Re: [TF2] Cakevich
 
It's a cvar, not a command.

wawazy 09-08-2011 16:22

Re: [TF2] Cakevich
 
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

:wink:

FlaminSarge 09-08-2011 16:24

Re: [TF2] Cakevich
 
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.

wawazy 09-08-2011 16:50

Re: [TF2] Cakevich
 
ok ty


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

ty

wa

RedSword 09-08-2011 16:56

Re: [TF2] Cakevich
 
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 (Post 1550965)
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.


All times are GMT -4. The time now is 06:08.

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