Доступ к архиву

Переход в группу "Пользователь"

300.00 ₽
Одноразовый платёж
Быстрый переход в группу "Пользователи", без надобности написания постов и ожидания.

Покупка дает возможность:
Быть полноправным участником форума
Нормальное копирование кода
Создавать темы
Скачивать файлы
Доступ к архиву Pawno-Info

Система голода

Статус
В этой теме нельзя размещать новые ответы.

jeffreymcdon

Ученик
Скачал ФС системы голода, там голод отображается по шкале, а мне нужно что бы отображалось цифрой и шкалу убрать.
Не подскажите как это сделать?

Вот код ФС:

Код:
#include <a_samp>

#define FILTERSCRIPT

forward ShowGolod();

new Text:GolodInfo[MAX_PLAYERS];
new PlayerGolod[MAX_PLAYERS];
new GolodShow[MAX_PLAYERS];
new Float:PlayerHP[MAX_PLAYERS][3];

public OnFilterScriptInit()
{
	SetTimer("ShowGolod", 15000, 1);
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

public OnPlayerSpawn(playerid)
{
	PlayerGolod[playerid]=30;
	return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
  	if(GolodShow[playerid]==1)
  	{
   		GolodShow[playerid]=0;
      	TextDrawDestroy(GolodInfo[playerid]);
	}
	return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
	return 1;
}

public ShowGolod()
{
	new string[256];
	for(new i; i<MAX_PLAYERS; i++)
	{
	    if(IsPlayerConnected(i))
	    {
	        if(GolodShow[i]==1) {
	            GolodShow[i]=0;
	            TextDrawHideForPlayer(i, GolodInfo[i]);
	            TextDrawDestroy(GolodInfo[i]);
			}
			if(PlayerGolod[i]==0) {
				new Float:hp;
				GetPlayerHealth(i, hp);
				SetPlayerHealth(i, hp-1);
				if(PlayerHP[i][0]==0.0) {
					GetPlayerHealth(i, PlayerHP[i][0]);
					PlayerHP[i][1]=0.0;
				} else if(PlayerHP[i][1]==0.0) {
					GetPlayerHealth(i, PlayerHP[i][1]);
					PlayerHP[i][2]=0.0;
				} else if(PlayerHP[i][2]==0.0) {
					GetPlayerHealth(i, PlayerHP[i][2]);
					PlayerHP[i][0]=0.0;
				}
				if(PlayerHP[i][0]<PlayerHP[i][1] && PlayerHP[i][0]!=0.0) {
				    PlayerGolod[i]=30;
					PlayerHP[i][0]=0.0;
					PlayerHP[i][1]=0.0;
					PlayerHP[i][2]=0.0;
				}
				if(PlayerHP[i][1]<PlayerHP[i][2] && PlayerHP[i][1]!=0.0) {
				    PlayerGolod[i]=30;
					PlayerHP[i][0]=0.0;
					PlayerHP[i][1]=0.0;
					PlayerHP[i][2]=0.0;
				}
				if(PlayerHP[i][2]<PlayerHP[i][0] && PlayerHP[i][2]!=0.0) {
				    PlayerGolod[i]=30;
					PlayerHP[i][0]=0.0;
					PlayerHP[i][1]=0.0;
					PlayerHP[i][2]=0.0;
				}
			} else {
				PlayerGolod[i]--;
				if(PlayerHP[i][0]==0.0) {
					GetPlayerHealth(i, PlayerHP[i][0]);
					PlayerHP[i][1]=0.0;
				} else if(PlayerHP[i][1]==0.0) {
					GetPlayerHealth(i, PlayerHP[i][1]);
					PlayerHP[i][2]=0.0;
				} else if(PlayerHP[i][2]==0.0) {
					GetPlayerHealth(i, PlayerHP[i][2]);
					PlayerHP[i][0]=0.0;
				}
				if(PlayerHP[i][0]<PlayerHP[i][1] && PlayerHP[i][0]!=0.0) {
				    PlayerGolod[i]=30;
					PlayerHP[i][0]=0.0;
					PlayerHP[i][1]=0.0;
					PlayerHP[i][2]=0.0;
				}
				if(PlayerHP[i][1]<PlayerHP[i][2] && PlayerHP[i][1]!=0.0) {
				    PlayerGolod[i]=30;
					PlayerHP[i][0]=0.0;
					PlayerHP[i][1]=0.0;
					PlayerHP[i][2]=0.0;
				}
				if(PlayerHP[i][2]<PlayerHP[i][0] && PlayerHP[i][2]!=0.0) {
				    PlayerGolod[i]=30;
					PlayerHP[i][0]=0.0;
					PlayerHP[i][1]=0.0;
					PlayerHP[i][2]=0.0;
				}
			}
			string = "~b~888888888888888888888888888888";
			strins(string, "~l~", PlayerGolod[i]+3);
			GolodInfo[i] = TextDrawCreate(547.000000,25.000000,string);
			TextDrawAlignment(GolodInfo[i],0);
			TextDrawBackgroundColor(GolodInfo[i],0x000000ff);
			TextDrawFont(GolodInfo[i],3);
			TextDrawLetterSize(GolodInfo[i],0.099999,1.000000);
			TextDrawColor(GolodInfo[i],0x000000ff);
			TextDrawSetOutline(GolodInfo[i],1);
			TextDrawSetProportional(GolodInfo[i],1);
			TextDrawSetShadow(GolodInfo[i],1);
			TextDrawShowForPlayer(i, GolodInfo[i]);
			GolodShow[i]=1;
	    } else if(GolodShow[i]==1) {
	        GolodShow[i]=0;
         	TextDrawHideForPlayer(i, GolodInfo[i]);
          	TextDrawDestroy(GolodInfo[i]);
	    }
	}
	return 1;
}
 
Статус
В этой теме нельзя размещать новые ответы.
Сверху Снизу