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 »

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 »

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 »

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: 1405
Joined: Mon Mar 21, 2005 4:59 pm
Location: Planet MoFo, Sheffield Division; United Kingdom

Post by Spazzy McGee »

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: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post by JeffM »

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.
ImageJeffM
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 »

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 260 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 »

lol i think flying popcorn is the plugin master! :D
Poke Me And Die!
User avatar
optic delusion
Special Forces
Special Forces
Posts: 1054
Joined: Sat Sep 25, 2004 2:29 pm
Location: Planet MoFo
Contact:

theme97

Post by optic delusion »

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: 919
Joined: Sun Oct 18, 2015 3:36 pm
Location: Within the BZFS API and Beyond it
Contact:

Re: Plugin Question.

Post by Zehra »

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.
Those who are critical of me, I'll likely be the same of them. ~Zehra
The decisions we make are the ones we look forward too and the ones we regret. ~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

See where I've last been active at Strayers.
Visit BZList.net for a modern HTML5 server stats site.

Click here to view the 101 Leaderboard & Score Summaries Last updated 2021-01-12 (YYYY-MM-DD)
Latest 101 thread
Post Reply