Правила форума Гаранты форума
Размещение рекламы AMX-X компилятор

Здравствуйте, гость Вход | Регистрация

Наши новости:

14-дек
24-апр
10-апр
11-апр

2 страниц V   1 2

( XP.INL ) war3ft

[РЕШЕНО]
Статус пользователя $@NyA
сообщение 25.7.2017, 23:55
Сообщение #1


Иконка группы

Стаж: 18 лет

Сообщений: 987
Благодарностей: 529
Полезность: 1050

Подскажите как в етом коде поставить 2 цвета.

Код
#if AMXX_VERSION_NUM < 183
ColorChat(0, RED, "^4%L", LANG_PLAYER, "AWARD_FOR_SPAWNING_WITH_BOMB",g_MODclient, iBonusXP);
#else
client_print_color(0, print_team_red, "^4%L", LANG_PLAYER, "AWARD_FOR_SPAWNING_WITH_BOMB",g_MODclient, iBonusXP);
#endif


При етом значении отображаеться строка полностью зелёным цветом
*[WAR3FT] Вы награждены 20 XP за появление с бомбой.

А мне нужно так

*[WAR3FT] Вы награждены 20 XP за появление с бомбой.

Можно вместо  "AWARD_FOR_SPAWNING_WITH_BOMB" написать по русски и добавить в начале "^3" и будет всё ок,но при сохранении UTF 8 без БУМ отображаються в игре иероглифы.А если поставить так - "^3AWARD_FOR_SPAWNING_WITH_BOMB" толку ноль...

Может как-то подругому можна ведь сделать.

Спасибо Всем за помощь и внимание.


МультиМод CS
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   Цитировать сообщение
Статус пользователя dehost
сообщение 26.7.2017, 0:01
Сообщение #2


Стаж: 14 лет

Сообщений: 3147
Благодарностей: 1431
Полезность: 486

$@NyA,
весь код покажи


Золотое правило нравственности:
"Относись к людям так, как хочешь, чтобы относились к тебе."
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя $@NyA
сообщение 26.7.2017, 0:09
Сообщение #3


Иконка группы

Стаж: 18 лет

Сообщений: 987
Благодарностей: 529
Полезность: 1050

Код
    // Spawned with the bomb
    if (equal(sAction,"Spawned_With_The_Bomb"))
    {
        g_iPlayerRole[id] = PLR_BOMB_CARRIER;
        new iBonusXP = XP_Give( id, SPAWN_BOMB );

        if ( iBonusXP != 0 && get_pcvar_num( CVAR_wc3_show_objectives ) )
        {
#if AMXX_VERSION_NUM < 183
ColorChat(0, RED, "^4%L", LANG_PLAYER, "AWARD_FOR_SPAWNING_WITH_BOMB",g_MODclient, iBonusXP);
#else
client_print_color(0, print_team_red, "^4%L", LANG_PLAYER, "AWARD_FOR_SPAWNING_WITH_BOMB",g_MODclient, iBonusXP);
#endif
                //client_print(id,print_chat,"%L", LANG_PLAYER, "AWARD_FOR_SPAWNING_WITH_BOMB",g_MODclient, iBonusXP);        
            //client_print( id, print_chat, "%s You have been awarded %d XP for spawning with the bomb", g_MODclient, iBonusXP );
        }
    }


Там где //client_print - то было стандартное оригинальное значение.

Если нужен полностью XP.inl
Cкрытый текст
/*ґЇ`·.ёё.ґЇ`·.ёё.ґЇ`·.ёё.ґЇ`·.ёё.ґЇ`·.ёё.ґЇ`·.ёё.ґЇ`·.ёё.ґЇ`·.ёё.ґЇ`·.ёё.ґЇ`·.ёё.ґЇ`·.ёё.
* XP Functions
ґЇ`·.ёё.ґЇ`·.ёё.ґЇ`·.ёё.ґЇ`·.ёё.ґЇ`·.ёё.ґЇ`·.ёё.ґЇ`·.ёё.ґЇ`·.ёё.ґЇ`·.ёё.ґЇ`·.ёё.ґЇ`·.ёё.*/

#define XP_NEARBY_RADIUS 250

// START FROM CSX.INC - This is a hack b/c we can't include CSX and DODX in the same plugin :/
forward bomb_planting(planter);
forward bomb_planted(planter);
forward bomb_defusing(defuser);
forward bomb_defused(defuser);
// END FROM CSX.INC

// Called when a user begins defusing the bomb
public bomb_defusing( defuser )
{
if ( !WC3_Check() )
{
return;
}

// Make sure that this isn't called more than once per round
if ( !bHasBegunPlantingOrDefusing[defuser] )
{
new iBonusXP = XP_Give( defuser, DEFUSING_BOMB );

if ( iBonusXP != 0 )
{
client_print(defuser,print_chat,"%L", LANG_PLAYER, "AWARD_FOR_DEFUSING_BOMB",g_MODclient, iBonusXP);
//client_print( defuser, print_chat, "%s You have been awarded %d XP for starting to defuse the bomb", g_MODclient, iBonusXP );
}
}

bHasBegunPlantingOrDefusing[defuser] = true;
}

// Called when a user defuses the bomb
public bomb_defused( defuser )
{
if ( !WC3_Check() )
{
return;
}

new iBonusXP = XP_Give( defuser, DEFUSED_BOMB );

if ( iBonusXP != 0 )
{
client_print(defuser,print_chat,"%L", LANG_PLAYER, "AWARD_FOR_DEFUSED_BOMB",g_MODclient, iBonusXP);
//client_print( defuser, print_chat, "%s You have been awarded %d XP for defusing the bomb", g_MODclient, iBonusXP );
}

g_iPlayerRole[defuser] = 0;
}

// Called when a user begins planting the bomb
public bomb_planting( planter )
{
if ( !WC3_Check() )
{
return;
}

// Make sure that this isn't called more than once per round
if ( !bHasBegunPlantingOrDefusing[planter] )
{
new iBonusXP = XP_Give( planter, PLANTING_BOMB );

if ( iBonusXP != 0 )
{
client_print(planter,print_chat,"%L", LANG_PLAYER, "AWARD_FOR_PLANTING_BOMB",g_MODclient, iBonusXP);
//client_print( planter, print_chat, "%s You have been awarded %d XP for starting to plant the bomb", g_MODclient, iBonusXP );
}
}

g_iPlayerRole[planter] = PLR_BOMB_PLANTER;
bHasBegunPlantingOrDefusing[planter] = true;
}

// Called when a user has planted the bomb
public bomb_planted( planter )
{
if ( !WC3_Check() )
{
return;
}

new iBonusXP = XP_Give( planter, PLANT_BOMB );

if ( iBonusXP != 0 )
{
client_print(planter,print_chat,"%L", LANG_PLAYER, "AWARD_FOR_PLANTED_BOMB",g_MODclient, iBonusXP);
// client_print( planter, print_chat, "%s You have been awarded %d XP for planting the bomb", g_MODclient, iBonusXP );
}

g_iPlayerRole[planter] = 0;
p_data_b[planter][PB_ISPLANTING] = false;
}

// Called on certain player events
public on_PlayerAction()
{
if ( !WC3_Check() )
{
return;
}

new sArg[64], sAction[64], sName[64];
new iUserId, id;

read_logargv( 0,sArg,64 );
read_logargv( 2,sAction,64 );
parse_loguser( sArg,sName,64,iUserId );
id = find_player( "k", iUserId );

if ( id == 0 )
{
return;
}


// Spawned with the bomb
if (equal(sAction,"Spawned_With_The_Bomb"))
{
g_iPlayerRole[id] = PLR_BOMB_CARRIER;
new iBonusXP = XP_Give( id, SPAWN_BOMB );

if ( iBonusXP != 0 && get_pcvar_num( CVAR_wc3_show_objectives ) )
{
client_print(id,print_chat,"%L", LANG_PLAYER, "AWARD_FOR_SPAWNING_WITH_BOMB",g_MODclient, iBonusXP);
//client_print( id, print_chat, "%s You have been awarded %d XP for spawning with the bomb", g_MODclient, iBonusXP );
}
}
// Dropped bomb
else if (equal(sAction,"Dropped_The_Bomb"))
{
g_iPlayerRole[id] = 0;
new iBonusXP = XP_Give( id, -1 * BOMB_PICKUP );

if ( iBonusXP != 0 && get_pcvar_num( CVAR_wc3_show_objectives ) )
{
client_print(id,print_chat,"%L", LANG_PLAYER, "AWARD_FOR_LOST_BOMB",g_MODclient, iBonusXP);
//client_print( id, print_chat, "%s You have lost %d XP for dropping the bomb", g_MODclient, -1 * iBonusXP );
}
}
// Picked up bomb
else if (equal(sAction,"Got_The_Bomb"))
{
g_iPlayerRole[id] = PLR_BOMB_CARRIER;
new iBonusXP = XP_Give( id, BOMB_PICKUP );

if ( iBonusXP != 0 && get_pcvar_num( CVAR_wc3_show_objectives ) )
{
client_print(id,print_chat,"%L", LANG_PLAYER, "AWARD_FOR_PICKING_UP_BOMB",g_MODclient, iBonusXP);
// client_print( id, print_chat, "%s You have been awarded %d XP for picking up the bomb", g_MODclient, iBonusXP );
}
}
// Hostage touched
else if (equal(sAction,"Touched_A_Hostage"))
{
g_iPlayerRole[id] = PLR_HOSTAGE_RESCUER;
new iBonusXP = XP_Give( id, TOUCH_HOSTAGE );

if ( iBonusXP != 0 && get_pcvar_num( CVAR_wc3_show_objectives ) )
{
client_print(id,print_chat,"%L", LANG_PLAYER, "AWARD_FOR_BEGINNING_HOSTAGE_RESCUE",g_MODclient, iBonusXP);
//client_print( id, print_chat, "%s You have been awarded %d XP for starting to rescue a hostage", g_MODclient, iBonusXP );
}
}
// Hostage rescued
else if (equal(sAction,"Rescued_A_Hostage"))
{
new iBonusXP = XP_Give( id, RESCUE_HOSTAGE );

if ( iBonusXP != 0 && get_pcvar_num( CVAR_wc3_show_objectives ) )
{
client_print(id,print_chat,"%L", LANG_PLAYER, "AWARD_FOR_RESCUING_HOSTAGE",g_MODclient, iBonusXP);
// client_print( id, print_chat, "%s You have been awarded %d XP for rescuing a hostage", g_MODclient, iBonusXP );
}
}
// Hostage killed
else if (equal(sAction,"Killed_A_Hostage"))
{
new iBonusXP = XP_Give( id, -1 * KILL_HOSTAGE );

if ( iBonusXP != 0 && get_pcvar_num( CVAR_wc3_show_objectives ) )
{
client_print(id,print_chat,"%L", LANG_PLAYER, "AWARD_FOR_KILLING_HOSTAGE",g_MODclient, iBonusXP);
//client_print( id, print_chat, "%s You have lost %d XP for killing a hostage", g_MODclient, -1 * iBonusXP );
}
}
// VIP spawn
else if (equal(sAction,"Became_VIP"))
{
g_iPlayerRole[id] = PLR_VIP;
new iBonusXP = XP_Give( id, SPAWN_VIP );

if ( iBonusXP != 0 && get_pcvar_num( CVAR_wc3_show_objectives ) )
{
client_print(id,print_chat,"%L", LANG_PLAYER, "AWARD_FOR_SPAWN_AS_VIP",g_MODclient, iBonusXP);
//client_print( id, print_chat, "%s You have gained %d XP for spawning as the VIP", g_MODclient, iBonusXP );
}
}
// VIP escaped
else if (equal(sAction,"Escaped_As_VIP"))
{
new iBonusXP = XP_Give( id, ESCAPE_VIP );

if ( iBonusXP != 0 && get_pcvar_num( CVAR_wc3_show_objectives ) )
{
client_print(id,print_chat,"%L", LANG_PLAYER, "AWARD_FOR_ESCAPED_VIP",g_MODclient, iBonusXP);
//client_print( id, print_chat, "%s You have gained %d XP for escaping as the VIP", g_MODclient, iBonusXP );
}
}
}

XP_onDeath( iVictim, iAttacker, iWeaponIndex, iHeadshot )
{

// We don't want to give XP to the world
if ( iAttacker == 0 )
{
return;
}

// We don't want to give XP to suiciders
else if ( iAttacker == iVictim )
{
return;
}

new iLevel = p_data[iVictim][P_LEVEL]
new iBonusXP, iXP = floatround( XP_GivenByLevel( iLevel ) * fWpnXPMultiplier[iWeaponIndex] );

// Check for a team kill
if ( get_user_team( iAttacker ) == get_user_team( iVictim ) )
{
// Remove XP since he killed his teammate
iBonusXP = XP_Give( iAttacker, -1 * iXP );

// This message should be displayed no matter what XP_kill_objectives is, b/c it's a no-no
if ( iBonusXP != 0 )
{
client_print(iAttacker,print_chat,"%L", LANG_PLAYER, "AWARD_FOR_TEAM_KILL",g_MODclient, iBonusXP);
//client_print( iAttacker, print_chat, "%s You have lost %d XP for killing a teammate", g_MODclient, -1 * iBonusXP );
}

}

// Otherwise the player killed the other team
else
{
// Award XP for a kill
iBonusXP = XP_Give( iAttacker, iXP );

if ( iBonusXP != 0 && get_pcvar_num( CVAR_wc3_show_kill_obj ) )
{
client_print(iAttacker,print_chat,"%L", LANG_PLAYER, "AWARD_FOR_ENEMY_KILL",g_MODclient, iBonusXP);
//client_print( iAttacker, print_chat, "%s You have been awarded %d XP for killing the enemy", g_MODclient, iBonusXP );
}

// User had a headshot? Give bonus XP!
if ( iHeadshot )
{
iBonusXP = XP_Give( iAttacker, KILL_HEADSHOT );

if ( iBonusXP != 0 && get_pcvar_num( CVAR_wc3_show_kill_obj ) )
{
client_print(iAttacker,print_chat,"%L", LANG_PLAYER, "AWARD_FOR_KILL_HEADSHOT",g_MODclient, iBonusXP);
//client_print( iAttacker, print_chat, "%s You have been awarded %d XP for getting a headshot", g_MODclient, iBonusXP );
}
}

new iAssistLevel, iAssistXP, iVictimMaxHealth;
new Float:fMultiplier;

// Award XP for other people doing damage to this victim
for ( new i = 0; i < MAXPLAYERS; i++ )
{
// Then this player dealt some damage to this player this round
if ( g_iDamageDealt[i][iVictim] > 0 && iAttacker != i )
{
iVictimMaxHealth = get_user_maxhealth( iVictim );
fMultiplier = float( g_iDamageDealt[i][iVictim] ) / float( iVictimMaxHealth );

iAssistLevel = p_data[i][P_LEVEL];
iAssistXP = XP_GivenByLevel( iAssistLevel );

// Need a ratio of XP to award to person who dealt damage
iBonusXP = XP_Give( i, ( floatround( float( iAssistXP ) * fMultiplier ) / 2 ) );

if ( iBonusXP != 0 && get_pcvar_num( CVAR_wc3_show_kill_obj ) )
{
client_print(iAttacker,print_chat,"%L", LANG_PLAYER, "AWARD_FOR_KILL_ASSIST",g_MODclient, iBonusXP);
//client_print( i, print_chat, "%s You have been awarded %d XP for a kill assist!", g_MODclient, iBonusXP );
}
}
}

if ( g_MOD == GAME_CSTRIKE || g_MOD == GAME_CZERO )
{

// User killed a hostage rescuer
if ( g_iPlayerRole[iVictim] == PLR_HOSTAGE_RESCUER )
{
iBonusXP = XP_Give( iAttacker, KILL_HOSTAGE_SAVER );

if ( iBonusXP != 0 && get_pcvar_num( CVAR_wc3_show_kill_obj ) )
{
client_print(iAttacker,print_chat,"%L", LANG_PLAYER, "AWARD_FOR_KILL_HOSTAGE_RESCUER",g_MODclient, iBonusXP);
//client_print( iAttacker, print_chat, "%s You have been awarded %d XP for killing the hostage rescuer", g_MODclient, iBonusXP );
}
}
// User killed the bomb defuser
else if ( g_iPlayerRole[iVictim] == PLR_BOMB_DEFUSER )
{
iBonusXP = XP_Give( iAttacker, KILL_DEFUSER );

if ( iBonusXP != 0 && get_pcvar_num( CVAR_wc3_show_kill_obj ) )
{
client_print( iAttacker, print_chat, "%s You have been awarded %d XP for killing the bomb defuser", g_MODclient, iBonusXP );
}
}
// User killed the bomb planter
else if ( g_iPlayerRole[iVictim] == PLR_BOMB_PLANTER )
{
iBonusXP = XP_Give( iAttacker, KILL_PLANTER );

if ( iBonusXP != 0 && get_pcvar_num( CVAR_wc3_show_kill_obj ) )
{
client_print(iAttacker,print_chat,"%L", LANG_PLAYER, "AWARD_FOR_KILL_PLANTER",g_MODclient, iBonusXP);
//client_print( iAttacker, print_chat, "%s You have been awarded %d XP for killing the bomb planter", g_MODclient, iBonusXP );
}
}
// User killed the bomb carrier
else if ( g_iPlayerRole[iVictim] == PLR_BOMB_CARRIER )
{
iBonusXP = XP_Give( iAttacker, KILL_BOMB_CARRIER );

if ( iBonusXP != 0 && get_pcvar_num( CVAR_wc3_show_kill_obj ) )
{
client_print(iAttacker,print_chat,"%L", LANG_PLAYER, "AWARD_FOR_KILL_BOMB_CARRIER",g_MODclient, iBonusXP);
//client_print( iAttacker, print_chat, "%s You have been awarded %d XP for killing the bomb carrier", g_MODclient, iBonusXP );
}
}
// user killed the VIP
else if ( g_iPlayerRole[iVictim] == PLR_VIP )
{
iBonusXP = XP_Give( iAttacker, KILL_VIP );

if ( iBonusXP != 0 && get_pcvar_num( CVAR_wc3_show_objectives ) )
{
client_print(iAttacker,print_chat,"%L", LANG_PLAYER, "AWARD_FOR_KILL_VIP",g_MODclient, iBonusXP);
//client_print( iAttacker, print_chat, "%s You have been awarded %d XP for killing the VIP", g_MODclient, iBonusXP );
}
}
}


else if ( g_MOD == GAME_DOD )
{


}

// Player died, so lets reset their data
g_iPlayerRole[iVictim] = 0;
}
}


XP_WinRound( iWinner )
{

new players[32], numberofplayers, i, id;
get_players( players, numberofplayers );

for ( i = 0; i < numberofplayers; i++ )
{
id = players[i];

// Is the user on the correct team?
if ( get_user_team( id ) == iWinner )
{

new iBonusXP = XP_Give( id, WIN_ROUND );

if ( get_pcvar_num( CVAR_wc3_show_objectives ) )
{
client_print( id,print_chat,"%L", LANG_PLAYER, "AWARD_FOR_WINNING_ROUND",g_MODclient, iBonusXP);
//client_print( id, print_chat, "%L", g_MODclient, id, "AWARD_FOR_WINNING_ROUND", iBonusXP );
}
}
}
}

XP_GivenByLevel( iLevel )
{
if ( iLevel < 0 || iLevel > 10 )
{
return 0;
}

return xpgiven[iLevel];
}

bool:XP_MinPlayers()
{
if ( get_playersnum() < get_pcvar_num( CVAR_wc3_min_players ) )
{
return false;
}

return true;
}

// Function will verify if the user's level/information is correct and checks to see if the user has gained a level
XP_Check( id, bShowGained = true )
{
new iOldLevel = p_data[id][P_LEVEL], i;

// Make sure the user doesn't have negative experience
if ( p_data[id][P_XP] < 0 )
{
p_data[id][P_XP] = 0;
}

// Determine what the user's level should be
for ( i = 0; i <= MAX_LEVELS; i++ )
{
// User has enough XP to advance to the next level
if ( p_data[id][P_XP] >= xplevel[i] )
{
p_data[id][P_LEVEL] = i;
}

// On this increment the user doesn't have enough XP to advance to the next level
else
{
break;
}
}

// User gained a level
if ( p_data[id][P_LEVEL] > iOldLevel && p_data[id][P_RACE] != 0 && bShowGained )
{
WC3_StatusText( id, TXT_TOP_CENTER, "%L", id, "YOU_GAINED_A_LEVEL" );

// Only play the sound if the user is alived!!
if ( is_user_alive( id ) )
{
emit_sound( id, CHAN_STATIC, g_szSounds[SOUND_LEVELUP], 1.0, ATTN_NORM, 0, PITCH_NORM );
}
}

// We might need to lower the skills the user has ( can occur if you load XP info from a database and the XP multiplier has changed )
new iSkillsUsed = SM_TotalSkillPointsUsed( id );
new iSkillID, iSkillLevel;
new bool:bSkillRemoved = false;

while ( iSkillsUsed > p_data[id][P_LEVEL] )
{
// We might need to remove the ult first!
if ( p_data[id][P_LEVEL] < MIN_ULT_LEVEL )
{
new iUltimateID = SM_GetSkillOfType( id, SKILL_TYPE_ULTIMATE );

// Then we need to remove this!
if ( SM_GetSkillLevel( id, iUltimateID ) == 1 )
{
// Remove the ult
SM_SetSkillLevel( id, iUltimateID, 0 );

bSkillRemoved = true;

// Clear ult icon!
ULT_ClearIcons( id );

// Get our current skills used
iSkillsUsed = SM_TotalSkillPointsUsed( id );

// Restart the loop!
continue;
}
}

iSkillID = SM_GetRandomSkill( id );
iSkillLevel = SM_GetSkillLevel( id, iSkillID );

// We don't want a passive skill or a skill that is level 0 so keep trying
while ( SM_GetSkillType( iSkillID ) == SKILL_TYPE_PASSIVE || iSkillLevel == 0 )
{
iSkillLevel = SM_GetSkillLevel( id, iSkillID );
iSkillID = SM_GetRandomSkill( id );
}

// OK at this point we have a valid skill, lets remove a level!
SM_SetSkillLevel( id, iSkillID, iSkillLevel - 1 );

bSkillRemoved = true;

// Get our current skills used
iSkillsUsed = SM_TotalSkillPointsUsed( id );
}

// Need to reset all skill data for the given race if we've removed a skill
if ( bSkillRemoved )
{
WC3_InitPlayerSkills( id );
}

// OK lets check the total skills the user has, and maybe show them the selectskills menu
new iTotalSkillsUsed = SM_TotalSkillPointsUsed( id );

if ( iTotalSkillsUsed < p_data[id][P_LEVEL] )
{
MENU_SelectSkill( id );
}

WC3_ShowBar( id );
}

XP_Configure()
{

// If we're saving XP, we want to set the max. amount of XP higher and the amount gained per kill/objective lower
if ( get_pcvar_num( CVAR_wc3_save_xp ) )
{
xpgiven = {6,8,10,12,14,16,18,20,24,28,32};
xplevel = {0,100,200,400,800,1600,3200,6400,12800,25600,51200};
}

// Set the XP multiplier
new i, Float:fXPMult = get_pcvar_float( CVAR_wc3_xp_multiplier );

for ( i = 0; i < 11; i++ )
{
xplevel[i] = floatround( xplevel[i] * fXPMult );
}

// Configure based on weapon multiplier

// Counter-Strike and Condition Zero weapons
if ( g_MOD == GAME_CSTRIKE || g_MOD == GAME_CZERO )
{
fWpnXPMultiplier[CSW_USP ] = 2.5;
fWpnXPMultiplier[CSW_DEAGLE ] = 2.5;
fWpnXPMultiplier[CSW_GLOCK18 ] = 2.5;
fWpnXPMultiplier[CSW_ELITE ] = 3.5;
fWpnXPMultiplier[CSW_P228 ] = 2.5;
fWpnXPMultiplier[CSW_FIVESEVEN ] = 2.5;

fWpnXPMultiplier[CSW_XM1014 ] = 1.25;
fWpnXPMultiplier[CSW_M3 ] = 1.5;

fWpnXPMultiplier[CSW_MP5NAVY ] = 1.0;
fWpnXPMultiplier[CSW_UMP45 ] = 1.25;
fWpnXPMultiplier[CSW_P90 ] = 1.25;
fWpnXPMultiplier[CSW_TMP ] = 1.5;
fWpnXPMultiplier[CSW_MAC10 ] = 1.5;
fWpnXPMultiplier[CSW_GALIL ] = 1.15;
fWpnXPMultiplier[CSW_FAMAS ] = 1.15;

fWpnXPMultiplier[CSW_AWP ] = 1.0;
fWpnXPMultiplier[CSW_M4A1 ] = 1.0;
fWpnXPMultiplier[CSW_AK47 ] = 1.0;
fWpnXPMultiplier[CSW_AUG ] = 1.0;
fWpnXPMultiplier[CSW_SG552 ] = 1.0;
fWpnXPMultiplier[CSW_G3SG1 ] = 1.0;
fWpnXPMultiplier[CSW_SG550 ] = 1.0;
fWpnXPMultiplier[CSW_M249 ] = 1.25;
fWpnXPMultiplier[CSW_SCOUT ] = 3.0;

fWpnXPMultiplier[CSW_HEGRENADE ] = 1.75;
fWpnXPMultiplier[CSW_KNIFE ] = 6.0;

fWpnXPMultiplier[CSW_C4 ] = 2.0;
fWpnXPMultiplier[CSW_SMOKEGRENADE ] = 1.0;
fWpnXPMultiplier[CSW_FLASHBANG ] = 1.0;
}

// Day of Defeat weapons
else if ( g_MOD == GAME_DOD )
{
fWpnXPMultiplier[DODW_AMERKNIFE ] = 6.0;
fWpnXPMultiplier[DODW_GERKNIFE ] = 6.0;
fWpnXPMultiplier[DODW_BRITKNIFE ] = 6.0;
fWpnXPMultiplier[DODW_GARAND_BUTT ] = 6.0;

fWpnXPMultiplier[DODW_HANDGRENADE ] = 1.75;
fWpnXPMultiplier[DODW_STICKGRENADE ] = 1.75;
fWpnXPMultiplier[DODW_STICKGRENADE_EX ] = 1.75;
fWpnXPMultiplier[DODW_HANDGRENADE_EX ] = 1.75;

fWpnXPMultiplier[DODW_COLT ] = 1.0;
fWpnXPMultiplier[DODW_LUGER ] = 1.0;
fWpnXPMultiplier[DODW_GARAND ] = 1.0;
fWpnXPMultiplier[DODW_SCOPED_KAR ] = 1.0;
fWpnXPMultiplier[DODW_THOMPSON ] = 1.0;
fWpnXPMultiplier[DODW_STG44 ] = 1.0;
fWpnXPMultiplier[DODW_SPRINGFIELD ] = 1.0;
fWpnXPMultiplier[DODW_KAR ] = 1.0;
fWpnXPMultiplier[DODW_BAR ] = 1.0;
fWpnXPMultiplier[DODW_MP40 ] = 1.0;
fWpnXPMultiplier[DODW_MG42 ] = 1.0;
fWpnXPMultiplier[DODW_30_CAL ] = 1.0;
fWpnXPMultiplier[DODW_SPADE ] = 1.0;
fWpnXPMultiplier[DODW_M1_CARBINE ] = 1.0;
fWpnXPMultiplier[DODW_MG34 ] = 1.0;
fWpnXPMultiplier[DODW_GREASEGUN ] = 1.0;
fWpnXPMultiplier[DODW_FG42 ] = 1.0;
fWpnXPMultiplier[DODW_K43 ] = 1.0;
fWpnXPMultiplier[DODW_ENFIELD ] = 1.0;
fWpnXPMultiplier[DODW_STEN ] = 1.0;
fWpnXPMultiplier[DODW_BREN ] = 1.0;
fWpnXPMultiplier[DODW_WEBLEY ] = 1.0;
fWpnXPMultiplier[DODW_BAZOOKA ] = 1.0;
fWpnXPMultiplier[DODW_PANZERSCHRECK ] = 1.0;
fWpnXPMultiplier[DODW_PIAT ] = 1.0;
fWpnXPMultiplier[DODW_SCOPED_FG42 ] = 1.0;
fWpnXPMultiplier[DODW_FOLDING_CARBINE ] = 1.0;
fWpnXPMultiplier[DODW_KAR_BAYONET ] = 1.0;
fWpnXPMultiplier[DODW_SCOPED_ENFIELD ] = 1.0;
fWpnXPMultiplier[DODW_MILLS_BOMB ] = 1.0;
fWpnXPMultiplier[DODW_ENFIELD_BAYONET ] = 1.0;
fWpnXPMultiplier[DODW_MORTAR ] = 1.0;
fWpnXPMultiplier[DODW_K43_BUTT ] = 1.0;
}

fWpnXPMultiplier[CSW_WORLDSPAWN ] = 0.0;
fWpnXPMultiplier[CSW_LIGHTNING ] = 1.0;
fWpnXPMultiplier[CSW_SUICIDE ] = 1.0;
fWpnXPMultiplier[CSW_IMMOLATE ] = 1.0;
fWpnXPMultiplier[CSW_LOCUSTS ] = 1.0;
fWpnXPMultiplier[CSW_SERPENTWARD ] = 1.0;
fWpnXPMultiplier[CSW_SHADOW ] = 1.0;
fWpnXPMultiplier[CSW_THORNS ] = 1.0;
fWpnXPMultiplier[CSW_CARAPACE ] = 1.0;
fWpnXPMultiplier[CSW_CARRION ] = 1.0;
fWpnXPMultiplier[CSW_ORB ] = 1.0;
fWpnXPMultiplier[CSW_CONCOCTION ] = 1.0;
}

// Reset the user's XP to 0
public XP_Reset(id)
{

DB_SaveXP( id );

p_data[id][P_LEVEL] = 0;
p_data[id][P_XP] = 0;
SM_ResetSkillLevels( id );

WC3_ShowBar( id );

client_print( id, print_chat, "%s %L", g_MODclient, id, "YOUR_XP_HAS_BEEN_RESET" );

// Reset the skills...

SHARED_INVIS_Set( id );

// Undead's Unholy Aura
SHARED_SetGravity( id );

// Set the user's speed
SHARED_SetSpeed( id );

return PLUGIN_CONTINUE;
}

// Function from war3x thanks ryan!!!
public XP_GetAdminFlag()
{

new szFlags[24];
get_pcvar_string( CVAR_wc3_admin_flag, szFlags, 23 );

return ( read_flags( szFlags ) );
}

stock XP_Give( id, iBonusXP )
{

if ( !WC3_Check() || !id )
{
return 0;
}

// Make sure we have the minimum amount of players
if ( !XP_MinPlayers() )
{
return 0;
}

// Bonus calculated by:
// Bonus XP * (lvl of player/10 + 1.0)
// I.E. if Player is level 10, then it will be Bonus XP * 2.0

if ( iBonusXP != 0 )
{
new Float:fCurrentLevel = float( p_data[id][P_LEVEL] );
new Float:iLevelMultiplier = ( fCurrentLevel / 10.0 ) + 1.0;
new iRealBonusXP = floatround(iLevelMultiplier * iBonusXP);

p_data[id][P_XP] += iRealBonusXP;

XP_Check( id );

return iRealBonusXP;
}

return 0;
}


МультиМод CS
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя energydance
сообщение 26.7.2017, 0:36
Сообщение #4


Стаж: 11 лет

Сообщений: 2809
Благодарностей: 740
Полезность: 213

$@NyA,
Цитата
Можно вместо "AWARD_FOR_SPAWNING_WITH_BOMB" написать по русски и добавить в начале "^3" и будет всё ок,но при сохранении UTF 8 без БУМ отображаються в игре иероглифы.А если поставить так - "^3AWARD_FOR_SPAWNING_WITH_BOMB" толку ноль...

Изначально когда открываете код сразу ставьте кодировку в UTF 8 без БУМ только после этого вносите текст и сохраняйте , если лень писать то скопировать куда нибудь текст , затем открыть исходник выбрать кодировку и внести исправный текст затем сохранить


Press enter to exit ...
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя $@NyA
сообщение 26.7.2017, 1:26
Сообщение #5


Иконка группы

Стаж: 18 лет

Сообщений: 987
Благодарностей: 529
Полезность: 1050

energydance, Дело в том что файлы в формате .inl неподдерживают русский язык ( Ни акелпад,ничего непомогает ).Как только я нипробывал : и без бум,и так как Вы говорили...Бестолку.Нужно подключать ещё один ланг в етом исходнике,но какой ето влпрос


МультиМод CS
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя Jack2345
сообщение 26.7.2017, 4:51
Сообщение #6
Стаж: 11 лет
Город: Москва

Сообщений: 277
Благодарностей: 0
Полезность: < 0

все пррсто подумай хорошенько


Success
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя $@NyA
сообщение 26.7.2017, 11:08
Сообщение #7


Иконка группы

Стаж: 18 лет

Сообщений: 987
Благодарностей: 529
Полезность: 1050

Jack2345, Лучшего ответа от тебя я не ждал


МультиМод CS
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
Поблагодарили 1 раз
   + Цитировать сообщение
Статус пользователя energydance
сообщение 26.7.2017, 11:20
Сообщение #8


Стаж: 11 лет

Сообщений: 2809
Благодарностей: 740
Полезность: 213

$@NyA, Прикрепи файлы ini и sma


Press enter to exit ...
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя $@NyA
сообщение 26.7.2017, 12:53
Сообщение #9


Иконка группы

Стаж: 18 лет

Сообщений: 987
Благодарностей: 529
Полезность: 1050

energydance
Прикрепленный файл  war3ft.rar ( 116,1 килобайт ) Кол-во скачиваний: 16


МультиМод CS
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя energydance
сообщение 26.7.2017, 13:11
Сообщение #10


Стаж: 11 лет

Сообщений: 2809
Благодарностей: 740
Полезность: 213

$@NyA, war3FT.txt не хватает еще


Press enter to exit ...
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя $@NyA
сообщение 26.7.2017, 13:16
Сообщение #11


Иконка группы

Стаж: 18 лет

Сообщений: 987
Благодарностей: 529
Полезность: 1050

Прикрепленный файл  war3FT.txt ( 47,9 килобайт ) Кол-во скачиваний: 12


МультиМод CS
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя energydance
сообщение 26.7.2017, 13:18
Сообщение #12


Стаж: 11 лет

Сообщений: 2809
Благодарностей: 740
Полезность: 213

del/

Отредактировал: energydance, - 26.7.2017, 13:29


Press enter to exit ...
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя $@NyA
сообщение 26.7.2017, 13:32
Сообщение #13


Иконка группы

Стаж: 18 лет

Сообщений: 987
Благодарностей: 529
Полезность: 1050

energydance,
Тот код взят что-бы сделать цветными сообщения ===> ColorChat.inc ( я вставил для примера ) > замени в XP.inc вместо етого ( поставь наверх ) //client_print(id,print_chat,"%L", LANG_PLAYER, "AWARD_FOR_SPAWNING_WITH_BOMB",g_MODclient, iBonusXP); и незабудь подключить инклуд колор в XP.inc Посмотри как у тебя будет в игре.Там всё равно будет одним зелёным цветом... и не на русском.

Отредактировал: $@NyA, - 26.7.2017, 13:33


МультиМод CS
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя artist666
сообщение 26.7.2017, 14:40
Сообщение #14


Стаж: 11 лет

Сообщений: 17
Благодарностей: 7
Полезность: 0

Тебе же сказали, в ланге нельзя ставить спец символы, при считывании они идут как текст.

Ставь в ланге
!g
!t

И выложи инклуд, своего колорчата(их до одури).
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя JIuXeP
сообщение 26.7.2017, 16:26
Сообщение #15


Стаж: 12 лет

Сообщений: 338
Благодарностей: 205
Полезность: 792

Если колорчат подключен
war3FT.txt
Код:
AWARD_FOR_SPAWNING_WITH_BOMB = %s Вы награждены %d XP за появление с бомбой.
-->
Код:
AWARD_FOR_SPAWNING_WITH_BOMB = %s ^3Вы награждены %d XP за появление с бомбой.

Сохранить в кодировке utf-8 без BOM


Все. И не надо ничего думать тут.
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя $@NyA
сообщение 26.7.2017, 20:12
Сообщение #16


Иконка группы

Стаж: 18 лет

Сообщений: 987
Благодарностей: 529
Полезность: 1050

JIuXeP,

Если бы всё было бы так просто.В таком порядке как вы написали,отображаеться без цвета и вместе с символом ^3.Я же писал что ланги не видят цветов.Причём нужно в исходнику .inl подключать строку AWARD_FOR_SPAWNING_WITH_BOMB .Но так будет один цвет при наличии "^4%L", LANG_PLAYER, "AWARD_FOR_SPAWNING_WITH_BOMB" .А как на два сделать - без понятия


МультиМод CS
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя Avrora
сообщение 26.7.2017, 21:09
Сообщение #17


Стаж: 13 лет
Город: Санкт-Петербург


Сообщений: 806
Благодарностей: 171
Полезность: 95

Вот держи, пробуй.
Cкрытый текст
Прикрепленный файл  XP.rar ( 4,87 килобайт ) Кол-во скачиваний: 11
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя $@NyA
сообщение 26.7.2017, 21:11
Сообщение #18


Иконка группы

Стаж: 18 лет

Сообщений: 987
Благодарностей: 529
Полезность: 1050

artist666,

Ты думаешь я так непробовал?Оно так и отображает с теми символами.Единственное чего добился,но ето на анг. - на русском никак,при таком значении
Код
ColorChat(0, RED, "^4%s ^3You have been awarded ^4%d XP ^3for spawning with the bomb.",g_MODclient, iBonusXP);
#else
client_print_color(0, print_team_red, "^4%s ^3You have been awarded ^4%d XP ^3for spawning with the bomb.",g_MODclient, iBonusXP);



ColorChat.inc
/* Fun functions
*
* by Numb
*
* This file is provided as is (no warranties).
*/

#if defined _colorchat_included
#endinput
#endif
#define _colorchat_included

enum Color
{
NORMAL = 1, // clients scr_concolor cvar color
GREEN, // Green Color
TEAM_COLOR, // Red, grey, blue
GREY, // grey
RED, // Red
BLUE, // Blue
}

new TeamName[][] =
{
"",
"TERRORIST",
"CT",
"SPECTATOR"
}

ColorChat(id, Color:type, const msg[], {Float,Sql,Result,_}:...)
{
if( !get_playersnum() ) return;

new message[256];

switch(type)
{
case NORMAL: // clients scr_concolor cvar color
{
message[0] = 0x01;
}
case GREEN: // Green
{
message[0] = 0x04;
}
default: // White, Red, Blue
{
message[0] = 0x03;
}
}

vformat(message[1], 251, msg, 4);

// Make sure message is not longer than 192 character. Will crash the server.
message[192] = '^0';

new team, ColorChange, index, MSG_Type;

if(id)
{
MSG_Type = MSG_ONE;
index = id;
} else {
index = FindPlayer();
MSG_Type = MSG_ALL;
}

team = get_user_team(index);
ColorChange = ColorSelection(index, MSG_Type, type);

ShowColorMessage(index, MSG_Type, message);

if(ColorChange)
{
Team_Info(index, MSG_Type, TeamName[team]);
}
}

ShowColorMessage(id, type, message[])
{
static bool:saytext_used;
static get_user_msgid_saytext;
if(!saytext_used)
{
get_user_msgid_saytext = get_user_msgid("SayText");
saytext_used = true;
}
message_begin(type, get_user_msgid_saytext, _, id);
write_byte(id)
write_string(message);
message_end();
}

Team_Info(id, type, team[])
{
static bool:teaminfo_used;
static get_user_msgid_teaminfo;
if(!teaminfo_used)
{
get_user_msgid_teaminfo = get_user_msgid("TeamInfo");
teaminfo_used = true;
}
message_begin(type, get_user_msgid_teaminfo, _, id);
write_byte(id);
write_string(team);
message_end();

return 1;
}

ColorSelection(index, type, Color:Type)
{
switch(Type)
{
case RED:
{
return Team_Info(index, type, TeamName[1]);
}
case BLUE:
{
return Team_Info(index, type, TeamName[2]);
}
case GREY:
{
return Team_Info(index, type, TeamName[0]);
}
}

return 0;
}

FindPlayer()
{
new i = -1;

while(i <= get_maxplayers())
{
if(is_user_connected(++i))
return i;
}

return -1;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/


Отредактировал: $@NyA, - 26.7.2017, 21:17


МультиМод CS
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя $@NyA
сообщение 26.7.2017, 21:24
Сообщение #19


Иконка группы

Стаж: 18 лет

Сообщений: 987
Благодарностей: 529
Полезность: 1050

Avrora,

А уже так пробовал.Ето раньше был приватник от cssb.С ним компиляцыя непроходит,там другая система)


МультиМод CS
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя Avrora
сообщение 26.7.2017, 21:24
Сообщение #20


Стаж: 13 лет
Город: Санкт-Петербург


Сообщений: 806
Благодарностей: 171
Полезность: 95

Цитата($@NyA @ 26.7.2017, 22:24) *
Avrora,

А уже так пробовал.Ето раньше был приватник от cssb.С ним компиляцыя непроходит,там другая система)

Версия мода стандартная?
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
2 страниц V   1 2
 
Ответить в данную темуНачать новую тему
 
0 пользователей и 1 гостей читают эту тему: