杀敌奖励金钱,个人修改为前15人奖励(可自行修改)
本帖最后由 zw63734487 于 2012-2-7 13:56 编辑new gBonusIndex = { 2500,2000,1500,1000,500,400,300,200,100,90,80,70,60,50,40 }
如第一行代码前面 里表示供15名!!后面{第一名奖励钱数,第二名奖励钱数,第三名奖励钱数,。。一直到。。,第十五名奖励钱数}
想修改 前多少名奖钱的 找到上边的代码
里面为前多少名 !最多32人!后面{2500,2000,....}为从最左到右为第1到,第N名每个名次奖励钱数
前面”[共多少名次]“里面有多少个名次后面的{每名钱数}就有多少个!!!
二楼为代码
顺便 求R大版能不能从这个俄国网址把
opengl32_detect_v.2.2.rar (1,68МБ)
这个反OpenGL32反作弊弄下来???
http://playforce. ru/forum/index.php? /topic/10-csfileinfo-opengl32-detect-v22-17022011//*
* AMXMOD script.
* (plugin_bonus1.sma)
* by DreamZSW <DreamZSW@hotmail.com>
* This file is provided as is (no warranties).
* Copyright 2012年,Made In =Mad Bloodlust Wolf=公会制作 mBw*Dark修正Cs1.5拼音版 QQ:616389035 群35593582
*/
#include <amxmod>
#define MAX_NAME_LENGTH 32
#define MAX_TEXT_LENGTH 512
#define ACCESS_LEVEL ADMIN_LEVEL_A
// Default on/off
new gBonusMode = 1
new gBonusCount = 0
new gBonusIndex = { 2500,2000,1500,1000,500,400,300,200,100,90,80,70,60,50,40 }
public admin_bonuskill(id)
{
// Check access level
if (!(get_user_flags(id)&ACCESS_LEVEL)) {
console_print(id," You have no access to that command")
return PLUGIN_HANDLED
}
// Check arguments
if (read_argc() < 2) {
console_print(id," Usage: amx_bonuskill < 1 | 0 >")
return PLUGIN_HANDLED
}
new sArg1
read_argv(1,sArg1,MAX_NAME_LENGTH)
if (str_to_num(sArg1)) {
gBonusMode = 1
client_print(id,print_console," Bonus money for kills is now ON.")
}
else {
gBonusMode = 0
client_print(id,print_console," Bonus money for kills is now OFF.")
}
return PLUGIN_HANDLED
}
public event_death()
{
if (gBonusMode) {
new iKiller = read_data(1)
new iVictim = read_data(2)
new sMsg
new sName
get_user_name(iKiller,sName,MAX_NAME_LENGTH)
if ((iKiller != iVictim) && (gBonusCount < sizeof gBonusIndex) && (get_user_team(iKiller) != get_user_team(iVictim))) {
gBonusCount++
set_user_money(iKiller,get_user_money(iKiller)+gBonusIndex)
if (gBonusCount == 1) {
format(sMsg,MAX_TEXT_LENGTH,"%s First Blood^n================^nJiang Li +$%i",sName,gBonusIndex)
client_cmd(0, "spk misc/coin01")
set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), 0.02, 0.25, 0, 6.0, 6.0, 0.5, 0.15, 3)
}
else if (gBonusCount == 2) {
format(sMsg,MAX_TEXT_LENGTH,"%s2nd kill! Jiang Li (+$%i )",sName,gBonusIndex)
client_cmd(0, "spk misc/coin01")
set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), 0.02, 0.26, 0, 6.0, 6.0, 0.5, 0.15, 3)
}
else if (gBonusCount == 3) {
format(sMsg,MAX_TEXT_LENGTH,"%s3rd kill! Jiang Li (+$%i )",sName,gBonusIndex)
client_cmd(0, "spk misc/coin01")
set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), 0.02, 0.27, 0, 6.0, 6.0, 0.5, 0.15, 3)
}
else if (gBonusCount == 4) {
format(sMsg,MAX_TEXT_LENGTH,"%s4rd kill! Jiang Li (+$%i )",sName,gBonusIndex)
client_cmd(0, "spk misc/coin01")
set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), 0.02, 0.28, 0, 6.0, 6.0, 0.5, 0.15, 3)
}
else {
format(sMsg,MAX_TEXT_LENGTH,"%s%ith kill! Jiang Li (+$%i )",sName,gBonusCount,gBonusIndex)
client_cmd(0, "spk misc/coin01")
set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), 0.02, 0.29, 0, 6.0, 6.0, 0.5, 0.15, 3)
}
show_hudmessage(0,sMsg)
}
}
return PLUGIN_CONTINUE
}
public event_round_end() {
gBonusCount = 0
}
public plugin_precache(){
precache_sound( "misc/coin01.wav")
return PLUGIN_CONTINUE
}
/************************************************************
* PLUGIN FUNCTIONS
************************************************************/
public plugin_init()
{
register_plugin("Plugin Money Bonus","1.1","mBw Dark")
register_event("DeathMsg","event_death","a")
register_event("SendAudio","event_round_end","a","2&%!MRAD_terwin","2&%!MRAD_ctwin","2&%!MRAD_rounddraw")
register_concmd("amx_bonuskill","admin_bonuskill",ACCESS_LEVEL,"amx_powers < authid | part of nick >")
}
谢谢。。学习了。。 学习了。。 我也来学习下 呜呜。。版主加个精 我这么无私 感谢LZ无私奉献
下来LZ你有没有测试,看代码第一到第五杀敌,分别沾了1-5
不知道你的其他的奖励怎么出来以及加钱.
不知道你使用会不会报BUG?
看了这段代码。应该不会出现15人奖励 liyang2008 发表于 2012-2-6 22:59 static/image/common/back.gif
感谢LZ无私奉献
下来LZ你有没有测试,看代码第一到第五杀敌,分别沾了1-5
呵呵 兄弟!这就是我正在使用的插件 !!
你肯定没仔细看这段代码! format(sMsg,MAX_TEXT_LENGTH,"%s%ith kill! Jiang Li (+$%i )",sName,gBonusCount,gBonusIndex) 前面都是 else if (gBonusCount == 4) {
format(sMsg,MAX_TEXT_LENGTH,"%s4rd kill! Jiang Li (+$%i )",sName,gBonusIndex) 指定数字 到第五句就是按顺序 延续!只要你前面设置了 后面会延续杀敌的!! 感谢LZ无私奉献 相反
这样设置并不好.
个人认为.每次使用数量较为清晰
页:
[1]
2