Defman
Участник форума
- Регистрация
- 26 Май 2013
- Сообщения
- 3.165
- Благодарности
- 245
- Баллы
- 300
Сорсер все голубым выделяет, и это означает что по идее все правильно.
var int PC_Sprint_Mode;
var int PC_STAMINA_MAX;
var int PC_STAMINA_CURRENT;
func void B_CYCLE_FUNCTION()
{
PC_STAMINA_MAX = 1000;
PC_STAMINA_CURRENT = 1000;
if(C_BodyStateContains(hero,BS_STAND))
{
if(PC_Sprint_Mode == TRUE)
{
Mdl_RemoveOverlayMds(hero,"HUMANS_SPRINT.MDS");
PC_Sprint_Mode = FALSE;
PC_STAMINA_CURRENT = 1000;
};
};
if(C_BodyStateContains(hero,BS_WALK))
{
if(!Npc_IsInFightMode(hero,FMODE_FAR))
{
if(PC_Sprint_Mode == FALSE && PC_STAMINA_CURRENT > PC_STAMINA_MAX / 4)
{
PC_Sprint_Mode = 2;
};
};
};
if(C_BodyStateContains(hero,BS_RUN))
{
if(PC_Sprint_Mode == 2)
{
Mdl_ApplyOverlayMds(hero,"HUMANS_SPRINT.MDS");
PC_Sprint_Mode = TRUE;
};
};
if(PC_Sprint_Mode == TRUE && PC_STAMINA_CURRENT < PC_STAMINA_MAX / 15)
{
Mdl_RemoveOverlayMds(hero,"HUMANS_SPRINT.MDS");
PC_Sprint_Mode = FALSE;
PC_STAMINA_CURRENT = 1000;
if(PC_Sprint_Mode == TRUE)
{
PC_STAMINA_CURRENT -=1;
};
Wld_SendTrigger("CYCLE_TRIGGER");
};
};
var int PC_STAMINA_MAX;
var int PC_STAMINA_CURRENT;
func void B_CYCLE_FUNCTION()
{
PC_STAMINA_MAX = 1000;
PC_STAMINA_CURRENT = 1000;
if(C_BodyStateContains(hero,BS_STAND))
{
if(PC_Sprint_Mode == TRUE)
{
Mdl_RemoveOverlayMds(hero,"HUMANS_SPRINT.MDS");
PC_Sprint_Mode = FALSE;
PC_STAMINA_CURRENT = 1000;
};
};
{
if(!Npc_IsInFightMode(hero,FMODE_FAR))
{
if(PC_Sprint_Mode == FALSE && PC_STAMINA_CURRENT > PC_STAMINA_MAX / 4)
{
PC_Sprint_Mode = 2;
};
};
};
if(C_BodyStateContains(hero,BS_RUN))
{
if(PC_Sprint_Mode == 2)
{
Mdl_ApplyOverlayMds(hero,"HUMANS_SPRINT.MDS");
PC_Sprint_Mode = TRUE;
};
};
if(PC_Sprint_Mode == TRUE && PC_STAMINA_CURRENT < PC_STAMINA_MAX / 15)
{
Mdl_RemoveOverlayMds(hero,"HUMANS_SPRINT.MDS");
PC_Sprint_Mode = FALSE;
PC_STAMINA_CURRENT = 1000;
if(PC_Sprint_Mode == TRUE)
{
PC_STAMINA_CURRENT -=1;
};
Wld_SendTrigger("CYCLE_TRIGGER");
};
};