new TEAM_POLICE;
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(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 open the gate!");
}
return 1;
}

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");
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 open the gate!");
}
return 1;
}
|
Код:
new TEAM_POLICE; Код:
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(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 open the gate!");
}
return 1;
}
|
if (strcmp("/opdgate", cmdtext, true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 20, 1544.94104004,-1622.77990723,12.38281250))
{
if(GetPlayerSkin(playerid) == 280 || 281 || 164 || 186 || 283 || 288 || 282)
{
SendClientMessage(playerid, 0xFF000000, "You have successfully open the gate!");
}
}
else
{
SendClientMessage(playerid, -1, "You cannot open the gate!");
}
return 1;
}
if(GetPlayerTeam(playerid) != TEAM_POLICE) return SendClientMessage(playerid, -1, "You can't use this as you are not in the 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");
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;
}
SetPlayerTeam(playerid, TEAM_POLICE);public OnPlayerSpawn(playerid)