Админ панель в /recon (RLS) - Форум Cheat-Master.ru
  • Страница 1 из 1
  • 1
Модератор форума: [CM]OlegEhtler, Getbackthere, Phoenixxx_Czar  
Админ панель в /recon (RLS)
[CM]Clemente Дата: Воскресенье, 22.09.2013, 18:08 | Сообщение # 1
Новичок
Сообщений: 10
Статус: Offline
Всем привет вот скрин админ панели http://s41.radikal.ru/i094/1304/06/b301bac0e0cb.jpg
Ко всем new:
Код
new SpecHATimer[MAX_PLAYERS];
new Float:GMHP[MAX_PLAYERS][2];
new Float:GMARMOUR[MAX_PLAYERS][1];
new Float:VEHHP[MAX_PLAYERS][2];
new TeleportDestNoFloat[MAX_PLAYERS][2];
new Toogle[MAX_PLAYERS];
new Text:DRAP[MAX_PLAYERS];
new Spectate[MAX_PLAYERS],Menu:specmenu,SpecID[MAX_PLAYERS];

Ко всем forward:
Код
forward SpecHArefresh(playerid, specplayerid);
forward GETHP(playerid)

Далее создаём textdraw. Ищем public OnPlayerConnect(playerid) и вставляем:
Код
DRAP[playerid] = TextDrawCreate(510.0, 120.0, "_");
     TextDrawFont(DRAP[playerid], 2);
     TextDrawLetterSize(DRAP[playerid], 0.30,1.20);
     TextDrawColor(DRAP[playerid], -1);
     TextDrawSetShadow(DRAP[playerid], 1);
     TextDrawBackgroundColor(DRAP[playerid], 0x00000044);
     TextDrawSetOutline(DRAP[playerid], 0);
     TextDrawSetProportional(DRAP[playerid], 3);
     TextDrawAlignment(DRAP[playerid], 1);

В public OnPlayerDisconnect(playerid, reason) и вставляем:
Код
for (new i, m = GetMaxPlayers(); i < m; i++)
     {
         if(GetPlayerState(i) == PLAYER_STATE_SPECTATING && gSpectateID[i] == playerid)
         {
             StopSpectate(i);
             SetPlayerHealthAC(i, 100);
             format(string, sizeof(string), "~w~RECON ~r~ OFF~n~ ~r~PLAYER DISCONNECT");
             GameTextForPlayer(i, string, 5000, 3);
             TextDrawHideForPlayer(playerid, DRAP[playerid]);
                KillTimer(SpecHATimer[playerid]);
         }
     }

Создаём Menu() , у кого есть, просто вставляем в конец Menu():
Код
Menu()
{
     specmenu = CreateMenu("RE", 1, 40.0, 220.0, 100.0);
     AddMenuItem(specmenu,0,"UPDATE");
     AddMenuItem(specmenu,0,"FREEZE");
     AddMenuItem(specmenu,0,"SLAP");
     AddMenuItem(specmenu,0,"GM");
     AddMenuItem(specmenu,0,"STATS");
     AddMenuItem(specmenu,0,"OFF");
}

В public OnPlayerSelectedMenuRow(playerid, row):
Код
else if(Current == specmenu)
     {
         new giveplayer[24],sendername[24],string[150];
         GetPlayerName(Spectate[playerid], giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername));
         switch(row)
            {
             case 0:
             {
                 StartSpectate(playerid, Spectate[playerid]);
                 ShowMenuForPlayer(specmenu,playerid);
             }
             case 1:
             {
                 if(Toogle[Spectate[playerid]] == 0)
                 {
                       TogglePlayerControllable(Spectate[playerid], 0);
                       format(string, sizeof(string), "Администратор %s заморозил игрока %s",sendername,giveplayer);
                       ABroadCast(0xffa500aa,string,1);
                        ShowMenuForPlayer(specmenu,playerid);
                        Toogle[Spectate[playerid]] = 1;
                   }
                   else
                   {
                     TogglePlayerControllable(Spectate[playerid], 1);
                       format(string, sizeof(string), "Администратор %s разморозил игрока %s",sendername,giveplayer);
                       ABroadCast(0xffa500aa,string,1);
                        ShowMenuForPlayer(specmenu,playerid);
                        Toogle[Spectate[playerid]] = 0;
                   }
             }
             case 2:
             {
                 if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_RED, string);
                 format(string, sizeof(string), "Администратор %s ударил игрока %s",sendername ,giveplayer);
                 ABroadCast(0xffa500aa,string,0);
                 new Float:Xq,Float:Yq,Float:Zq;
                 GetPlayerPos(Spectate[playerid],Xq,Yq,Zq);
                 SetPlayerPos(Spectate[playerid],Xq,Yq,Zq+5);
                 SendClientMessage(Spectate[playerid], 0xbbbbbbaa, "Вас слапнул администратор");
                 ShowMenuForPlayer(specmenu,playerid);
             }
             case 3:
             {
                 if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_RED, string);
                 format(string, sizeof(string), "Администратор %s произвёл GMTEST на игроке %s",sendername ,giveplayer);
                 ABroadCast(COLOR_GREY,string,0);
                 GetPlayerHealth(Spectate[playerid],GMHP[Spectate[playerid]][0]);
                 GetVehicleHealth(GetPlayerVehicleID(Spectate[playerid]),VEHHP[Spectate[playerid]][0]);
                 GetPlayerArmour(Spectate[playerid], GMARMOUR[Spectate[playerid]][0]);
                     SetPlayerHealthAC(Spectate[playerid], 100.0);
                     player_NoCheckTimeVeh[Spectate[playerid]] = 3;
                     SetVehicleHealth(GetPlayerVehicleID(Spectate[playerid]),10000.0);
                     SetPlayerArmourAC(Spectate[playerid], 0);
                     SetTimerEx("GETHP",1000,false,"i",Spectate[playerid]);
                     new Float:boomx, Float:boomy, Float:boomz;
                     GetPlayerPos(Spectate[playerid],boomx, boomy, boomz);
                     CreateExplosion(boomx, boomy+3, boomz+8, 5, 2);
                 ShowMenuForPlayer(specmenu,playerid);
             }
             case 4: { ShowStats(playerid,Spectate[playerid]); ShowMenuForPlayer(specmenu,playerid); }
             case 5: OnPlayerCommandText(playerid,"/reoff");
            }
        }

Заменяем команды /recon и /reoff на эти:
Код
if(strcmp(cmd, "/recon", true) == 0 || strcmp(cmd, "/re", true) == 0)
     {
         if (PlayerInfo[playerid][pAdmin] >= 1)
         {
             if(IsPlayerConnected(playerid))
             {
                 new specplayerid;
                 GetPlayerName(specplayerid, giveplayer, sizeof(giveplayer));
                 tmp = strtok(cmdtext, idx);
                 specplayerid = strval(tmp);
                 if(!strlen(tmp)) return SendClientMessage(playerid, 0x22ff00AA, "» {bbbbbb}Введите{FFFFFF}: /re [ид]");
                 if(specplayerid == playerid) return SendClientMessage(playerid, COLOR_WHITE, "Ошибка: Вы ввели свой ID!");
                 if(IsPlayerConnected(specplayerid))
                 {
                     if(GetPlayerState(playerid) != PLAYER_STATE_SPECTATING)
                     {
                         GetPlayerPos(playerid, TeleportDest[playerid][0],TeleportDest[playerid][1],TeleportDest[playerid][2]);
                         TeleportDestNoFloat[playerid][0] = GetPlayerInterior(specplayerid);
                         TeleportDestNoFloat[playerid][1] = GetPlayerVirtualWorld(specplayerid);
                         SpecHATimer[playerid] = SetTimerEx("SpecHArefresh",500,true,"ff",playerid,specplayerid);
                         TextDrawShowForPlayer(playerid, DRAP[playerid]);
                     }
                     if(GetPlayerState(specplayerid) == PLAYER_STATE_SPECTATING && gSpectateID[specplayerid] != INVALID_PLAYER_ID)
                     {
                         GetPlayerName(gSpectateID[specplayerid], sendername, sizeof(sendername));
                         format(string, sizeof(string), "Администратор уже следит за {1e90ff}%s[%d]", sendername,gSpectateID[specplayerid]);
                         SendClientMessage(playerid, COLOR_WHITE, string);
                         return true;
                     }
                     if(GetPlayerState(specplayerid) != 1 && GetPlayerState(specplayerid) != 2 && GetPlayerState(specplayerid) != 3) return SendClientMessage(playerid, COLOR_WHITE, "Ошибка!");
                     StartSpectate(playerid, specplayerid);
                     Spectate[playerid] = specplayerid;
                     SpecID[specplayerid] = playerid;
                     ShowMenuForPlayer(specmenu,playerid);
                 }
             }
         }
         return true;
     }
     if(strcmp(cmd, "/reoff", true) == 0)
     {
         if(PlayerInfo[playerid][pAdmin] >= 1)
         {
             if(GetPlayerState(playerid) == PLAYER_STATE_SPECTATING)
             StopSpectate(playerid);
                Spectate[playerid] = 255;
                TextDrawHideForPlayer(playerid, DRAP[playerid]);
                KillTimer(SpecHATimer[playerid]);
                   PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
         }
         return true;
      }

В конце мода создаём паблик:
Код
public SpecHArefresh(playerid, specplayerid)
{
     new giveplayer[MAX_PLAYER_NAME];
     new sendername[MAX_PLAYER_NAME];
     new DRAPstring[512];
     new Float:armour, Float:health;
     new ping = GetPlayerPing(specplayerid);
     new pip[64];
     new pFPS[MAX_PLAYERS];
     pFPS[specplayerid] = GetPlayerFPS(specplayerid);
     GetPlayerIp(specplayerid, pip, sizeof(pip));
     GetPlayerHealth(specplayerid, health);
     GetPlayerArmour(specplayerid, armour);
     GetPlayerName(playerid, sendername, sizeof(sendername));
     GetPlayerName(specplayerid, giveplayer, sizeof(giveplayer));
     format(DRAPstring,sizeof(DRAPstring),"~p~Name: ~w~%s~n~~p~IP: ~w~%s~n~~p~Number: ~w~%d~n~~p~Warns: ~w~%d~n~~n~~r~Health: ~w~%.0f~n~~r~Armour: ~w~%.0f~n~~n~~y~Speed: ~w~%d KM/H~n~~n~~g~$ Money: ~w~%d~n~~g~$ Bank: ~w~%d~n~~n~~b~Ping: ~w~%d~n~~b~FPS: ~w~%d",giveplayer,pip,PlayerInfo[specplayerid][pPnumber],PlayerInfo[specplayerid][pWarns],health,armour,SpeedVehicle(specplayerid) / 2,PlayerInfo[specplayerid][pCash],PlayerInfo[specplayerid][pBank],ping,pFPS[specplayerid]);
     TextDrawSetString(DRAP[playerid], DRAPstring);
     return true;
}

В конце мода создаём ещё 1 паблик:
Код
public GETHP(playerid)
{
     new string[128],sendername[MAX_PLAYER_NAME];
     GetPlayerName(playerid,sendername,sizeof(sendername));
     GetPlayerHealth(playerid,GMHP[playerid][1]);
     GetVehicleHealth(GetPlayerVehicleID(playerid),VEHHP[playerid][1]);
     if(!IsPlayerInAnyVehicle(playerid))
     {
         if(GMHP[playerid][1] >= 100.0)
         {
             format(string, sizeof(string), "{ff0000}[ERROR: 015/ANTI-GM] {bbbbbb}%s[%d] использует ГМ/CLEO скрипты.", sendername,playerid);
             ABroadCast(-1,string,1);
             SetPlayerHealthAC(playerid, GMHP[playerid][0]);
             SetPlayerArmourAC(playerid, GMARMOUR[playerid][0]);
             return true;
         }
         else
         {
             format(string, sizeof(string), "{34c924}[ANTI-GM] {bbbbbb}%s[%d] не использует ГМ/CLEO скрипты.", sendername,playerid);
             ABroadCast(-1,string,1);
             SetPlayerHealthAC(playerid, GMHP[playerid][0]);
             SetPlayerArmourAC(playerid, GMARMOUR[playerid][0]);
             return true;
         }
     }
     else
     {
         if(VEHHP[playerid][1] >= 9999.0)
         {
             format(string, sizeof(string), "{ff0000}[ERROR: 015/ANTI-GM] {bbbbbb}%s[%d] Использует ГМ/CLEO скрипты.", sendername,playerid);
             ABroadCast(-1,string,1);
             SetVehicleHealth(GetPlayerVehicleID(playerid),VEHHP[playerid][0]);
             return true;
         }
         else
         {
             format(string, sizeof(string), "{34c924}[ANTI-GM] {bbbbbb}%s[%d] не использует ГМ/CLEO скрипты.", sendername,playerid);
             ABroadCast(-1,string,1);
             SetVehicleHealth(GetPlayerVehicleID(playerid),VEHHP[playerid][0]);
             return true;
         }
     }
}

И создаём stock для измерения FPS:
Код
stock GetPlayerFPS(playerid)
{
     SetPVarInt(playerid, "DrunkL", GetPlayerDrunkLevel(playerid));
     if(GetPVarInt(playerid, "DrunkL") < 100) SetPlayerDrunkLevel(playerid, 2000);
     else{
         if(GetPVarInt(playerid, "LDrunkL") != GetPVarInt(playerid, "DrunkL"))
         {
             SetPVarInt(playerid, "FPS", (GetPVarInt(playerid, "LDrunkL") - GetPVarInt(playerid, "DrunkL")));
             SetPVarInt(playerid, "LDrunkL", GetPVarInt(playerid, "DrunkL"));
             if((GetPVarInt(playerid, "FPS") > 1) && (GetPVarInt(playerid, "FPS") < 256))
             {
                 return GetPVarInt(playerid, "FPS") - 1;
             }
         }
     }
     return true;
}



skype:alekcyc1987
[CM]Котэ Дата: Среда, 25.09.2013, 19:19 | Сообщение # 2
Бывалый
Сообщений: 353
Статус: Offline
Сколько информации ааа biggrin
Посмотри что из этого выйдет.
WantedRobot Дата: Понедельник, 28.10.2013, 20:55 | Сообщение # 3
Боец
Сообщений: 88
Статус: Offline
Нормально
Прикрепления: 7124725.png (3.9 Kb)


Вы здесь: 228-й день , сегодня будет идеальный день . Хах
[CM]Duksxamik Дата: Среда, 06.11.2013, 00:11 | Сообщение # 4
Читор
Сообщений: 62
Статус: Offline
Фу фу а не рекон, на самп рп лучше всех dry
Голубь Дата: Четверг, 07.11.2013, 16:30 | Сообщение # 5
Авторитет
Сообщений: 2137
Статус: Offline
если такая панель есть сервере, несложно получить к ней доступ

двач
https://vk.com/povargek
[CM]Clemente Дата: Воскресенье, 04.05.2014, 13:44 | Сообщение # 6
Новичок
Сообщений: 10
Статус: Offline
Все нормально ставится

skype:alekcyc1987
  • Страница 1 из 1
  • 1
Поиск: