搜索
查看: 3071|回复: 5

帮忙编译一下源码!谢谢!(已解决)

[复制链接]
发表于 2008-9-13 12:53:32 | 显示全部楼层 |阅读模式 来自 河南漯河
以下是点通礼物的插件源码,怎样去掉无敌和变轻模式?

#include <amxmodx>
#include <fun>
#include <cstrike>
#include "dtgifts"
#define TID_GODMODE 40201
#define TID_GRAVITY_UP 40251
#define PLUGIN_NAME "DTGifts-Fun"
#define PLUGIN_VERSION "1.1"
#define PLUGIN_AUTHOR "ahcat"
public plugin_init() {

register_plugin( PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);

register_dictionary( "dt_gift.txt");

register_gift_l( "life_increase", "GIFT_LIFEUP_NAME", "GIFT_LIFEUP_INFO", 45);
register_gift_l( "money_increase", "GIFT_ADDMONEY_NAME", "GIFT_ADDMONEY_INFO", 45);
register_gift_l( "become_god", "GIFT_STRANGE", "GIFT_GODMODE", 45);
register_gift_l( "strip_weapons", "GIFT_STRANGE", "STRIP_WEAPONS", 15);
register_gift_l( "gravity_up", "GIFT_STRANGE", "GRAVITY_UP", 45);

register_event("DeathMsg", "hook_death", "a");
}
public life_increase( id){

set_user_health( id, get_user_health( id) + 50);
}
public money_increase( id){

cs_set_user_money( id, cs_get_user_money( id) + 4000);
}
public become_god( id){

if( task_exists( id + TID_GODMODE))
remove_task( id + TID_GODMODE);

set_user_godmode( id, 1);
client_print( id, print_chat, "%L", LANG_PLAYER, "YOU_BECOME_GOD");
set_task( 30.0, "remove_godmode", TID_GODMODE + id);
}
public remove_godmode( id){

id -= TID_GODMODE;
if( is_user_alive( id)){
set_user_godmode( id, 0);
client_print( id, print_chat, "%L", LANG_PLAYER, "GODMODE_DISAPPEAR");
}
}
public strip_weapons( id){

strip_user_weapons( id);
}
public gravity_up( id){

if( task_exists( id + TID_GRAVITY_UP))
remove_task( id + TID_GRAVITY_UP);

set_user_gravity( id, 0.5);
client_print( id, print_chat, "%L", LANG_PLAYER, "GRAVITY_UP");
set_task( 30.0, "remove_gravity", TID_GRAVITY_UP + id);
}
public remove_gravity( id){

id -= TID_GRAVITY_UP;
if( is_user_alive( id)){
set_user_gravity( id, 1.0);
client_print( id, print_chat, "%L", LANG_PLAYER, "GRAVITY_UP_DISAPPEAR");
}
}
public hook_death(){

new nVictim = read_data(2);

if( task_exists( nVictim + TID_GODMODE))
remove_task( nVictim + TID_GODMODE);

if( task_exists( nVictim + TID_GRAVITY_UP))
remove_task( nVictim + TID_GRAVITY_UP);
}
发表于 2008-9-13 12:58:38 | 显示全部楼层 来自 广东惠州

回复: 帮忙编译一下源码!谢谢!

[php]
#include <amxmodx>
#include <fun>
#include <cstrike>
#include "dtgifts"
#define PLUGIN_NAME "DTGifts-Fun"
#define PLUGIN_VERSION "1.1"
#define PLUGIN_AUTHOR "ahcat"
public plugin_init() {

register_plugin( PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);

register_dictionary( "dt_gift.txt");

register_gift_l( "life_increase", "GIFT_LIFEUP_NAME", "GIFT_LIFEUP_INFO", 45);
register_gift_l( "money_increase", "GIFT_ADDMONEY_NAME", "GIFT_ADDMONEY_INFO", 45);
register_gift_l( "strip_weapons", "GIFT_STRANGE", "STRIP_WEAPONS", 15);

}
public life_increase( id){

set_user_health( id, get_user_health( id) + 50);
}
public money_increase( id){

cs_set_user_money( id, cs_get_user_money( id) + 4000);
}
public strip_weapons( id){

strip_user_weapons( id);
}[/php]
回复

使用道具 举报

 楼主| 发表于 2008-9-13 13:12:06 | 显示全部楼层 来自 河南漯河

回复: 帮忙编译一下源码!谢谢!

谢谢楼上的回复,不过编译不成功
如图

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注个册吧

×
回复

使用道具 举报

发表于 2008-9-13 13:30:35 | 显示全部楼层 来自 云南西双版纳州景洪

回复: 帮忙编译一下源码!谢谢!

你scripting\include文件中缺少dtgifts.inc就编译不了
回复

使用道具 举报

 楼主| 发表于 2008-9-13 13:47:22 | 显示全部楼层 来自 河南漯河

回复: 帮忙编译一下源码!谢谢!

成功编译,谢谢楼上两位相助!
回复

使用道具 举报

发表于 2013-2-14 12:18:54 | 显示全部楼层 来自 辽宁鞍山
怎么更改文字啊?
回复

使用道具 举报

游客
回复
您需要登录后才可以回帖 登录 | 注个册吧

快速回复 返回顶部 返回列表