18.08.2011, 22:39
SO using these codes
I am STUMPED! It still lets people from TEAM_GROVE and TEAM_BALLAS open it.
Код:
new TEAM_POLICE;
public OnPlayerSpawn(playerid)
{
if(GetPlayerSkin(playerid) == 105) SetPlayerTeam(playerid, TEAM_GROVE);
if(GetPlayerSkin(playerid) == 106) SetPlayerTeam(playerid, TEAM_GROVE);
if(GetPlayerSkin(playerid) == 107) SetPlayerTeam(playerid, TEAM_GROVE);
if(GetPlayerSkin(playerid) == 102) SetPlayerTeam(playerid, TEAM_BALLAS);
if(GetPlayerSkin(playerid) == 103) SetPlayerTeam(playerid, TEAM_BALLAS);
if(GetPlayerSkin(playerid) == 104) SetPlayerTeam(playerid, TEAM_BALLAS);
if(GetPlayerSkin(playerid) == 280) SetPlayerTeam(playerid, TEAM_POLICE);
if(GetPlayerSkin(playerid) == 281) SetPlayerTeam(playerid, TEAM_POLICE);
if(GetPlayerSkin(playerid) == 164) SetPlayerTeam(playerid, TEAM_POLICE);
if(GetPlayerSkin(playerid) == 186) SetPlayerTeam(playerid, TEAM_POLICE);
if(GetPlayerSkin(playerid) == 283) SetPlayerTeam(playerid, TEAM_POLICE);
if(GetPlayerSkin(playerid) == 288) SetPlayerTeam(playerid, TEAM_POLICE);
if(GetPlayerSkin(playerid) == 282) SetPlayerTeam(playerid, TEAM_POLICE);
if (strcmp("/opdgate", cmdtext, true) == 0)
{
if(GetPlayerTeam(playerid) != TEAM_POLICE) return SendClientMessage(playerid, -1, "You can't use this as you are not in the police force.");
if(IsPlayerInRangeOfPoint(playerid, 20, 1544.94104004,-1622.77990723,12.38281250))
{
MoveObject(gate, 1544.63146973,-1631.57128906,12.38281250, 4.00);
SendClientMessage(playerid, 0xFF000000, "You have successfully opened the gate!");
}
return 1;
}
if (strcmp("/cpdgate", cmdtext, true) == 0)
{
if(GetPlayerTeam(playerid) != TEAM_POLICE) return SendClientMessage(playerid, -1, "You can't use this as you are not in the police force.");
if(IsPlayerInRangeOfPoint(playerid, 20, 1544.94104004,-1622.77990723,12.38281250))
{
MoveObject(gate, 1544.94104004,-1622.77990723,12.38281250, 4.00);
SendClientMessage(playerid, 0xFF000000, "You have successfully closed the gate!");
}
return 1;
}


