How to Make a Derby System With Commands | With ZCMD -
Avi57 - 08.07.2012
Making a Derby System With Commands
Hello,
In This tutorial i will Tell You How to Make a Derby System With Commands ! With zcmd include.
You can get it Here : Zcmd.inc
First of all, lets me tell you what includes i gonna use, Just add these in the top most section of your gamemode or filterscript:
Code:
#include <a_samp>
#include <zcmd>
now you have to add the variables which defines several functions:
These variables are usefull for script functioning. Remember /*x, y, z, facingAnlge*/ By Your Cordinates
Code:
new InDerby[MAX_PLAYERS]; // at the top
new Float:derbyspawns[][] = // at the top
{
{/*x, y, z, facingAnlge*/},
{/*x, y, z, facingAnlge*/},
{/*x, y, z, facingAnlge*/},
{/*x, y, z, facingAnlge*/},
{/*x, y, z, facingAnlge*/}
};
Now We Need to Make our Script Colorful, So Some Color we will Define ! Make Sure Place them Under 'new' variables !
Code:
#define COLOR_RED 0xAA3333AA
#define COLOR_GREEN 0x33AA33AA
Now We Move on to Our Commands ! i used zcmd for these Commands Hope You Have Also Downloaded It !
First Command to Enter Derby !
Code:
CMD:derby(playerid,params[])
{
if(InDerby[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"You are already in derby. Type /leave to exit derby dm");
new rand = random(sizeof(derbyspawns));
new veh = CreateVehicle(451,derbyspawns[rand][0],derbyspawns[rand][1],derbyspawns[rand][2],derbyspawns[rand][3],-1,-1,-1);
PutPlayerInVehicle(playerid,veh,0);
InDerby[playerid] = 1;
return 1;
}
Now Our second Command, thats To leave the Derby !
Code:
CMD:leave(playerid,params[])
{
if(InDerby[playerid] == 0) return SendClientMessage(playerid,COLOR_GREEN,"You are not in derby!");
InDerby[playerid] = 0;
SetPlayerHealth(playerid,0);
return 1;
}
Now at the End, add this :
You Are Now Done with the Derby Script !
the Full Script is : Pastebin
Credits:
*Avi for Writing the Whole Tutorial.
*Zeex For his zcmd
Enjoy !
Add me some reputation (REP+) if i helped you.
Re: How to Make a Derby System With Commands | With ZCMD - Jarnu - 08.07.2012
Easy, and Good work
Keep it up!
Re: How to Make a Derby System With Commands | With ZCMD -
Avi57 - 08.07.2012
Thanks ! If you Like it Rep'
Re: How to Make a Derby System With Commands | With ZCMD -
newbienoob - 08.07.2012
Quote:
*Avi for Writing the Whole Tutorial.
|
...? I gave you this script..
Re: How to Make a Derby System With Commands | With ZCMD -
Jonny5 - 08.07.2012
not really a full derby script!
you dont explain what your doing,
and stop begging for rep!
Re: How to Make a Derby System With Commands | With ZCMD -
zombieking - 08.07.2012
Quote:
Originally Posted by newbienoob
...? I gave you this script..
|
That's true, as you are a scripter on his server.
Re: How to Make a Derby System With Commands | With ZCMD -
[DOG]irinel1996 - 10.07.2012
Why
#endif at the end if you didn't open any condition.

It's not really a full system, also, you should check if there is any vehicle where you're going to create the new one.
Thank you for sharing this.
Re: How to Make a Derby System With Commands | With ZCMD -
MoNeY_Co0oLzZz - 22.07.2012
JoB is Awesome! <---
YoU Are A Perfect Scripter!
Thx bro! for making this [tut]
Re: How to Make a Derby System With Commands | With ZCMD -
JaKe Elite - 22.07.2012
Seriously not a tutorial.
plus its not well explained. Explain each part how it work not
Hello here is the code
Blahblahblah
The end
Re: How to Make a Derby System With Commands | With ZCMD -
Kaperstone - 22.07.2012
Quote:
Originally Posted by Avi57
First of all, lets me tell you what includes i gonna use, Just add these in the top most section of your gamemode or filterscript:
|
"I gonna use" ? reminds me cooking channel.
Quote:
Originally Posted by Avi57
In This tutorial i will Tell You How to Make a Derby System With Commands ! With zcmd include.
|
Nothing was explaned as well.
you've just shown the script,means its not a tutorial.