[Tutorial] How to Make a Derby System With Commands | With ZCMD
#1

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 :

Code:
#endif

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.
Reply
#2

Easy, and Good work

Keep it up!
Reply
#3

Thanks ! If you Like it Rep'
Reply
#4

Quote:

*Avi for Writing the Whole Tutorial.

...? I gave you this script..
Reply
#5

not really a full derby script!
you dont explain what your doing,
and stop begging for rep!
Reply
#6

Quote:
Originally Posted by newbienoob
View Post
...? I gave you this script..
That's true, as you are a scripter on his server.
Reply
#7

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.
Reply
#8

JoB is Awesome! <---

YoU Are A Perfect Scripter!

Thx bro! for making this [tut]
Reply
#9

Seriously not a tutorial.
plus its not well explained. Explain each part how it work not

Hello here is the code

Blahblahblah

The end
Reply
#10

Quote:
Originally Posted by Avi57
View Post
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
View Post
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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)