UlkiorraJeezy | Дата: Суббота, 14.07.2012, 13:08 | Сообщение # 1 |
 Лейтенант
Группа: Администраторы
Сообщений: 71
Статус: Offline
| 1.В enum pInfo создаем: 2.В public OnPlayerConnect(playerid) добавляем: Code PlayerInfo[playerid][pDisease] = 10; 3.В public SetPlayerUnjail(), а именно в for(new i = 0; i < GetMaxPlayers(); i++) добавляем: Code if(PlayerInfo[i][pDisease] == 1) { if(STDtime[i] >= 10 ) { GetPlayerName(i, plname, sizeof(plname)); format(string, sizeof(string), "%s кашляет",plname); ProxDetector(25.0, i, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); new Float:ph; GetPlayerHealth(i, ph); SetPlayerHealth(i, ph-3.0); STDtime[i] = 0; } else STDtime[i]++; } if(PlayerInfo[i][pDisease] == 2) { if(STDtime[i] >= 25 ) { GetPlayerName(i, plname, sizeof(plname)); format(string, sizeof(string), "%s сильно кашлеет",plname); ProxDetector(25.0, i, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); new Float:ph; GetPlayerHealth(i, ph); SetPlayerHealth(i, ph-10.0); STDtime[i] = 0; } else STDtime[i]++; } if(PlayerInfo[i][pDisease] == 3) { if(STDtime[i] >= 60 ) { if(GetPlayerState(i) == 1) { GetPlayerName(i, plname, sizeof(plname)); format(string, sizeof(string), "%s бессильно падает",plname); ProxDetector(25.0, i, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); new r = random(5); if(r == 1) ApplyAnimation(i,"CRACK","crckdeth2",4.1,1,1,1,1,1); else if(r == 2) ApplyAnimation(i,"CRACK","crckdeth1",4.1,0,1,1,1,1); else if(r == 3) ApplyAnimation(i,"CRACK","crckdeth3",4.1,0,1,1,1,1); else if(r == 4) ApplyAnimation(i,"CRACK","crckdeth4",4.1,0,1,1,1,1); else if(r == 5) ApplyAnimation(i,"CRACK","crckidle1",4.1,0,1,1,1,1); new Float:ph; GetPlayerHealth(i, ph); SetPlayerHealth(i, ph-25.0); STDtime[i] = 0; } } else STDtime[i]++; } 4.В public ShowStats(playerid,targetid) создаем: ну и в статистику создаете: Болезнь: (dtext) Code new dtext[21]; if(PlayerInfo[targetid][pDisease] == 1) dtext = "Простуда"; else if(PlayerInfo[targetid][pDisease] == 2) dtext = "Туберкулёз"; else if(PlayerInfo[targetid][pDisease] == 3) dtext = "Наркозависимость"; else dtext = "-"; 5.В public OnPlayerRegister(playerid, password[]) создаете: Code dini_IntSet(string, "Disease", PlayerInfo[playerid][pDisease]); 6.В public OnPlayerSave(playerid) создаете: Code dini_IntSet(string, "Disease", PlayerInfo[playerid][pDisease]); 7.В public OnPlayerLogin(playerid,password[]) создаете: Code PlayerInfo[playerid][pDisease] = dini_Int(string2,"Disease"); 8.В команду /usedrugs добавляете/зам: Code if(PlayerInfo[playerid][pDrugs] > 1) { PlayerStoned[playerid] += 1; if(PlayerStoned[playerid] >= 2) { GameTextForPlayer(playerid, "~w~‹‘~n~~p~Њ’•м‘", 4000, 1); } new Float:health; GetPlayerHealth(playerid, health); if(PlayerInfo[playerid][pDisease] == 3) { PlayerInfo[playerid][pDisease] = 0; SendClientMessage(playerid, COLOR_LIGHTRED, "Вы оттянули ломки на некоторое время..."); PlayerStoned[playerid] = 0; } else { PlayerInfo[playerid][pDisease] = 3; SendClientMessage(playerid, COLOR_LIGHTRED, "У Вас развилась наркозависимость!"); PlayerStoned[playerid] = 0; } if(PlayerInfo[playerid][pDrugPerk] > 0) { new hp = 2 * PlayerInfo[playerid][pDrugPerk]; hp += 20; SetPlayerHealth(playerid, health + hp); } else { SetPlayerHealth(playerid, health + 20.0); } if(STDPlayer[playerid]==1) { STDPlayer[playerid] = 0; SendClientMessage(playerid, COLOR_LIGHTBLUE, "Вы вылечились!"); } else if(STDPlayer[playerid]==2) { STDPlayer[playerid] = 1; SendClientMessage(playerid, COLOR_LIGHTBLUE, "У вас пропал имунитет к болезни из-за нарктоиков."); } else if(STDPlayer[playerid]==3) { STDPlayer[playerid] = 2; SendClientMessage(playerid, COLOR_LIGHTBLUE, "У вас пропал имунитет к ганорее из-за нарктоиков."); } } 9.В команду /healme добавляем: Code if(STDPlayer[playerid] > 0 || PlayerInfo[playerid][pDisease] > 0) { STDPlayer[playerid] = 0; SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Теперь Вы здаровы благодаря помощи госпмталя."); PlayerInfo[playerid][pMoney] -= 10000; SendClientMessage(playerid, TEAM_CYAN_COLOR, "Доктор: Ваша медицинская страховка теперь $10000,-. Приятного дня!"); }
|
|
| |