[FS] KRace -
[HiC]TheKiller - 25.02.2010
[FS] KRace
Info: Well, this is a race script. I made it a little while ago and decided to release it =]. It is a bit buggy so please post bugs so it can be fixed.
Scripting: It's a pretty shoddy script but it works :P. It comes with a race I made called around LS. To add checkpoints you must use this format:
pawn Код:
CreateRace(RaceName[], RaceTimeout/*Will fail a player if not finished in this time (Time in Seconds)*/, vehicle = -1/*Required vehicle to start the race! (Optional)*/)
For adding checkpoints (
THEY MUST BE IN THE ORDER OF THE RACE):
pawn Код:
AddRaceCheckpoint(RaceName[], Float:x, Float:y, Float:z)
I also made a little script to help you save checkpoints:
pawn Код:
#include <a_samp>
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(AddRaceCP, 9, cmdtext);
return 0;
}
dcmd_AddRaceCP(playerid, params[])
{
new string[120];
if(!strlen(params)) return SendClientMessage(playerid, 0x00D300AA, "/AddRaceCP [RaceName]");
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
format(string, sizeof(string), "AddRaceCheckpoint(\"%s\", %f, %f, %f);\r\n", params, X, Y, Z);
new File:Check = fopen("RaceCPS.txt", io_append);
fwrite(Check, string);
fclose(Check);
return 1;
}
You can also make your own command to start the race by doing this:
pawn Код:
dcmd_Startrace(playerid, params[])
{
if(!strval(params)) return //Player didn't type anything
if(/*Admin varaible here*/ == 0) return //Admin level not high enough
if(StartRace(params) == 0) return //The race name wasn't valid or there is currently a race running
if(StartRace(params) == 1) return //The race was started!
return 1;
}
Screenshots:
Download:
PWN + AMX
Pastebin
Re: [FS] KRace -
Jontay - 25.02.2010
Great work but a release for those who do not wish to use dcmd?
Re: [FS] KRace -
[HiC]TheKiller - 25.02.2010
Quote:
Originally Posted by Jonteh
Great work but a release for those who do not wish to use dcmd?
|
Do you mean just those commands or the whole script?
Re: [FS] KRace -
morris91 - 25.02.2010
I just made my own race using your script Killer. Its awesome. Well done on making this mate.
Re: [FS] KRace -
[HiC]TheKiller - 25.02.2010
Quote:
Originally Posted by morris91
I just made my own race using your script Killer. Its awesome. Well done on making this mate.
|
No problem =].
Re: [FS] KRace -
Jontay - 25.02.2010
Quote:
Originally Posted by [HiC
TheKiller ]
Quote:
Originally Posted by Jonteh
Great work but a release for those who do not wish to use dcmd?
|
Do you mean just those commands or the whole script?
|
The whole script.
Re: [FS] KRace - [03]Garsino - 25.02.2010
Nice
Re: [FS] KRace -
»»»Hakam - 25.02.2010
Any screenshots?
~Hakam.
Re: [FS] KRace -
AiVAMAN - 25.02.2010
Quote:
Originally Posted by »»» Hakam «««
Any screenshots?
~Hakam.
|
I don't think screenshots are needed for this. :/
P.S. Great work.
Re: [FS] KRace -
[HiC]TheKiller - 25.02.2010
Quote:
Originally Posted by Jonteh
Quote:
Originally Posted by [HiC
TheKiller ]
Quote:
Originally Posted by Jonteh
Great work but a release for those who do not wish to use dcmd?
|
Do you mean just those commands or the whole script?
|
The whole script.
|
Um, the script isn't even in DCMD.
Quote:
Originally Posted by [03
Garsino ]
Nice 
|
Thx.
Quote:
Originally Posted by »»» Hakam «««
Any screenshots?
~Hakam.
|
Posting them now.
Re: [FS] KRace -
DiddyBop - 26.02.2010
~Waits for foxy to stroll on by~
Oh, on topic. Nice release :P
Re: [FS] KRace -
[MWR]Blood - 19.03.2010
Nice job, just what I needed!Thx!
Re: [FS] KRace -
GunFight - 19.03.2010
nice work
Re: [FS] KRace -
Lorenc_ - 06.04.2010
i'll use this
Re: [FS] KRace -
MrEnd - 07.04.2010
i think i gone put this in my server ^^
Re: [FS] KRace -
Cardinaal - 15.04.2010
Sorry for asking this silly question, but how do I start the race?
I have tried /startrace but it doesn't work.
Re: [FS] KRace -
Adil - 15.04.2010
Nice one, i like the name of the FS.
Re: [FS] KRace -
Cardinaal - 15.04.2010
Can you please tell me the command to start the race?
Re: [FS] KRace -
[MWR]Blood - 15.04.2010
Quote:
Originally Posted by Cardinaal
Can you please tell me the command to start the race?
|
There's no command to start a race, it starts automatically in every 75 seconds.
Re: [FS] KRace -
Cardinaal - 15.04.2010
I have a problem.
When I join the race there are no cars.
And when I join my cars do not teleport with me.
I have a /carmenu script and when I spawn a vehicle, nothing appears.-
Help?