|
发表于 2006-12-30 18:24:42
|
显示全部楼层
|阅读模式
来自 中国–广东–佛山
public ramdon_money(params[]){
new killer=params[0]
new oldamount=params[1]
new amount
new killername[32]
new random_range,randomvalue
random_range=(rewardedbig)?BIG_MONEY_INDEX:20//控制大额的奖励不会出现太多次
for(;;){
randomvalue=random(random_range)
amount=rewards[randomvalue]
if (amount!=oldamount) break;
}
get_user_name(killer,killername,31)
if (g_random>0){
g_random--
set_hudmessage(0,255,0,0.05,0.25,0, 0.02, 0.4, 0.01, 0.1, 2)
show_hudmessage(0,"%s一马当先,奋勇杀敌,奖励%6d金钱",killername,amount)
new param[2]
param[0]=killer
param[1]=amount
set_task(0.3,"ramdon_money",0,param,1)
}
else {
if(randomvalue>=BIG_MONEY_INDEX) rewardedbig=1
//set_hudmessage(0,255,0,0.75,0.18,0, 1.0, 5.0, 0.1, 0.2, 1)
set_hudmessage(0,255,0,0.05, 0.25, 0, 0.02, 6.0, 0.01, 0.1, 2)
show_hudmessage(0,"%s一马当先,奋勇杀敌,奖励%6d金钱",killername,amount)
add_player_money(killer,amount)
new msg[512]
format(msg,511,"^x03%s^x01 一马当先,奋勇杀敌,奖励^x04 %d ^x01金钱",killername,amount)
client_color(0,killer,msg)
} |
|