if (strcmp(cmd, "/open", true) ==0)
{
if(gTeam[playerid] == TEAM_COP && PlayerInfo[playerid][pRank] == 1 || gTeam[playerid] == TEAM_ARMY && PlayerInfo[playerid][pRank] == 2)
{
new Float:gatex, Float:gatey, Float:gatez;
if(city == 1)
{
gatex = 1539.709717;
gatey = -1627.873047;
gatez = 14.057503;
}
if(city == 2)
{
gatex = -1571.661133;
gatey = 665.627869;
gatez = 6.354377;
}
if(PlayerToPoint(25, playerid, gatex, gatey, gatez))
{
OpenPoliceDepartmentGate();
SetTimer("ClosePoliceDepartmentGate", 7500, false);
SendClientMessage(playerid, COLOR_YELLOW,"You have successfully opened this gate.");
return 1;
}
if(PlayerToPoint(25, playerid, -1701.720825, 680.697083, 24.057503))
{
OpenPoliceDepartmentGate2();
SetTimer("ClosePoliceDepartmentGate2", 7500, false);
SendClientMessage(playerid, COLOR_YELLOW,"You have successfully opened this gate.");
return 1;
}
else
{
SendClientMessage(playerid, COLOR_RED,"You are not at a gate. Try closer if you are.");
}
}
else
{
SendClientMessage(playerid, COLOR_RED,"You are not a part of the cops or army team.");
}
return 1;
}
if (strcmp(cmd, "/close", true) ==0)
{
if(gTeam[playerid] == TEAM_COP && PlayerInfo[playerid][pRank] == 1 || gTeam[playerid] == TEAM_ARMY && PlayerInfo[playerid][pRank] == 2)
{
new Float:gatex, Float:gatey, Float:gatez;
if(city == 1)
{
gatex = 1539.709717;
gatey = -1627.873047;
gatez = 14.057503;
}
if(city == 2)
{
gatex = -1571.661133;
gatey = 665.627869;
gatez = 6.354377;
}
if(PlayerToPoint(25, playerid, gatex, gatey, gatez))
{
ClosePoliceDepartmentGate();
SendClientMessage(playerid, COLOR_YELLOW,"You have successfully closed this gate.");
return 1;
}
if(PlayerToPoint(25, playerid, -1701.720825, 680.697083, 24.057503))
{
ClosePoliceDepartmentGate2();
SendClientMessage(playerid, COLOR_YELLOW,"You have successfully closed this gate.");
return 1;
}
else
{
SendClientMessage(playerid, COLOR_RED,"You are not at a gate. Try closer if you are.");
}
}
else
{
SendClientMessage(playerid, COLOR_RED,"You are not a part of the cops or army team.");
}
return 1;
}
if(gTeam[playerid] == TEAM_COP && PlayerInfo[playerid][pRank] == 1 || gTeam[playerid] == TEAM_ARMY && PlayerInfo[playerid][pRank] == 2)
{
if (strcmp(cmd, "/open", true) ==0)
{
if(gTeam[playerid] == TEAM_COP && PlayerInfo[playerid][pRank] == 1 || gTeam[playerid] == TEAM_ARMY && PlayerInfo[playerid][pRank] == 2) // Remove
{ // Remove
new Float:gatex, Float:gatey, Float:gatez;
if(city == 1)
{
gatex = 1539.709717;
gatey = -1627.873047;
gatez = 14.057503;
}
if(city == 2)
{
gatex = -1571.661133;
gatey = 665.627869;
gatez = 6.354377;
}
if(PlayerToPoint(25, playerid, gatex, gatey, gatez))
{
OpenPoliceDepartmentGate();
SetTimer("ClosePoliceDepartmentGate", 7500, false);
SendClientMessage(playerid, COLOR_YELLOW,"You have successfully opened this gate.");
return 1;
}
if(PlayerToPoint(25, playerid, -1701.720825, 680.697083, 24.057503))
{
OpenPoliceDepartmentGate2();
SetTimer("ClosePoliceDepartmentGate2", 7500, false);
SendClientMessage(playerid, COLOR_YELLOW,"You have successfully opened this gate.");
return 1;
}
else
{
SendClientMessage(playerid, COLOR_RED,"You are not at a gate. Try closer if you are.");
}
}
else
{
SendClientMessage(playerid, COLOR_RED,"You are not a part of the cops or army team.");
}
return 1;
}
if (strcmp(cmd, "/close", true) ==0)
{
if(gTeam[playerid] == TEAM_COP && PlayerInfo[playerid][pRank] == 1 || gTeam[playerid] == TEAM_ARMY && PlayerInfo[playerid][pRank] == 2)
{
new Float:gatex, Float:gatey, Float:gatez;
if(city == 1)
{
gatex = 1539.709717;
gatey = -1627.873047;
gatez = 14.057503;
}
if(city == 2)
{
gatex = -1571.661133;
gatey = 665.627869;
gatez = 6.354377;
}
if(PlayerToPoint(25, playerid, gatex, gatey, gatez))
{
ClosePoliceDepartmentGate();
SendClientMessage(playerid, COLOR_YELLOW,"You have successfully closed this gate.");
return 1;
}
if(PlayerToPoint(25, playerid, -1701.720825, 680.697083, 24.057503))
{
ClosePoliceDepartmentGate2();
SendClientMessage(playerid, COLOR_YELLOW,"You have successfully closed this gate.");
return 1;
}
else
{
SendClientMessage(playerid, COLOR_RED,"You are not at a gate. Try closer if you are.");
}
}
else // Remove
{ // Remove
SendClientMessage(playerid, COLOR_RED,"You are not a part of the cops or army team."); // Remove
} // Remove
return 1;
}
|
Originally Posted by _Saif_
Код:
if(gTeam[playerid] == TEAM_COP && PlayerInfo[playerid][pRank] == 1 || gTeam[playerid] == TEAM_ARMY && PlayerInfo[playerid][pRank] == 2)
{
|
|
Originally Posted by Kirchhoff
Thanks , but i removed all i want to make those gates from 0 .
|