SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts

Reply
 
Thread Tools Display Modes
Old 24/04/2010, 11:04 AM   #1
RyDeR`
High-roller
 
RyDeR`'s Avatar
 
Join Date: Feb 2009
Location: Belgium
Posts: 2,929
Reputation: 700
Default [FS] rRace v0.2a ~ RyDeR`s Race System [26/04/2010] [v0.2a]

Info
v0.2a
  • Worktime on v0.2 is 2 hours spread over 2 days.
  • Script: 1193 lines
  • Script size: 39.1 KB
v0.1a
  • Worktime 5 hours spread over 3 days.
  • Script: 1016 lines
  • Script size: 31.3 KB

Features
Added/Fixed in v0.2a
  • Major bugs are fixed!
  • Racing in other worlds added (you can enable/disable with uncomment/commenting the define)
  • New commands added:
- /startautorace: This will enable that the script starts automaticly a race after the previous one is done!
- /stopautorace: This will disable the process above.
- /exitrace: To exit the race safely.
  • Best Race Times added (Top 5 best time laps; You will see a message when the record is broken).
  • Crash while creating a race is fixed.
  • 2 More races added; named: NRG and BMX
  • Etc..
pawn Code:
/*
    Release:
        Race System Filterscript

    Author:
        RyDeR
       
    Last Update:
        26/04/2010
       
    ChangeLog:
        v0.1a:
                - Initial release
               
            v0.2a:
              - Major Bugs fixed!
              - Racing in other worlds added (enable/disbable with uncomment/comment-ing the define)
              - New Commands added:
                        - /startautorace: You can enable that the script starts automaticly a race after the previous one is done.
                        - /stopautorace: You can disable the command above.
                        - /exitrace: To exit the race safely
                - Best Race Times added (Top 5 best time laps; You will see a message when the record is broken).
                - Crash while creating a race is fixed.
                - Etc..
               
    Bugs:
        No bugs
       
    Version:
            v0.2a

    Functions:
            IsPlayerInRace(playerid);  >> UseFull in stunt servers to disable speedhack, nitro etc. while racing.

    Credits:
            Joker: He knows why ;)
            Joe Torran C, ModrLicC: For testing.
            DracoBlue: 'Dini' include.
        ******: 'IsOdd' function.
        Seif_: 'function' function.
        ZeeX: 'zcmd' include.
            Switch: InRace Position function.
*/
+ Features from v0.1a
  • Race Builder Included. This means you can create a race and directly race on it (more info below). Also they will save in scriptfiles under rRaceSystem/RaceName.RRACE
  • You can create 2 types of races: Air Race or Normal Race
  • 2 races made by me are included. (FagRace and LVAirRace)
  • Racers will automaticly go sequentially in a row.
  • If the playerid is even they will sort in the first position (mostly left side of the road). Otherwise if it's Odd they will sort in the right side of the road (Note: depends what you take while creating the race)
  • It has a textdraws which show you the following things for each player(Also see pictures):
- Name
- How much checkpoints to go
- Race Time (How much time left before race ending)
- Race Position (e.g. like 1 / 10 st. This means you are first between those 10 racers)

  • There are 4 commands:
- /startrace [racename] ~ By using this command you can start a race you have created. (e.g. /startrace FagRace)
- /stoprace ~ To stop to the race that's currently busy.
- /joinrace ~ This command is for the players. If they write it they will join the race.
- /buildrace ~ With this command you can build a new race. It's easy in just 4 steps with dialogs.

  • You can change this race time by changing the define below(default setted to 5 minutes = 300 seconds).
    • pawn Code:
      #define MAX_RACE_TIME \
          300
  • Time till race start is setted to 30 seconds; you can change this by changing this define in the script:
    • pawn Code:
      #define COUNT_DOWN_TILL_RACE_START \
          30
  • You can change the Checkpoint Size by changing the define below in the script
    • pawn Code:
      #define RACE_CHECKPOINT_SIZE \
          12.0
  • If all players reach the finish the race will end automaticly. If there someone dies or left no problem, it will no bug. If someone don't reach the finish also no problem. The racetime keeps counting down. Till ending race.
  • One function:
- IsPlayerInRace(playerid); >> This function can be usefull in servers where are nitro cmd's or speedhack keys etc. To disable them while racing
  • There are a lot of nice things but I can't remember, just download and use it

How can I build a race?
Well it's not difficult. It's easy and fast.
1) Type: /buildrace (you must be a rcon admin) and a dialog will appear which asks you what kinda race it is. (Air Race, or a normal race) and Click next.
2) A dialog will appear which asks you to give the name of the race. Click next to continue.
3) A dialog will appear which ask you the name/id of the vehicle that's going to be used while racing. (e.g. Tourismo, or 451)
4) You're almost done now. If you click OK you are free. And you have to take 2 positions where the racers should stand. (Left side of the road and right side). With Key Fire you can set the positions.
5) After this there will appear automaticly another dialogs which asks you to set the checkpoints. Press OK and use Key_Fire to set the checkpoints. Press ENTER when you're done.
6) A dialog will appear which tells you that the race is created. All you have to do is /startrace 'RaceNameYouCreatedHere'.


VERY IMPORTANT FOR UPDATING TO 0.2a:
Quote:
Originally Posted by README
************************************************** ***********
- Delete the old version of the script or replace it.
- Use the new rRaceSystem directory in scriptfiles because there's a new file added.
************************************************** ***********
************************************************** ***********
NOTE: If you created races you have to add at the end of them (under TotalCP), otherwise it will bug and you can't break a record.: >>
BestRacerTime_0=0
BestRacer_0=noone
BestRacerTime_1=0
BestRacer_1=noone
BestRacerTime_2=0
BestRacer_2=noone
BestRacerTime_3=0
BestRacer_3=noone
BestRacerTime_4=0
BestRacer_4=noone
BestRacerTime_4=0
************************************************** ***********
NOTE2: Also if you have created races again you have to update RaceNames in scriptfiles/rRaceSystem/RaceNames:
Currently you will see this: >>

TotalRaces=4
Race_0=FagRace
Race_1=LVAirRace
Race_2=BMX
Race_3=NRG

If you created for example a race named "mountainrace"
You should +1 and write the name near it the value of race and change TotalRaces to 5 (Count!!). Like: >>

TotalRaces=5
Race_0=FagRace
Race_1=LVAirRace
Race_2=BMX
Race_3=NRG
Race_4=mountainrace

If you create a race from now on it will automaticly change RaceNames.txt; it's only for the races you created before and will add also the best racer times; so don't worry.
************************************************** ***********

And for the rest Enjoy


RyDeR
Some pictures + Info
v0.2a

Here I broke a new record (my own record lol xD)


Waiting till "NRG" starts.


Taking those CP's

+ Pictures from v0.1a (almost same in sight)
Air Race: >> (This is LVAirRace btw.)

Here I'm waiting till the race starts.


The race started, I'm going to take those checkpoints.


Same..

Normal Race: >> (This is FagRace btw.)

Here I'm waiting till race starts.


The race started, I'm going to take those checkpoints


I'm near the finish..


I'm 'first' place.
In 2 minutes 10 seconds and 623 ms.
I won $11870 and + 10 score.

Download

// v0.2a:
>> Mirror: SolidFiles || Version: v0.2a - RECOMMENDED! || Uploaded by me

Quote:
Originally Posted by XRVX
Mirrors for v0.2a
// Deleted. Reason: Changed something in download link.
XRVX: You don't have to reupload anymore, I think MultiUpload is more of enough but thanks =)
// v0.1a: OLD
>> Mirror: SolidFiles || Version: v0.1a - Not Recommended! Old ..|| Uploaded by me

Mirror's
Not anymore please ..

Suggestions?
If you have any suggestions/ideas I can add to this to upgrade; please tell me.

Bugs
There were bugs in v0.1a, but I think they're fixed now (in v0.2a).

Specially thanks to:
- ♣ Joker ♠ - He knows why
- Joe Torran C and Modrlicc - For testing
- DracoBlue - For his 'dini' include. (Included in the download packet)
- ****** - 'IsOdd' function.
- Seif_ - For his 'function' macros.
- ZeeX - For his 'ZCMD' include. (you can find here http://forum.sa-mp.com/index.php?topic=116240.0)
- switch - In Race Position function from his GM.

Importane Note:
If you got those errors below you have to use the dini in the download packet.
Code:
C:\---\---\---\filterscripts\rRace.pwn(39) : error 017: undefined symbol "ret_memcpy"
C:\---\---\---\filterscripts\rRace.pwn(525) : error 017: undefined symbol "isNumeric"
Pawn compiler 3.2.3664      Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.

Have fun
__________________

Sup?

Last edited by RyDeR`; 13/07/2010 at 11:26 AM.
RyDeR` is offline   Reply With Quote
Old 24/04/2010, 11:08 AM   #2
rbN.
Banned
 
Join Date: Jan 2010
Location: fissa
Posts: 1,079
Reputation: 289
Default Re: [FS] rRace v0.1a ~ RyDeR`s Race System

You automaticly start on the starting point, right?
Gonna use this I think ,

EDIT:
Maybe for next update auto start race every 15 min or something? Should be much easier, if you wanna race but no admin = on.

O what I really like is that you need to wait 3 sec on the end . Like, then you think. Lets go fast, I gonna win, and then you need to wait 3 sec on it and then you fall off a cliff XD.

Hm.. Epic =D>_<
rbN. is offline   Reply With Quote
Old 24/04/2010, 11:11 AM   #3
[03]Garsino
Guest
 
Posts: n/a
Default Re: [FS] rRace v0.1a ~ RyDeR`s Race System

Nice work
  Reply With Quote
Old 24/04/2010, 11:14 AM   #4
RyDeR`
High-roller
 
RyDeR`'s Avatar
 
Join Date: Feb 2009
Location: Belgium
Posts: 2,929
Reputation: 700
Default Re: [FS] rRace v0.1a ~ RyDeR`s Race System

Quote:
Originally Posted by RobinOwnz
You automaticly start on the starting point, right?
Gonna use this I think ,

EDIT:
Maybe for next update auto start race every 15 min or something? Should be much easier, if you wanna race but no admin = on.

O what I really like is that you need to wait 3 sec on the end . Like, then you think. Lets go fast, I gonna win, and then you need to wait 3 sec on it and then you fall off a cliff XD.

Hm.. Epic =D>_<
Yeah, it gives eveyone automaticly a place nice on the road.
And thanks nice idea; I write it in notepad.

Quote:
Originally Posted by [03
Garsino ]
Nice work
Thanks =)
__________________

Sup?
RyDeR` is offline   Reply With Quote
Old 24/04/2010, 11:22 AM   #5
Hip-hop
Big Clucker
 
Join Date: Jun 2009
Posts: 138
Reputation: 29
Default Re: [FS] rRace v0.1a ~ RyDeR`s Race System

Good Work !
__________________

Hip-hop is offline   Reply With Quote
Old 24/04/2010, 11:31 AM   #6
Karlip
High-roller
 
Join Date: Oct 2007
Location: Click To Show
Posts: 1,479
Reputation: 102
Default Re: [FS] rRace v0.1a ~ RyDeR`s Race System

Hot FS, i might even use this.
__________________
Karlip is offline   Reply With Quote
Old 24/04/2010, 11:34 AM   #7
RyDeR`
High-roller
 
RyDeR`'s Avatar
 
Join Date: Feb 2009
Location: Belgium
Posts: 2,929
Reputation: 700
Default Re: [FS] rRace v0.1a ~ RyDeR`s Race System

Quote:
Originally Posted by Karlip
Hot FS, i might even use this.
Hahaha do you mean that 'skin' on the pic is hot ?
joke, thanks
_________________________________________________
Quote:
Originally Posted by Hip-hop
Good Work !
Thanks man =)
__________________

Sup?
RyDeR` is offline   Reply With Quote
Old 24/04/2010, 11:46 AM   #8
[Mr]Fred
Big Clucker
 
Join Date: Feb 2010
Posts: 79
Reputation: 0
Default Re: [FS] rRace v0.1a ~ RyDeR`s Race System

Cool, GOOD WORK!
[Mr]Fred is offline   Reply With Quote
Old 24/04/2010, 11:52 AM   #9
Modrlicc
Little Clucker
 
Join Date: Dec 2009
Posts: 21
Reputation: 12
Default Re: [FS] rRace v0.1a ~ RyDeR`s Race System

It's Testing*

And Well done Bro.
Modrlicc is offline   Reply With Quote
Old 24/04/2010, 12:11 PM   #10
Ibanez
Big Clucker
 
Join Date: Mar 2009
Posts: 122
Reputation: 1
Default Re: [FS] rRace v0.1a ~ RyDeR`s Race System

Epic, great work once again
__________________
ShoServers.tk
ShoServers is a new community, with a unique script under development!
Ibanez is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[FilterScript] [FS] RyDeR' Speedometer v2.0 RyDeR` Filterscripts 182 04/09/2016 06:28 AM
[NEED] have enybody a race system? jordylol6 Help Archive 4 18/03/2011 08:36 PM
[FilterScript] [FS] Advance Duel System [1.0, 24.03.2010] Riaz Filterscripts 10 30/07/2010 05:02 PM
race system RenisiL Help Archive 4 16/12/2009 04:29 PM


All times are GMT. The time now is 11:48 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.