Plugin Question.

Questions, comments, and news on the server side plug-ins and it's API
Post Reply
Big Cheese
Private First Class
Private First Class
Posts: 87
Joined: Tue Aug 30, 2005 12:51 am

Plugin Question.

Post by Big Cheese » Wed Sep 03, 2008 8:49 pm

i've searched a bit with no luck, but is their a plugin that allows flags to spawn once a certain number of players have joined a server?

like when theres only 3 people in a map and one of them gets a super-flag, they can really dominate for awhile. is their a plugin that would allow me to say gm and laser wont fall till 6 or more people in the server?

Thanks
Nathan
Image

User avatar
Marines
Private First Class
Private First Class
Posts: 77
Joined: Sun Jan 13, 2008 6:03 pm
Location: Planet Mars Landing site 11828

Post by Marines » Wed Sep 03, 2008 10:23 pm

i do not think there is a plugin for that. yet :)
Poke Me And Die!

User avatar
A Meteorite
Private First Class
Private First Class
Posts: 1786
Joined: Thu Apr 28, 2005 12:56 am
Location: California, U.S.
Contact:

Post by A Meteorite » Thu Sep 04, 2008 5:05 pm

The 2.0 API does not allow that sort of flag control. I'm assuming that it would be possible to be added to the API, though, as the server controls dropping flags (not sure how much work it'd take, though, I haven't really looked at flag control).

You'd probably be better off, say, bz_removePlayerFlag(int playerID)'ing the player if they have y flag and if there is less than x players.
Image
Owner @ BZFX
Core Admin @ CAN

Email me: bzmet…@gmail.com

User avatar
Spazzy McGee
Sergeant Major
Sergeant Major
Posts: 1403
Joined: Mon Mar 21, 2005 4:59 pm
Location: Planet MoFo, Sheffield Division; United Kingdom
Contact:

Post by Spazzy McGee » Thu Sep 04, 2008 5:54 pm

A Meteorite wrote:The 2.0 API does not allow that sort of flag control. I'm assuming that it would be possible to be added to the API, though, as the server controls dropping flags (not sure how much work it'd take, though, I haven't really looked at flag control).

You'd probably be better off, say, bz_removePlayerFlag(int playerID)'ing the player if they have y flag and if there is less than x players.
No, I think it could be possible. Am I correct in assuming that a plugin can execute a /command with admin permissions? In which case get your plugin to run /flag up (which removes all flags) when the player count is under a threshold, and then /flag reset all when it's higher. Problem solved.
"Life is what happens to you while you're busy making other plans." - John Lennon

User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5172
Joined: Fri Dec 13, 2002 4:11 am
Location: [Redacted]
Contact:

Post by JeffM » Thu Sep 04, 2008 6:55 pm

Spazzy McGee
you are incorrect, a plugin can not call any generic / command, it can only call the API functions defined in the API.

some of the flag commands are in the API.

User avatar
flying_popcorn
Private First Class
Private First Class
Posts: 88
Joined: Wed Dec 14, 2005 2:40 am
Contact:

Post by flying_popcorn » Fri Sep 05, 2008 4:49 am

Ok I just made one. It doesn't let you pick up any flags until there are 4 or more players.

Licence: GPLv3

Later i will add more things, like configuring it only to drop certain flags, sending a message to the player explaining why they dropped the flag, etc.
Attachments
noflags.cpp
(1.11 KiB) Downloaded 103 times

User avatar
Marines
Private First Class
Private First Class
Posts: 77
Joined: Sun Jan 13, 2008 6:03 pm
Location: Planet Mars Landing site 11828

Post by Marines » Fri Sep 05, 2008 8:11 pm

lol i think flying popcorn is the plugin master! :D
Poke Me And Die!

User avatar
optic delusion
Special Forces
Special Forces
Posts: 966
Joined: Sat Sep 25, 2004 2:29 pm
Location: Planet MoFo
Contact:

theme97

Post by optic delusion » Fri Sep 05, 2008 10:00 pm

nobody asked for it, but i'm gonna mention theme97's plugins.
he hasn't been seen for awhile, but this page still exists
There may be something you find intersting there... spawnByPlayerCount maybe...

http://theme.freehostia.com/bzflag/plugins
Take a look at my Defender game mode concept.

Thinking is not an automatic process. A man can choose to think or to let his mind stagnate, or he can choose actively to turn against his intelligence, to evade his knowledge, to subvert his reason. If he refuses to think, he courts disaster: he cannot with impunity reject his means of perceiving reality.

User avatar
Zehra
Private First Class
Private First Class
Posts: 440
Joined: Sun Oct 18, 2015 3:36 pm
Location: Arctic
Contact:

Re: Plugin Question.

Post by Zehra » Wed May 02, 2018 2:35 am

I updated flying_popcorn's plug-in and didn't want to start a new topic, so here it is.

Description: Prevents players from picking up flags, if there is less than 4 players.
Min Version: 2.4.2
Files: NoFlags
License: GPLv3

Only difference from flying_popcorn's work is the event used for it.
Instead of using bz_eFlagGrabbedEvent and removing the flag afterwards, bz_eAllowFlagGrab is used, which takes advantage of a newer feature available in the API.

-Zehra

p.s. Sorry for bumping such an old thread.
There's this game I love and it's called Ducati. ~Zehra
Those who are critical of me, I'll likely be the same of them. ~Zehra
There's always something to remember and it's been a game I love. ~Zehra
The time spent is a time which can never be regained, so it's a time to enjoy. ~Zehra
The decisions we make are the ones we look forward too and the ones we regret. ~Zehra
The details and the skill of knowing and applying them is what excellence is made of. ~Zehra
The best player is the one who knows what to do and when and applies it successfully. ~Zehra
There's a difference between knowing my name and knowing me, one shows respect to my name and the other is to who I am. ~Zehra
My blog is available at zehrahblog.wordpress.com.
See when I've last been active at Strayers.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest