搜索
查看: 1637|回复: 0

帮忙改一下,先谢谢了

[复制链接]
发表于 2008-9-17 23:07:29 | 显示全部楼层 |阅读模式 来自 中国–广东–深圳–福田区
我想下面的字体改成红色如何改啊
"* 当剩下你和敌方两人时, 你可以用小刀砍三次墙壁来邀请对方小刀决斗.
现在是黄色的....
先谢谢了......



#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[ALLOWED_WEAPONS] = {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[33]
// 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[PIRATE] >= 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[PIRATE] = 0
}
else
set_task(1.0, "decreaseChallenges", PIRATE)
//client_print(PIRATE, print_chat, "Your challenges: %d", g_challenges[PIRATE])
return FMRES_IGNORED
}
public decreaseChallenges(id) {
if (--g_challenges[id] < 0)
g_challenges[id] = 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[32], challenged_name[32]
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[1024], 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[32], challenged_name[32]
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[32], challenged_name[32]

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注个册吧

×
游客
回复
您需要登录后才可以回帖 登录 | 注个册吧

快速回复 返回顶部 返回列表