Tutorial Request
#1

Can someone make a tutorial on how to create a [TAG] system? for example, script a private vehicle for a faction. or a /makeleader command for rcon admins. And /makeofficial command for the faction leader.
Reply
#2

i need this too
Reply
#3

Making a vehicle faction only is quite easy once you have an account system.

All it is, once you have an account system with factions, you check for the vehicle id when aplayer enters the car then check to if the car is for a faction it will then check the players account and if his faction id = car faction id he can use it otherwise he gets kicked.
Reply
#4

Well, can you give me the code?
Reply
#5

Makeleader for only Rcon Admins is easy , we will just replace simple things :

PHP код:
if(IsPlayerAdmin(playerid)) //This will check if you are logged with Rcon Password or no 
So if we are saying that this is your command :

PHP код:
CMD:makeleader(playeridparams[]) //Example of Makeleader Command
{
    if (
PlayerInfo[playerid][pAdmin] >= 1337//That's just an example
    

We will replace
PHP код:
if (PlayerInfo[playerid][pAdmin] >= 1337
with our function which
PHP код:
if(IsPlayerAdmin(playerid)) 
So our code will be :

PHP код:
CMD:makeleader(playeridparams[])
{
    if(
IsPlayerAdmin(playerid))
    { 
Now lets go to the /makeofficial command for the faction leader , I didin't get the point but if you mean only faction leader command so we will make this :

PHP код:
if (PlayerInfo[playerid][pLeader] >= 1//1 is just an example for the Faction Number you can always change it. 
So for example if you want to make a command only Faction Leader can use it , you will have to add that function like that :

PHP код:
CMD:makeoffical(playeridparams[]) //Normal Command just an example
{
    if (
PlayerInfo[playerid][pLeader] >= 1//The function which checks the player a leader or not , 1 is the faction id you can always change it.
    

I hope that this helped , if you need any other help feel free to ask.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)