[Tutorial] Create "Movable" Gates
#2

Epilogue:

Hey everyone, I showed you guys how to create gates in the post above
In case you are wondering what is in this epilogue, is some variations you can do to the gates above
I'll show you different ways to do it for different results, you just pick the one you want
In this tutorial I will be using Zeex's include zcmd


Content Table:
  • Exclusive to a faction/team
  • Exclusive to any vehicle
  • Exclusive to a specific vehicle
  • Exclusive to a specific score
¤ Exclusive to a faction/team:

Well, what you want to do here is to add the following line:
pawn Code:
// Command depending on the type of gate
if(IsPlayerInRangeOfPoint(playerid, 15.0, XYZ_Closed)) //If player is in range of the gate..
    {
        if(PlayerInfo[playerid][pFaccion] == x) //If player belongs to faction "x" - Change for your team/faction variable -..
        {
            //Rest of code
        }
    }
return 1;
}
¤ Exclusive to any vehicle:

Well, what you want to do here is to add the following line:
pawn Code:
// Command depending on the type of gate
if(IsPlayerInRangeOfPoint(playerid, 15.0, XYZ_Closed)) //If player is in range of the gate..
    {
        if(IsPlayerInAnyVehicle(playerid)) //If player is in any vehicle..
        {
            //Rest of code
        }
    }
return 1;
}
¤ Exclusive to a specific vehicle:

Well, what you want to do here is to add the following line:
pawn Code:
// Command depending on the type of gate
if(IsPlayerInRangeOfPoint(playerid, 15.0, XYZ_Closed)) //If player is in range of the gate..
    {
        if(IsPlayerInVehicle(playerid, x)) //If the player is in vehicle "x" - Change x for the vehicle id -..
        {
            //Rest of code
        }
    }
return 1;
}
¤ Exclusive to a specific score:

Well, what you want to do here is to add the following line:
pawn Code:
// Command depending on the type of gate
if(IsPlayerInRangeOfPoint(playerid, 15.0, XYZ_Closed)) //Si esta en rango de la puerta..
    {
        if(GetPlayerScore(playerid) >= x) //If player has a bigger or equal value of "x" score - Change x for the score -..
        {
            //Rest of code
        }
    }
return 1;
}
Reply


Messages In This Thread
Create "Movable" Gates - by redneckvideogamer - 22.02.2014, 19:55
Re: Create "Movable" Gates - by redneckvideogamer - 22.02.2014, 19:57
Re: Create "Movable" Gates - by AlonzoTorres - 22.02.2014, 20:12
Re: Create "Movable" Gates - by redneckvideogamer - 22.02.2014, 20:18

Forum Jump:


Users browsing this thread: 1 Guest(s)