07.02.2012, 20:24
(
Последний раз редактировалось Flovv; 09.02.2012 в 16:31.
Причина: bugfix
)
Automatic Race Filterscript + Race Editor
Features
Requirements
In order to use this fs you will need:
-at least samp 0.3c
-Streamer Plugin by Incognito
-sscanf 2.5 Plugin by ******
Commands
/start race
will show you the race selection
/start race
is also used to actually begin the race
/race
is used to join a race
/race editor
will start the race editor
/race settings
will show the race settings dialog.
Here you can set autostart on/off, define an autostart time, define an autoend time, define the time to join a race before it starts, and some more selfexplaining settings
/end race
will abort a race and kick all players that joined out of the race
/end redit
will close the race editor during race creation process (closes automatically after succesful race creation)
/exit
is used to exit a race
/reload races
reloads the races files (e.g. when you put some new racefiles in that folder)
Video
http://*********/1tjjFv7LgK8
Future Plans
Known Bugs
i hope i fixed them all
but if you find one, please post it in this thread
History
Download & Install
In order to use this filterscript you will need to:
-add streamer plugin by Incognito to your server (link above in the requirements section)
-add sscanf2 plugin by ****** to your server (link above in the requirements section)
-compile the fs_race.pwn (only if you want to make changes in the script)
-put the fs_race.amx in your filterscripts folder
-create a subfolder called "races" in your /scriptfiles folder
-if you want to, put the race00.txt in the races folder to have a first race to look at
-add fs_race to the filterscripts being loaded in your server.cfg
These links will always provide the latest version of the filterscript.
Pastebin
Mediafire (precompiled FS with 50 races max. and 200 checkpoints per race max.)
contains:
fs_race.pwn (62KB)
fs_race.amx (181KB)
race00.txt (2KB)
For those who compile themselfes
This is the part where you can customize the script to your needs.
The most interesting point here would be the PlayerIsAdmin(playerid) part i guess.
As commented, just insert your method of checking if the player is an admin here.
Make sure to include everything you need to do so at the top of the script and there shouldn't be any problem.
At our server we use a mysql query to check if a player is an admin but i replaced it here with the IsPlayerAdmin
so it fits for everyone.
If you don't change this only RCON Admins will be able to start races, use the race editor and change the race settings.
Credits
Incognito for his Streamer Plugin
****** for his sscanf2 Plugin
Feel free to edit to your personal needs and redistribute, as long as you give me credit for this
If you notice any bugs, or got suggestions just tell me here
Features
- up to 50 races (precompiled version, as many as you want if you compile yourself)
- up to 200 checkpoints per race (precompiled version, as many as you want if you compile yourself)
- autostart races (no admin needs to be online)
- 8 different types of vehicle classes for each race
- ingame race editor (simple checkpoint placement without commands)
- race file system (exchange races with friends/other servers)
Requirements
In order to use this fs you will need:
-at least samp 0.3c
-Streamer Plugin by Incognito
-sscanf 2.5 Plugin by ******
Commands
/start race
will show you the race selection
/start race
is also used to actually begin the race
/race
is used to join a race
/race editor
will start the race editor
/race settings
will show the race settings dialog.
Here you can set autostart on/off, define an autostart time, define an autoend time, define the time to join a race before it starts, and some more selfexplaining settings
/end race
will abort a race and kick all players that joined out of the race
/end redit
will close the race editor during race creation process (closes automatically after succesful race creation)
/exit
is used to exit a race
/reload races
reloads the races files (e.g. when you put some new racefiles in that folder)
Video
http://*********/1tjjFv7LgK8
Future Plans
- Advanced race editor (edit race settings/checkpoints of an existing race)
- New kart/mower/golfkart vehicle class
- Kart track editor
- Different race modes (knockout, destruction derby, chase)
- Entry fee (maybe general or specific for every race)
Known Bugs
i hope i fixed them all
but if you find one, please post it in this thread
History
- v 1.0 - first FS Version
- v 1.1 - small bugfixes, command to end the raceeditor was changed to /end redit
Download & Install
In order to use this filterscript you will need to:
-add streamer plugin by Incognito to your server (link above in the requirements section)
-add sscanf2 plugin by ****** to your server (link above in the requirements section)
-compile the fs_race.pwn (only if you want to make changes in the script)
-put the fs_race.amx in your filterscripts folder
-create a subfolder called "races" in your /scriptfiles folder
-if you want to, put the race00.txt in the races folder to have a first race to look at
-add fs_race to the filterscripts being loaded in your server.cfg
These links will always provide the latest version of the filterscript.
Pastebin
Mediafire (precompiled FS with 50 races max. and 200 checkpoints per race max.)
contains:
fs_race.pwn (62KB)
fs_race.amx (181KB)
race00.txt (2KB)
For those who compile themselfes
This is the part where you can customize the script to your needs.
The most interesting point here would be the PlayerIsAdmin(playerid) part i guess.
As commented, just insert your method of checking if the player is an admin here.
Make sure to include everything you need to do so at the top of the script and there shouldn't be any problem.
At our server we use a mysql query to check if a player is an admin but i replaced it here with the IsPlayerAdmin
so it fits for everyone.
If you don't change this only RCON Admins will be able to start races, use the race editor and change the race settings.
pawn Код:
//********************************************************************
/////////////////////////////// SETTINGS /////////////////////////////
//********************************************************************
//use this to increase performance if your server has less than 500 slots or change it if your server has more than 500 slots
#undef MAX_PLAYERS
#define MAX_PLAYERS 500 //set to your max number of players
//set the maximum number of races/checkpoints to be loaded
#define MAX_RACES 50 //max number of races
#define MAX_CPS 201 //max number of checkpoints in a race
//use this function for whatever method you use to determine if a player is admin (just make sure to return true if player is admin or false if not)
PlayerIsAdmin(playerid)
{
if(IsPlayerAdmin(playerid) == 1) return true;
else return false;
}
//******************************************************************
////////////////////////// SETTINGS END ////////////////////////////
//******************************************************************
Credits
Incognito for his Streamer Plugin
****** for his sscanf2 Plugin
Feel free to edit to your personal needs and redistribute, as long as you give me credit for this
If you notice any bugs, or got suggestions just tell me here