求AMXX1.75 不埋拆包失败方全体死插件!!
本人在AMXX1.,75下没有生成功, 在此求各位达人帮助~~!!!本人始用1.60插件,在AMXX1.75 下运行了,可是不好使!!!
/* AMX MOD X script.
* This file is provided as is with no warranty.
*
* Presenting: Slay Losers
*
* Effect: Losing the objective results in a random orgy of GFX destruction
* for the losing team (everyone on the losing team DIES).
*
* NOTE: The slaying will NOT remove frags.
*
* CVAR: Set mp_slaylosers to 0 if you want to turn it off.
*
* Written by: Denkkar Seffyd, now in a seperate WC3 independent package (no XP removal though)
*
* Install: compile then add slaylosers.amx to addons/amx/plugin.ini
*
*/
#include <amxmodx>
#include <amxmisc>
new white
new lightning
new g_sModelIndexSmoke
public plugin_init(){
register_plugin("AMX Slay Losers","1.0","d3n14@yahoo.com")
register_event("SendAudio","end_round","a","2=%!MRAD_terwin","2=%!MRAD_ctwin","2=%!MRAD_rounddraw")
register_cvar("mp_slaylosers","1",FCVAR_SERVER)
return PLUGIN_CONTINUE
}
public end_round(){
// Only active if CVAR is not equal to 0
if( get_cvar_num("mp_slaylosers") ){
new parm
new len = read_data(2,parm,31)
set_task(1.0,"slay_those_losers",0,parm, len + 1)
}
return PLUGIN_CONTINUE
}
// Slays each player who failed to stop the other team from completing the objective.
// A random slay method is chosen for each player.
public slay_those_losers(parm[]) {
new origin, srco
new player, playersnum
new id
get_players(player,playersnum,"ea",(parm == 't') ? "CT" : "TERRORIST" )
for(new i = 0; i < playersnum; ++i){
id = player
get_user_origin(id,origin)
origin -= 26
srco=origin+150
srco=origin+150
srco=origin+800
switch(random_num(1,3)){
case 1:{
slay_lightning(srco,origin)
emit_sound(id,CHAN_ITEM, "ambience/thunder_clap.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
}
case 2:{
slay_blood(origin)
emit_sound(id,CHAN_ITEM, "weapons/headshot2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
}
case 3: {
slay_explode(origin)
emit_sound(id,CHAN_ITEM, "weapons/explode3.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
}
}
set_hudmessage(178, 14, 41, -1.0, -0.4, 1, 0.5, 1.7, 0.2, 0.2,5);
show_hudmessage(id, "Objective Failed^nFailure Is Not An Option^nYou Die Now" );
user_kill(id,1)
set_user_frags(id, get_user_frags(id)+1)
}
}
slay_explode(vec1) {
// blast circles
message_begin( MSG_BROADCAST,SVC_TEMPENTITY,vec1)
write_byte( 21 )
write_coord(vec1)
write_coord(vec1)
write_coord(vec1 + 16)
write_coord(vec1)
write_coord(vec1)
write_coord(vec1 + 1936)
write_short( white )
write_byte( 0 ) // startframe
write_byte( 0 ) // framerate
write_byte( 2 ) // life
write_byte( 16 ) // width
write_byte( 0 ) // noise
write_byte( 188 ) // r
write_byte( 220 ) // g
write_byte( 255 ) // b
write_byte( 255 ) //brightness
write_byte( 0 ) // speed
message_end()
//Explosion2
message_begin( MSG_BROADCAST,SVC_TEMPENTITY)
write_byte( 12 )
write_coord(vec1)
write_coord(vec1)
write_coord(vec1)
write_byte( 188 ) // byte (scale in 0.1's)
write_byte( 10 ) // byte (framerate)
message_end()
//Smoke
message_begin( MSG_BROADCAST,SVC_TEMPENTITY,vec1)
write_byte( 5 )
write_coord(vec1)
write_coord(vec1)
write_coord(vec1)
write_short( g_sModelIndexSmoke )
write_byte( 2 )
write_byte( 10 )
message_end()
}
slay_blood(vec1) {
//LAVASPLASH
message_begin( MSG_BROADCAST,SVC_TEMPENTITY)
write_byte( 10 )
write_coord(vec1)
write_coord(vec1)
write_coord(vec1)
message_end()
}
slay_lightning(vec1,vec2) {
//Lightning
message_begin( MSG_BROADCAST,SVC_TEMPENTITY)
write_byte( 0 )
write_coord(vec1)
write_coord(vec1)
write_coord(vec1)
write_coord(vec2)
write_coord(vec2)
write_coord(vec2)
write_short( lightning )
write_byte( 1 ) // framestart
write_byte( 5 ) // framerate
write_byte( 2 ) // life
write_byte( 20 ) // width
write_byte( 30 ) // noise
write_byte( 200 ) // r, g, b
write_byte( 200 ) // r, g, b
write_byte( 200 ) // r, g, b
write_byte( 200 ) // brightness
write_byte( 200 ) // speed
message_end()
//Sparks
message_begin( MSG_PVS, SVC_TEMPENTITY,vec2)
write_byte( 9 )
write_coord( vec2 )
write_coord( vec2 )
write_coord( vec2 )
message_end()
//Smoke
message_begin( MSG_BROADCAST,SVC_TEMPENTITY,vec2)
write_byte( 5 )
write_coord(vec2)
write_coord(vec2)
write_coord(vec2)
write_short( g_sModelIndexSmoke )
write_byte( 10 )
write_byte( 10 )
message_end()
}
public plugin_precache() {
g_sModelIndexSmoke = precache_model("sprites/steam1.spr")
lightning = precache_model("sprites/lgtning.spr")
white = precache_model("sprites/white.spr")
precache_sound( "ambience/thunder_clap.wav")
precache_sound( "weapons/headshot2.wav")
precache_sound( "weapons/explode3.wav")
return PLUGIN_CONTINUE
}
回复: 求AMXX1.75 不埋拆包失败方全体死插件!!
其实任务失败,全体死亡的惩罚我觉得还轻了点,在我的中家集成娱乐插件里面,已经集成了处罚任务失败还活着的玩家的功能。不杀死他们,而是没收其所有的金钱和枪械,这种处罚更加要命 :)在安装中家集成娱乐插件的服务器上,没有人敢轻视任务执行的。
回复: 求AMXX1.75 不埋拆包失败方全体死插件!!
实现这个功能代码很简单的,不需要那么多花哨的代码,下面是我根据你提供的源代码做了大量的删除,并增加了两行就足够了,你在1.75下面编译一下吧,应该没有问题:有几个笔误,不好意思,已修正,你再编译一下吧。我已经编译好了,你直接下载使用吧。
#include <amxmodx>
#include <amxmisc>
#include <engine>
public plugin_init(){
register_plugin("AMX Slay Losers","1.0","d3n14@yahoo.com")
register_event("SendAudio","end_round","a","2=%!MRAD_terwin","2=%!MRAD_ctwin","2=%!MRAD_rounddraw")
register_cvar("mp_slaylosers","1",FCVAR_SERVER)
return PLUGIN_CONTINUE
}
public end_round(){
if( get_cvar_num("mp_slaylosers") == 1){
new parm
read_data(2,parm,31)
set_task(1.0,"slay_those_losers",15120,parm, 31)
}
return PLUGIN_CONTINUE
}
public slay_those_losers(parm[]) {
new player, playersnum
get_players(player,playersnum,"ea",(parm == 't') ? "CT" : "TERRORIST" )
for(new i = 0; i < playersnum; ++i){
user_silentkill(player )
set_hudmessage(178, 14, 41, -1.0, -0.4, 1, 0.5, 1.7, 0.2, 0.2,5)
show_hudmessage(player, "任务失败,被系统处死!" )
}
}
回复: 求AMXX1.75 不埋拆包失败方全体死插件!!
感谢 ZhongJia 谢谢!!!回复: 求AMXX1.75 不埋拆包失败方全体死插件!!
对不起,zhongjia我没有生成成功!!请你看看是不是这样啊!!
回复: 求AMXX1.75 不埋拆包失败方全体死插件!!
官网上有说明 你可以去找一下我把我的发给你吧 看看可以用不 :)
回复: 求AMXX1.75 不埋拆包失败方全体死插件!!
我用了如花的,还是少点东西吧, 我那里提示 这个!!!回复: 求AMXX1.75 不埋拆包失败方全体死插件!!
zhongjia 你生成那个, 中文没有用UTF-8 编码生成 ,在CS里不看到中文!!!还有就是 你给那个编码,我在1.75下 编码的时候,老是出错(非法关闭)!! 不知道为什么!!
页:
[1]