• Страница 1 из 1
  • 1
Модератор форума: pashkaa, Slesh  
Помогите покрасить цвет букв
Дата: Пятница, 08.06.2012, 00:58 | Сообщение # (1)
Удаленные
I love LINK-CSS.PP.UA
Для того чтобы сменить цвет нужно
1)Открой файл menus.inl.
2) Найди функцию public MENU_SelectSkill( idUser );
3) Замени свою функцию на мою ( полностью ):

public MENU_SelectSkill( idUser )
{

// User has no race, how can we select skills?!?
if ( p_data[idUser][P_RACE] == 0 )
{
//set_hudmessage(200, 100, 0, -1.0, 0.3, 0, 1.0, 5.0, 0.1, 0.2, 2)
WC3_StatusText( idUser, TXT_TOP_CENTER, "%L", LANG_PLAYER, "SELECT_RACE_BEFORE_SKILLS" );

return;
}

// They don't choose skills when it's random
else if ( p_data[idUser][P_RACE] == RACE_CHAMELEON && get_pcvar_num( CVAR_wc3_cham_random ) )
{
//WC3_StatusText( idUser, TXT_TOP_CENTER, "%s", "Chameleons can't select skills!" );
CHAM_ConfigureSkills( idUser );

return;
}

// Lets make sure the user has some available skill points
new iSkillsUsed = SM_TotalSkillPointsUsed( idUser );
if ( iSkillsUsed >= p_data[idUser][P_LEVEL] )
{

//set_hudmessage(200, 100, 0, -1.0, 0.3, 0, 1.0, 5.0, 0.1, 0.2, 2)
WC3_StatusText( idUser, TXT_TOP_CENTER, "%L", LANG_PLAYER, "ALREADY_SELECTED_SKILL_POINTS" );

return;
}

// Bots don't need a menu now do they??
if ( is_user_bot( idUser ) )
{
// No race has been selected yet!!
if ( !SM_SkillAvailable( idUser ) )
{
return;
}

// Keep giving the bot a random ID until we are full!
while ( iSkillsUsed < p_data[idUser][P_LEVEL] )
{
SM_GiveRandomSkillPoint( idUser );

iSkillsUsed = SM_TotalSkillPointsUsed( idUser );
}

return;
}

// OK set up a menu!!!

new szMsg[512], pos = 0, szSkillName[64];
new iSkillCounter = 0, iSkillID = 0, iKeys = (1<<9), iSkillLevel;

// Add the menu header
pos += formatex( szMsg[pos], charsmax(szMsg)-pos, "%L", LANG_PLAYER, "MENU_SELECT_SKILL" );

iSkillID = SM_GetSkillByPos( idUser, iSkillCounter );

while ( iSkillID != -1 )
{
iSkillLevel = SM_GetSkillLevel( idUser, iSkillID, 4 );

LANG_GetSkillName( iSkillID , idUser, szSkillName, 63, 1 );

// Add the trainable skills to the menu
if ( SM_GetSkillType( iSkillID ) == SKILL_TYPE_TRAINABLE )
{

// Only add it to the menu if they don't have level 3 already!
if ( iSkillLevel < MAX_SKILL_LEVEL )
{

// User isn't high enough of a level to select this skill yet
if ( p_data[idUser][P_LEVEL] <= 2 * iSkillLevel )
{
pos += formatex( szMsg[pos], charsmax(szMsg)-pos, "\d" );
}

// Then the user can choose it!
else
{
iKeys |= (1<<iSkillCounter);
}

pos += formatex( szMsg[pos], charsmax(szMsg)-pos, "^n\r %d. %s %L %d\w", iSkillCounter+1, szSkillName, LANG_PLAYER, "WORD_LEVEL", iSkillLevel + 1 );
}
}

// Add the ultimate to the menu
else if ( SM_GetSkillType( iSkillID ) == SKILL_TYPE_ULTIMATE )
{

if ( iSkillLevel < MAX_ULTIMATE_LEVEL )
{
// User can't choose ultimate yet :/
if ( p_data[idUser][P_LEVEL] <= 5 )
{
pos += formatex( szMsg[pos], charsmax(szMsg)-pos, "\d" );
}

// Then the user is level 6 or above and can select their ultimate!
else
{
iKeys |= (1<<iSkillCounter);
}

pos += formatex( szMsg[pos], charsmax(szMsg)-pos, "^n\y %d. %L: %s\w", iSkillCounter+1, LANG_PLAYER, "WORD_ULTIMATE", szSkillName );
}
}

iSkillCounter++;
iSkillID = SM_GetSkillByPos( idUser, iSkillCounter );
}

// Add the cancel button to the menu
pos += formatex( szMsg[pos], charsmax(szMsg)-pos, "^n^n\d0. %L", LANG_PLAYER, "WORD_CANCEL" );

// Show the menu!
show_menu( idUser, iKeys, szMsg, -1 );

return;
}

Скрин как должно получиться:


Источник:perfect-soft.su
  • Страница 1 из 1
  • 1
Поиск:

Используются технологии uCoz