[FilterScript] Race FS + Race Editor
#1

Automatic Race Filterscript + Race Editor



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
Reply


Messages In This Thread
Automatic Race FS + Race Editor - by Flovv - 07.02.2012, 20:24
Re: Race FS + Race Editor - by saringan_cs - 08.02.2012, 06:54
AW: Race FS + Race Editor - by Flovv - 08.02.2012, 15:24
Re: Race FS + Race Editor - by Ballu Miaa - 08.02.2012, 15:39
Re: Race FS + Race Editor - by Madd Kat - 08.02.2012, 20:56
AW: Race FS + Race Editor - by Flovv - 08.02.2012, 21:58
Re: Race FS + Race Editor - by Madd Kat - 08.02.2012, 22:12
Re: Race FS + Race Editor - by Aloushi - 09.02.2012, 14:12
AW: Race FS + Race Editor - by Flovv - 09.02.2012, 16:35
Re: Race FS + Race Editor - by LordSkiller - 12.02.2012, 10:50
AW: Race FS + Race Editor - by Flovv - 12.02.2012, 16:43
Re: Race FS + Race Editor - by Georgi166 - 12.02.2012, 17:26
Re: Race FS + Race Editor - by Zarky - 13.02.2012, 11:35
Re: Race FS + Race Editor - by LordSkiller - 14.02.2012, 10:24
Re: Race FS + Race Editor - by Yuryfury - 22.04.2012, 05:23
Re: Race FS + Race Editor - by StAsMaNn - 10.08.2012, 20:24
Re: Race FS + Race Editor - by Shetch - 11.08.2012, 01:22
Re: Race FS + Race Editor - by Soumi - 11.08.2012, 01:51
Re: Race FS + Race Editor - by HaiderABbas - 02.06.2013, 19:57
Re: Race FS + Race Editor - by RocketBoy - 29.01.2014, 07:02
Re: Race FS + Race Editor - by BlackEvils - 24.05.2014, 08:46
Re: Race FS + Race Editor - by Primard - 23.01.2015, 11:44
Re: Race FS + Race Editor - by CprYseeR - 23.01.2015, 12:26
Re: Race FS + Race Editor - by AgusZ - 23.01.2015, 13:18
Re: Race FS + Race Editor - by TheToretto - 16.07.2015, 12:11
Re: Race FS + Race Editor - by TenTen - 16.07.2015, 18:20
Re: Race FS + Race Editor - by BladeFire - 16.07.2015, 19:11
Re: Race FS + Race Editor - by SpikY_ - 16.07.2015, 20:36

Forum Jump:


Users browsing this thread: 1 Guest(s)