faction gate
#1

Please help me again with gates . My faction Nummber is 14. How to make that only a faction of that could open the gate?
I dont understand what i Need to type ""TEAM_MAFIA"" - There need to type my faction name or what? Please explain me

PHP код:
1.// This is a comment
2.// uncomment the line below if you want to write a filterscript
3.#define FILTERSCRIPT
4.
5.
#include <a_samp>
6.
7.
new Openlagate;
8.
9.
#if defined FILTERSCRIPT
10.
11.
public OnFilterScriptInit()
12.{
13.        print("\n--------------------------------------");
14.        print(" Blank Filterscript by your name here");
15.        print("--------------------------------------\n");
16.        Openlagate CreateObject(9801762.1135253906, -1693.256225585915.20199966430700266.70568847656);
17.        return 1;
18.}
19.
20.
public OnFilterScriptExit()
21.{
22.        return 1;
23.}
24.
25.
#else
26.
27.main
()
28.{
29.        print("\n----------------------------------");
30.        print(" Blank Gamemode by your name here");
31.        print("----------------------------------\n");
32.}
33.
34.
#endif
35.
36.
public OnPlayerCommandText(playeridcmdtext[])
37.{
38.        if (strcmp("/opencpg"cmdtexttrue10) == 0)
39.        {
40.                if(GetPlayerTeam(playerid) == TEAM_MAFIA// change the 'TEAM_MAFIA' to how you defined it.
41.                {
42.                        if(IsPlayerInRangeOfPoint(playerid10.01762.1135253906, -1693.256225585915.201999664307))
43.                        {
44.                                MoveObject(Openlagate1761.650390625, -1700.663208007815.2006053924564);
45.                                SendClientMessage(playerid0xFFFFFF"You've opened the crime place gate");
46.                        }
47.                }
48.                return 1;
49.        }
50.
51.        
if (strcmp("/closecpg"cmdtexttrue10) == 0)
52.        {
53.                if(GetPlayerTeam(playerid) == TEAM_MAFIA// again, change it!
54.                {
55.                        if(IsPlayerInRangeOfPoint(playerid10.01762.1135253906, -1693.256225585915.201999664307))
56.                        {
57.                                MoveObject(Openlagate1762.1135253906, -1693.256225585915.2019996643074);
58.                                SendClientMessage(playerid0xFFFFFF"You've closed the crime place gate");
59.                        }
60.                }
61.                return 1;
62.        }
63.return 0
Reply
#2

If the teamid of your faction is 14, then just change the text of TEAM_MAFIA to 14 or else add a definition to make TEAM_MAFIA stand for 14, like so:

pawn Код:
#define TEAM_MAFIA 14
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)