热烈祝贺俺[发个]前5人杀人奖励源码
3plugin_bonus1.sma-------------------------------------------------------------------------------------------------------
/*
* AMXMOD script.
* (plugin_bonus1.sma)
* by DreamZSW <DreamZSW@hotmail.com>
* This file is provided as is (no warranties).
*
*/
#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 = { 50000,49000,30000,28000,5000,4001,3002,2008,1000,900,800,700,600.500,400,300,200,100,90,80,70,60,50,40,30,20,10,6,5,4,3,2, }
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================^nget money +$%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,"%s got the 2nd kill! Awarded (+$%i money)",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,"%s got the 3rd kill! Awarded (+$%i money)",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,"%s got the 4rd kill! Awarded (+$%i money)",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 got the %ith kill! Awarded (+$%i money)",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.0","DreamZSW")
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 >")
}
-------------------------------------------------------------------------------------------------------
回复: 热烈祝贺俺[发个]前5人杀人奖励源码
热烈祝贺俺[发个]前5人杀人奖励源码 回复隐藏内容收费隐藏内容 (需要费用 10 点) [看谁购买]
资力隐藏内容 (需要发贴量大于150贴)
回复: 热烈祝贺俺[发个]前5人杀人奖励源码
俺上班了,有空再来发插件:D收费隐藏内容 (需要费用 10 点) [看谁购买]
资力隐藏内容 (需要发贴量大于150贴)
new gBonusMode = 1
new gBonusCount = 0
new gBonusIndex[5 = { 50000,49000,30000,28000,5000, }
回复: 热烈祝贺俺[发个]前5人杀人奖励源码
不是吧!想钱想晕了????回复: 热烈祝贺俺[发个]前5人杀人奖励源码
顶~~~~~~~我看看~~~~~~~~~~~~~~
回复: 热烈祝贺俺[发个]前5人杀人奖励源码
幻想老大!~能否帮我改一下他的显示!~
我想要个在聊天频道彩色字显示的~最好还是加点音效进去!
回复: 热烈祝贺俺[发个]前5人杀人奖励源码
郁闷,偶没钱,偶穷死了!就差那么一点点都不给我看,5555!回复: 热烈祝贺俺[发个]前5人杀人奖励源码
这个插件随机颜色版的代码本来就是我第1个在点通上改好发出来代码的.现在莫名其妙的被人家把原插件名字改成一些古里古怪的名字.真不知道原作者看到会怎么想!原插件名字是
plugin_bonus1.amx ; Money Bonus(杀人加钱的插件)
要不是某些人看到lvcp321改的随机颜色版的plugin_bonus1插件没有公开代码.要不是看这么多人想要的话,我才懒得去改呢.
http://www.dt-club.net/forum/thread/71/31712/2.htm
看清楚是谁改的.不要整天把人家原插件名字改了.看着就气.转贴也不写!弄的我现在对点通都几乎没有什么心情了.
回复: 热烈祝贺俺[发个]前5人杀人奖励源码
Post by zhangsheng这个插件随机颜色版的代码本来就是我第1个在点通上改好发出来代码的.现在莫名其妙的被人家把原插件名字改成一些古里古怪的名字.真不知道原作者看到会怎么想!
原插件名字是
plugin_bonus1.amx ; Money Bonus(杀人加钱的插件)
要不是某些人看到lvcp321改的随机颜色版的plugin_bonus1插件没有公开代码.要不是看这么多人想要的话,我才懒得去改呢.
http://www.dt-club.net/forum/thread/71/31712/2.htm
看清楚是谁改的.不要整天把人家原插件名字改了.看着就气.转贴也不写!弄...
没必要跟那些没品的人计较.
回复: 热烈祝贺俺[发个]前5人杀人奖励源码
daota ............
页:
[1]
2