.SMA teksto keitimo spalva
Posted: 2019 Feb 24 22:28
Sveiki, kaip .SMA faile pakeisti spalvą ? Tarkim tekstas - "Restartavai savo rezultatus" kaip pakeisti spalvą jog būtų tarkim žalia? pačiame žaidime.
print_color(0, "!gzalia");
Code: Select all
stock print_color(const id, const input[], any:...){ new Count = 1, Players[MAX_PLAYERS]; static Msg[260]; vformat(Msg, 260, input, 3); replace_all(Msg, 260, "!g", "^4"); replace_all(Msg, 260, "!y", "^1"); replace_all(Msg, 260, "!t", "^3"); if(id) Players[0] = id; else get_players(Players, Count, "ch"); { for(new i = 0; i < Count; i++) { if(is_user_connected(Players[i])) { message_begin(MSG_ONE, get_user_msgid("SayText"), _, Players[i]); write_byte(Players[i]); write_string(Msg); message_end(); } } } return PLUGIN_HANDLED;}
Code: Select all
client_print_color(id, print_team_default, "^4Restartavai savo rezultatą.")