Flag give

Expand and mod your server.
Post Reply
User avatar
hookah
Private First Class
Private First Class
Posts: 148
Joined: Mon Nov 14, 2005 1:03 pm

Flag give

Post by hookah »

Where i can get plugin what automaticaly gives Laser flag for all who spawn's? I Use mac:) And i have seen some plugins already. but dont remember where :)
User avatar
macsforme
General
General
Posts: 2069
Joined: Wed Mar 01, 2006 5:43 am

Post by macsforme »

Mac .so build and source code file attached.

Syntax is:

Code: Select all

/loadplugin (or -loadplugin) /path/to/plugin/flagOnSpawn.so,<flag>:<team>
"Team" can be -1 (all teams); 0, rogues; 1, red; 2, green; 3, blue; or 4, purple (I think that I got blue and purple in the right order). "Flag" can be any flag available on the map. For your purposes, then, you would want to use:

Code: Select all

 /loadplugin (or -loadplugin) /path/to/plugin/flagonSpawn.so,L:-1
Make sense?

I intend to release this plugin officially after I improve it somewhat, like having support for up to 5 different flag/team combinations. Other than that, I think it works great. I have one running on my own server at gnurdux.homelinux.net:5170.
Attachments
flagOnSpawn.cpp.txt
(7.62 KiB) Downloaded 450 times
flagOnSpawn.so.zip
PPC Mac .so build of the flagOnSpawn plugin
(15.71 KiB) Downloaded 412 times
User avatar
hookah
Private First Class
Private First Class
Posts: 148
Joined: Mon Nov 14, 2005 1:03 pm

Post by hookah »

oh i need help!
How do i compile source to do so that it gave L but not WG ? :)
I am bad at this and how do i make source into .so file?
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 »

{janis} wrote:oh i need help!
How do i compile source to do so that it gave L but not WG ? :)
I am bad at this and how do i make source into .so file?
You don't need to compile anything. Constitution gave you a fully working Mac OS X build of the plugin. Just download flagOnSpawn.so.zip and unzip it. Then load it like any other plugin, except load it with these options:

Code: Select all

-loadplugin /path/to/plugin/flagOnSpawn.so,WG:-1
That would give every team WG on spawn.

For example, to give green team a L flag on spawn do:

Code: Select all

-loadplugin /path/to/plugin/flagOnSpawn.so,L:2
I'm presuming, as with other plugins, that it's not a good idea to load two at once since (obviously) they would interfere or even crash the server.
Image
Owner @ BZFX
Core Admin @ CAN

Email me: bzmet…@gmail.com
User avatar
macsforme
General
General
Posts: 2069
Joined: Wed Mar 01, 2006 5:43 am

Post by macsforme »

Yeah, loading two instances of the plugin at once will probably not work (it doesn't work on Linux, at least). I am working on updating the plugin to allow for multiple team/flag assignments, but that hasn't happened yet. When it does happen, it will work something like this:

Code: Select all

-loadplugin /path/to/flagOnSpawn.so,SB:0:L:1:WG:2:GM:3:SW:4
That will make the rogues get SBs, the red team get lasers, the green team get wings, and so on.
User avatar
hookah
Private First Class
Private First Class
Posts: 148
Joined: Mon Nov 14, 2005 1:03 pm

Post by hookah »

thanks but how i understood numbers are teams :)
it works now :)
User avatar
macsforme
General
General
Posts: 2069
Joined: Wed Mar 01, 2006 5:43 am

Post by macsforme »

Note: This plugin has now been officially released at http://my.bzflag.org/bb/viewtopic.php?p=92643
Post Reply