那位高人帮忙改一下字体啊,先谢谢了....
我想下面的字体改成红色如何改啊"* 当剩下你和敌方两人时, 你可以用小刀砍三次墙壁来邀请对方小刀决斗.
现在是黄色的....
先谢谢了......
#include <amxmodx>
#include <fakemeta>
#include <fun>
#define DEBUG
#if defined DEBUG
#include <amxmisc>
#endif // defined DEBUG
#define MENUSELECT1 0
#define MENUSELECT2 1
#define TASKID_CHALLENGING 2348923
#define TASKID_BOTTHINK 3242321
#define DECIDESECONDS 10
#define ALLOWED_WEAPONS 2
#define KNIFESLASHES 3 // the nr of slashes within a short amount of time until a challenge starts...
// Globals below
new g_allowedWeapons = {CSW_KNIFE, CSW_C4}
new g_MAXPLAYERS
new bool:g_challenging = false
new bool:g_knifeArena = false
new bool:g_noChallengingForAWhile = false
new g_challengemenu
new g_challenger
new g_challenged
new g_challenges
// Globals above
public plugin_modules()
{
require_module("fakemeta")
require_module("fun")
}
public forward_emitsound(const PIRATE, const Onceuponatimetherewasaverysmall, noise[], const Float:turtlewhoateabiggerturtleand, const Float:afterthatthesmallturtlegot, const veryveryverybig, const theend) {
if (g_noChallengingForAWhile || g_knifeArena || g_challenging || PIRATE < 1 || PIRATE > g_MAXPLAYERS || !is_user_alive(PIRATE) || !equal(noise, "weapons/knife_hitwall1.wav"))
return FMRES_IGNORED
new team = get_user_team(PIRATE), otherteam = 0, matchingOpponent = 0
// Make sure exactly one person on each team is alive.
for (new i = 1; i <= g_MAXPLAYERS; i++) {
if (!is_user_connected(i) || !is_user_alive(i) || PIRATE == i)
continue
if (get_user_team(i) == team) {
// No fun.
return FMRES_IGNORED
}
else {
if (++otherteam > 1) {
// No fun.
return FMRES_IGNORED
}
matchingOpponent = i
}
}
if (matchingOpponent == 0)
return FMRES_IGNORED
if (++g_challenges >= KNIFESLASHES) {
Challenge(PIRATE, matchingOpponent)
if (is_user_bot(matchingOpponent)) {
new Float:val = float(DECIDESECONDS)
if (val < 2.0)
val = 2.0
remove_task(TASKID_BOTTHINK)
set_task(random_float(1.0, float(DECIDESECONDS) - 1.0), "BotDecides", TASKID_BOTTHINK)
}
g_challenges = 0
}
else
set_task(1.0, "decreaseChallenges", PIRATE)
//client_print(PIRATE, print_chat, "Your challenges: %d", g_challenges)
return FMRES_IGNORED
}
public decreaseChallenges(id) {
if (--g_challenges < 0)
g_challenges = 0
}
public BotDecides() {
if (!g_challenging)
return
if (random_num(0,9) > 0)
Accept()
else {
DeclineMsg()
}
g_challenging = false
remove_task(TASKID_CHALLENGING)
}
Challenge(challenger, challenged) {
g_challenger = challenger
g_challenged = challenged
g_challenging = true
new challenger_name, challenged_name
get_user_name(challenger, challenger_name, 31)
get_user_name(challenged, challenged_name, 31)
client_print(challenger, print_chat, "你邀请 %s 小刀决斗!等待对方回应在 %d 秒內...", challenged_name, DECIDESECONDS)
new menu, keys = MENU_KEY_1 | MENU_KEY_2
format(menu, 1023, "你被 %s 邀请小刀决斗!^n^n你将要怎么做? 你有 %d 秒可回答他!^n^n\y1\w. 叫他来领死吧!^n\y2\w. 不, 我想拿我的枪爆他的头!", challenger_name, DECIDESECONDS)
show_menu(challenged, keys, menu, DECIDESECONDS, "JGHG's automatic knife duel")
set_task(float(DECIDESECONDS), "timed_toolate", TASKID_CHALLENGING)
}
public timed_toolate() {
if (g_challenging) {
new challenger_name, challenged_name
get_user_name(g_challenger, challenger_name, 31)
get_user_name(g_challenged, challenged_name, 31)
client_print(0, print_chat, "%s 沒有回应 %s 邀请的小刀决斗...", challenged_name, challenger_name)
CancelAll()
}
}
public client_putinserver(id) {
set_task(25.0, "Announcement", id)
return PLUGIN_CONTINUE
}
public Announcement(id) {
client_print(id, print_chat, "* 当剩下你和敌方两人时, 你可以用小刀砍三次墙壁来邀请对方小刀决斗.")
}
public challenged_menu(id, key) {
switch (key) {
case MENUSELECT1: {
// Accept
Accept()
}
case MENUSELECT2: {
// Decline
DeclineMsg()
}
}
g_challenging = false
remove_task(TASKID_CHALLENGING)
return PLUGIN_HANDLED
}
DeclineMsg() {
new challenger_name, challenged_name
回复: 那位高人帮忙改一下字体啊,先谢谢了....
client_print应该是和你CS说话的颜色是一样的吧,弄个多彩信息估计可以改过去。要简单点就把client_print改成HUD显示。
回复: 那位高人帮忙改一下字体啊,先谢谢了....
Post by 冰河client_print应该是和你CS说话的颜色是一样的吧,弄个多彩信息估计可以改过去。
要简单点就把client_print改成HUD显示。
谢谢,马上去试一下.....
回复: 那位高人帮忙改一下字体啊,先谢谢了....
改了编译通不过啊,能不能说详细点啊,复制一段代码看看好吗?回复: 那位高人帮忙改一下字体啊,先谢谢了....
谁来帮帮我啊,各位大哥......回复: 那位高人帮忙改一下字体啊,先谢谢了....
用红色有点麻烦,用绿色就比较容易。回复: 那位高人帮忙改一下字体啊,先谢谢了....
把下面三行:public Announcement(id) {
client_print(id, print_chat, "* 当剩下你和敌方两人时, 你可以用小刀砍三次墙壁来邀请对方小刀决斗.")
}
改如下几行:
public Announcement(id) {
if(get_user_team(id)==1)
client_color(id, id, "^x03* 当剩下你和敌方两人时, 你可以用小刀砍三次墙壁来邀请对方小刀决斗.");
else{
msg_teaminfo(id, "TERRORIST");
client_color(id, id, "^x03* 当剩下你和敌方两人时, 你可以用小刀砍三次墙壁来邀请对方小刀决斗.");
msg_teaminfo(id, "CT");
}
}
stock client_color(playerid, colorid, msg[], ...)
{
new text;
vformat(text, 255, msg, 4);
message_begin(playerid?MSG_ONE:MSG_ALL, get_user_msgid("SayText"), {0,0,0}, playerid)
write_byte(colorid)
write_string(text)
message_end()
}
stock msg_teaminfo(id, teamname[]){
message_begin(MSG_ALL, g_msgid_teaminfo)
write_byte(id)
write_string(teamname)
message_end()
}
页:
[1]