PD gates.
#1

How would i be able to add a Police gate to the pd thing, to stop people getting in, and how would i create a command for only Police to use, and where in the script would i put it all? Thank-you for all your help, i know i'm probably getting annoying with all this, but, again, thanks.
Reply
#2

Bump. please answer?
Reply
#3

Please read the rules!

Quote:
b) Do not bump
Some people apparently think they are important enough to bump their own topic after 10 minutes.
You can bump topics when the last reply is at least 48 hours old, and it needs to have useful information about your problem.

Anyways, You'll need to create your gates. Use MTA SA to put them where you want.
Than you'll need to get the coordinates of opened gates.

Than you need to define teams like new TeamPolice = 5

And then....

pawn Код:
//Please note that this is only an example none of this codes will work.
if( is player in that team )
{
    move object
    settimer or something else
}
This I explained everything very quickly 'cause you didn't even created the gates so your still at zero with this.
When you create that all I will be glad to help you out with that.
Reply
#4

Quote:
Originally Posted by Alex_Valde
Посмотреть сообщение
Please read the rules!



Anyways, You'll need to create your gates. Use MTA SA to put them where you want.
Than you'll need to get the coordinates of opened gates.

Than you need to define teams like new TeamPolice = 5

And then....

pawn Код:
//Please note that this is only an example none of this codes will work.
if( is player in that team )
{
    move object
    settimer or something else
}
This I explained everything very quickly 'cause you didn't even created the gates so your still at zero with this.
When you create that all I will be glad to help you out with that.
Sorry for bumping , So if i create the gates? Would you please help me? As i have no clue as to what to do.
Thanks.
Reply
#5

You can use MTA Editor to create the gates and after save the maps, you just convert to Pawn code and put in your GM/FS.


About the commands, you can create a variable to be used by some players:


pawn Код:
new IsAPoliceMan[MAX_PLAYERS];//It is equal to 0.

pawn Код:
if (strcmp("/police1", cmdtext, true, 6) == 0)
    {
        IsAPoliceMan[playerid] = 1;//The variable is now equal to 1 for the command user
        return 1;
    }
and:

pawn Код:
if(strcmp("/cop", cmdtext, true, 10) == 0)
    {
        if(IsAPoliceMan[playerid] == 1)//It checks the level of the variable is 1 for the command user
        {
            SendClientMessage(playerid, 0xFFFFFFAA, "You are a police officer!");
        }
        return 1;
    }

I hope i have helped
Reply
#6

Sure I'll help you out.

Just please create gates where you want and have their coordinates, and also when they are open.

Those two are main in that code.
Reply
#7

Quote:
Originally Posted by rjjj
Посмотреть сообщение
You can use MTA Editor to create the gates and after save the maps, you just convert to Pawn code and put in your GM/FS.


About the commands, you can create a variable to be used by some players:


pawn Код:
new IsAPoliceMan[MAX_PLAYERS];//It is equal to 0.

pawn Код:
if (strcmp("/police1", cmdtext, true, 6) == 0)
    {
        IsAPoliceMan[playerid] = 1;//The variable is now equal to 1 for the command user
        return 1;
    }
and:

pawn Код:
if(strcmp("/cop", cmdtext, true, 10) == 0)
    {
        if(IsAPoliceMan[playerid] == 1)//It checks the level of the variable is 1 for the command user
        {
            SendClientMessage(playerid, 0xFFFFFFAA, "You are a police officer!");
        }
        return 1;
    }

I hope i have helped
You have helped a great lot, but i'm really stuck, When i map the gates, how do i map a closed one? And when i have finished it, do you fancy helping me in full detail tomorrow? Thank-you. Callum
Reply
#8

A closed gate would block the place that your trying to cover. The open gate, could just go down.

And here's a link to creating moving objects - https://sampforum.blast.hk/showthread.php?tid=195131
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)