求服务器自动say 的插件
就是每局开始..立刻say 指定的一些话..不是换图的开局..噢..有的请发下..谢谢 我大概知道个原理..应该是全部人spawn了.捕捉这一刻..然后检测到..所有人spawn了..就立刻say XXXX 还有一个问题..就是一个插件的问题L 08/29/2009 - 02:04:43: Run time error 10 (plugin "multikill_cn.amxx") (native "cs_get_user_money") - debug not enabled!
L 08/29/2009 - 02:04:43: To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 08/29/2009 - 11:02:53: Start of error session.
L 08/29/2009 - 11:02:53: Info (map "de_inferno") (file "addons/amxmodx/logs/error_20090829.log")
L 08/29/2009 - 11:02:53: Player out of range (0)
L 08/29/2009 - 11:02:53: Run time error 10 (plugin "multikill_cn.amxx") (native "cs_get_user_money") - debug not enabled!
L 08/29/2009 - 11:02:53: To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 08/29/2009 - 11:15:59: Player out of range (0)
L 08/29/2009 - 11:15:59: Run time error 10 (plugin "multikill_cn.amxx") (native "cs_get_user_money") - debug not enabled!
L 08/29/2009 - 11:15:59: To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 08/29/2009 - 11:28:06: Player out of range (0)
L 08/29/2009 - 11:28:06: Run time error 10 (plugin "multikill_cn.amxx") (native "cs_get_user_money") - debug not enabled!
L 08/29/2009 - 11:28:06: To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
只知道他说的那个函数问题..具体看不懂
#include <amxmodx>
#include <cstrike>
new p_lastk=0,p_lastk_count=0
public plugin_init() {
register_plugin("MultiKill", "1.0", "Marshall")
register_event("DeathMsg", "hook_death", "a")
register_logevent("hook_roundstart",2,"0=World triggered","1=Round_Start")
}
public hook_death(){
new p_message
new Killer = read_data(1)
new headshot = read_data(3)
new p_weapon
read_data(4,p_weapon,15)
//爆头奖励
if(headshot){
new p_name
get_user_name(Killer,p_name,15)
cs_set_user_money(Killer,cs_get_user_money(Killer) + 1000)
}
//刀杀奖励
if(strcmp(p_weapon,"knife")==0){
new p_name
get_user_name(Killer,p_name,15)
format(p_message,127,"^x04刀杀奖励:^x03%s^x01 获得$5000!",p_name)
color_message(p_message)
cs_set_user_money(Killer,cs_get_user_money(Killer) + 5000)
}
//刀杀奖励
if(strcmp(p_weapon,"grenade")==0){
new p_name
get_user_name(Killer,p_name,15)
format(p_message,127,"^x04雷杀奖励:^x03%s^x01 获得$1500!",p_name)
color_message(p_message)
cs_set_user_money(Killer,cs_get_user_money(Killer) + 1500)
}
//连续杀人奖励
if(p_lastk != Killer){
p_lastk = Killer
p_lastk_count =1
}
else
p_lastk_count++
if(p_lastk_count>=5){
new p_name
get_user_name(Killer,p_name,15)
format(p_message,127,"^x04连续杀人奖励:^x03%s^x01 连续杀人5次,获得$16000!",p_name)
color_message(p_message)
cs_set_user_money(Killer,cs_get_user_money(Killer) + 16000)
}
}
public hook_roundstart(){
p_lastk=0
p_lastk_count=0
}
color_message(p_message[]){
message_begin(MSG_ALL, get_user_msgid("SayText"))
write_byte(1)
write_string(p_message)
message_end()
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang2052\\ f0\\ fs16 \n\\ par }
*/ cs_get_user_money 这个函数应该要改成什么函数才适合:dizzy: cs_set_user_money(Killer,cs_get_user_money(Killer) + 16000, 1)
不知道行不行............. 本帖最后由 心静如水 于 2009-8-29 20:28 编辑
就是每局开始..立刻say 指定的一些话..不是换图的开局..噢..有的请发下..谢谢
702033080 发表于 2009-8-29 16:17 http://www.dt-club.net/forum/images/common/back.gif
public newRound(){
new msg
format(msg,63,"* (注意 ):. .................!");
set_hudmessage(248, 248, 255, -1.0, 0.4, 2, 3.0, 4.0, 0.01, 1.0, 7);
show_hudmessage(0, msg); 3# 702033080
要判断Killer是否为0.你也可以在注册事件里加上一句"1!0"。最好还加上判断,看Killer是否已经连接。
public newRound(){
new msg
format(msg,63,"* (注意 ):. .................!");
set_hudmessage(248, 248, 255, -1.0, 0.4, 2, 3.0, 4.0, 0.01, 1.0, 7);
show_hudmessage(0, ms ...
心静如水 发表于 2009-8-29 20:22 http://www.dt-club.net/forum/images/common/back.gif
试过不可以..编译倒是编译的出..就是不显示....自己也拿过很多显示字的源码去改..改了又差不多10个..每一个可以显示..劳烦帮我重新写一个sma 谢谢..:Q 干嘛要每句都SAY??进服务器SAY不行吗 :victory: 是啊
页:
[1]
2