银闪闪 发表于 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);
}

zwfgdlc 发表于 2008-9-13 12:58:38

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


#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);
}

银闪闪 发表于 2008-9-13 13:12:06

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

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

zhangsheng 发表于 2008-9-13 13:30:35

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

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

银闪闪 发表于 2008-9-13 13:47:22

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

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

douliang 发表于 2013-2-14 12:18:54

怎么更改文字啊?
页: [1]
查看完整版本: 帮忙编译一下源码!谢谢!(已解决)