[C.M.D.] GM-Test ( Skrilax ) - Форум Cheat-Master.ru
  • Страница 1 из 1
  • 1
Модератор форума: [CM]OlegEhtler, Getbackthere, Phoenixxx_Czar  
[C.M.D.] GM-Test ( Skrilax )
[CM]Doc Дата: Четверг, 20.03.2014, 17:21 | Сообщение # 1
Боец
Сообщений: 141
Статус: Offline
И снова всем привет.Перейду сразу к делу...GM-TEST как на Skrilax Так же заменяем под свой мод
new:


PHP код:
Код
new Float:GMHP[MAX_PLAYERS][2];
new Float:VEHHP[MAX_PLAYERS][2];
new Float:GMARMOUR[MAX_PLAYERS][1];


В команды:

PHP код:
Код
else if(strcmp(cmd, "/gm", true) == 0)
     {
         GetPlayerName(playerid, sendername, sizeof(sendername));
         tmp = strtok(cmdtext, idx);
         if(!strlen(tmp) && PlayerInfo[playerid][pAAdmin] >= 2) return SendClientMessage(playerid, COLOR_WHITE, "Введите: /gm [id]");
         giveplayerid = strval(tmp);
         if(IsPlayerConnected(giveplayerid))
         {
             if(PlayerInfo[playerid][pAAdmin] >= 2)
             {
                 if(IsPlayerConnected(giveplayerid))
                 {
                     GetPlayerHealth(giveplayerid,GMHP[giveplayerid][0]);
                     GetVehicleHealth(GetPlayerVehicleID(giveplayerid),VEHHP[giveplayerid][0]);
                     GetPlayerArmour(giveplayerid, GMARMOUR[giveplayerid][0]);
                     SetPlayerArmourAC(SpecAd[playerid], 0);
                     SetPlayerHealthAC(giveplayerid, 100.0);
                     player_NoCheckTimeVeh[giveplayerid] = 3;
                     SetVehicleHealth(GetPlayerVehicleID(giveplayerid),10000.0);
                     SetTimerEx("GETHP",1000,false,"i",giveplayerid);
                     new Float:boomx, Float:boomy, Float:boomz;
                     GetPlayerPos(giveplayerid,boomx, boomy, boomz);
                     CreateExplosion(boomx, boomy , boomz, 5, 2);
                 }
                 else SendClientMessage(playerid, COLOR_GREY, "[Ошибка] Игрок не найден!");
             }
             else SendClientMessage(playerid, COLOR_RED, "");
         }
         else SendClientMessage(playerid, COLOR_GRAD2, "[Ошибка] Игрок не найден!");
         return true;
     }


В конец мода:

PHP код:
Код
forward GETHP(playerid);
public GETHP(playerid)
{
     new string[128];
     new 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), "Игрок %s[%d] | GM. ---> (%.0f HP)", sendername,playerid,GMHP[playerid][1]);
             ABroadCast(COLOR_REDD,string,2);
             SetPlayerHealthAC(playerid, GMHP[playerid][0]);
             SetPlayerArmourAC(playerid, GMARMOUR[playerid][0]);
             return true;
         }
         else
         {
             format(string, sizeof(string), "Игрок %s[%d] | не GM.", sendername,playerid);
             ABroadCast(COLOR_YELLOW,string,2);
             SetPlayerHealthAC(playerid, GMHP[playerid][0]);
             SetPlayerArmourAC(playerid, GMARMOUR[playerid][0]);
             return true;
         }
     }
     else
     {
         if(VEHHP[playerid][1] >= 9999.0)
         {
             format(string, sizeof(string), "Игрок %s[%d] | GM car. ---> (%.1f HP car)", sendername,playerid,VEHHP[playerid][1]);
             ABroadCast(COLOR_REDD,string,2);
             SetVehicleHealth(GetPlayerVehicleID(playerid),VEHHP[playerid][0]);
             return true;
         }
         else
         {
             format(string, sizeof(string), "Игрок %s[%d] | не GM car.", sendername,playerid);
             ABroadCast(COLOR_YELLOW,string,2);
             SetVehicleHealth(GetPlayerVehicleID(playerid),VEHHP[playerid][0]);
             return true;
         }
     }
}  
  • Страница 1 из 1
  • 1
Поиск: