Jump to content

Plugin Addition


Soap

Recommended Posts

Jackie thoughts on this:

The witches we buy are sometimes or always...bride witches? Just for fun and to make it more variable?

 

Also with say 15-30 points to buy severe storm on any map like in Hard rain? I thought that could be fun if a map like dark carnival or dead center or whatever had that in it :D

Link to comment
Share on other sites

Member

why no storms? And the witches thing is just cause we only see brides in the one level so I thought any bought witches it might be fun to see them in other campaigns?

Link to comment
Share on other sites

Sky
Member
(edited)

This code makes sure both model types are precached, so the models don't crash the server on maps that they aren't precached by default.

public OnMapStart()
{
// Some maps only precache the bride witch, while others only precache the standard witch.
// Attempting to spawn a model which isn't precached would crash a server, so we precache if not precached.

if (!IsModelPrecached("models/infected/witch_bride.mdl")) PrecacheModel("models/infected/witch_bride.mdl", true);
if (!IsModelPrecached("models/infected/witch.mdl")) PrecacheModel("models/infected/witch.mdl", true);
}

 

And where you run your purchase witch function:

SpawnWitch(client)
{
// We want to randomize which of the two witches are spawned.
new random = GetRandomInt(1, 2);	// 50/50

if (random == 1)
{
	// "witch auto" lets the director place the witch
	// "witch" places it where the spawning players crosshair is looking
	ExecCheatCommand(client, "z_spawn", "witch");
}
else
{
	ExecCheatCommand(client, "z_spawn", "witch_bride");
}
}

 

And the ExecCheatCommand code:


/* *
*
*		Allows a client to execute a cheat command, such as give, z_spawn, and so on.
*
*
*/

ExecCheatCommand(client = 0,const String:command[],const String:parameters[] = "")
{
new iFlags = GetCommandFlags(command);
SetCommandFlags(command,iFlags & ~FCVAR_CHEAT);

if(IsClientIndexOutOfRange(client) || !IsClientInGame(client))
{
	ServerCommand("%s %s",command,parameters);
}
else
{
	FakeClientCommand(client,"%s %s",command,parameters);
}

SetCommandFlags(command,iFlags);
SetCommandFlags(command,iFlags|FCVAR_CHEAT);
}

Edited by Sky
Link to comment
Share on other sites

Member

I understand JAckie. I was just thinking for improvement type additions :blush:

 

and from what you're saying Sky is that the code needed for a bride witch?

Link to comment
Share on other sites

If you go by Hard Rain. Storms wouldnt do anything, you can still hear and you can still see a great distance. Also wouldnt make sense in most maps, plus those things could be spammed and would need to work a code that you cant buy them for an amount of time.

Link to comment
Share on other sites

Member

Well I was just thinking the storms that do happen in Hard rain and you can buy it 2-3 times per map with 4-5 minute intervals or something.

And those storms....are pretty blinding when I have them come on I really can't see much until it ends.

 

And as far as not making sense....it is more just a fun thing. Most of the stuff doesn't make sense as it is :D

Link to comment
Share on other sites

Sky
Member
(edited)

Yes, the code above would simply be needed to effectively be dropped straight into the code. It's as easy as, effectively, flipping a switch (as there are only two cases, case 0 (off) - witch standard, and case 1 (on) - witch bride).

It's more a matter of knowing the code or not (similarly to, it's easy to speak a language you know, but it's not easy to speak a language you don't know - even if it's easy for someone else.) But, now he knows the code.

It really just comes down to a matter of whether he (or anyone else) really wants to add witch brides, and whether it'll simply confuse new or old players.

 

I do agree completely against the storms idea, though. Where witches can be randomized automatically, removing the requirement for players to do one more thing, storms would be another purchase that has to be managed

by players, and may over-complicate things, and there would be a great many more variables to consider, but, again, just overly complicated on a server which promises players a simple, straight forward atmosphere.

Edited by Sky
Link to comment
Share on other sites

Member

The storms thing would be over complicating you're saying?

Because of the need to add the coding items in from hard rain in all maps? or preload it adds a headache of things to manage server side?

 

i ask very innocently as I am completely unfamiliar with how those things work server side. :D

 

Yes, the code above would simply be needed to effectively be dropped straight into the code. It's as easy as, effectively, flipping a switch (as there are only two cases, case 0 (off) - witch standard, and case 1 (on) - witch bride).

 

I do agree completely against the storms idea, though. Where witches can be randomized automatically, removing the requirement for players to do one more thing, storms would be another purchase that has to be managed

by players, and may over-complicate things, and there would be a great many more variables to consider, but, again, just overly complicated on a server which promises players a simple, straight forward atmosphere.

Link to comment
Share on other sites

It would be more work than it is really worth it for the storms, but, someone has done this on alliedmods, I believe, silvers or mi12345 actually.

Link to comment
Share on other sites

lol, can you precache the rain model :P

 

if (!IsModelPrecached("models/raindrop.mdl")) PrecacheModel("models/raindrop.mdl", true);
for(;;)ExecCheatCommand(client, "z_spawn", "raindrop");

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...