Код:
if(strcmp(cmd, "/camera", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(IsACop(playerid))
{
if(!PlayerToPoint(8.0,playerid,211.6222,1811.9565,21.8594))
{
SendClientMessage(playerid, COLOR_GREY, " You are not at the Area51 Security Panel !");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_WHITE, "USE: /camera [number 1 - 6] (6 = OFF)");
return 1;
}
new number = strval(tmp);
if(number < 1 || number > 6) { SendClientMessage(playerid, COLOR_GREY, " Camera Number can't be below 1 ou above 6 !"); return 1; }
TogglePlayerControllable(playerid, 0);
GetPlayerPos(playerid, Unspec[playerid][Coords][0],Unspec[playerid][Coords][1],Unspec[playerid][Coords][2]);
if(number == 1) { SetPlayerCameraPos(playerid, 118.1011,1931.3221,22.5527); SetPlayerCameraLookAt(playerid, 98.9656,1920.9819,18.2180); }
else if(number == 2) { SetPlayerCameraPos(playerid, 213.5340,1875.3075,17.6406); SetPlayerCameraLookAt(playerid, 213.8679,1884.1714,13.8945); }
else if(number == 3) { SetPlayerCameraPos(playerid, 266.0640,1894.8856,38.6459); SetPlayerCameraLookAt(playerid, 224.0039,1887.1532,17.6406); }
else if(number == 4) { SetPlayerCameraPos(playerid, 260.8112,1808.0175,38.6303); SetPlayerCameraLookAt(playerid, 227.5645,1818.4778,17.6406); }
else if(number == 5) { SetPlayerCameraPos(playerid, 114.5196,1814.3483,38.6029); SetPlayerCameraLookAt(playerid, 123.6176,1846.4792,17.6549); }
else if(number == 6)
{
MedicBill[playerid] = 0;
TogglePlayerControllable(playerid, 1);
SetSpawnInfo(playerid, PlayerInfo[playerid][pTeam], PlayerInfo[playerid][pModel], Unspec[playerid][Coords][0], Unspec[playerid][Coords][1], Unspec[playerid][Coords][2], 10.0, -1, -1, -1, -1, -1, -1);
SpawnPlayer(playerid);
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You are not a Cop / Soldier !");
return 1;
}
}
return 1;