27.03.2009, 16:25
Im not positive but why not add a command for it under your Gamemode
And if that doesnt work add these:
Then do this
And if that doesnt work add these:
Код:
enum pInfo
{
pAdmin,
};
new PlayerInfo[MAX_PLAYERS][pInfo];
Код:
if (strcmp("/cctv", cmdtext, true) == 0)
{
if (PlayerInfo[playerid][pAdmin] >= 1)
{
if(Spawned[playerid] == 1)
{
PlayerMenu[playerid] = 0;
TogglePlayerControllable(playerid, 0);
ShowMenuForPlayer(CCTVMenu[0], playerid);
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "Please spawn first!");
}
return 1;
}
if (strcmp("/exitcctv", cmdtext, true) == 0)
{
if (PlayerInfo[playerid][pAdmin] >= 1)
{
if(CurrentCCTV[playerid] > -1)
{
SetPlayerPos(playerid, LastPos[playerid][LX], LastPos[playerid][LY], LastPos[playerid][LZ]);
SetPlayerFacingAngle(playerid, LastPos[playerid][LA]);
SetPlayerInterior(playerid, LastPos[playerid][LInterior]);
TogglePlayerControllable(playerid, 1);
KillTimer(KeyTimer[playerid]);
SetCameraBehindPlayer(playerid);
TextDrawHideForPlayer(playerid, TD);
CurrentCCTV[playerid] = -1;
return 1;
}
}
return 0;
}

