求助:汉化代码
本帖最后由 我是新手 于 2009-5-7 18:00 编辑如题,自己弄了好多遍,总是不能编译,郁闷之极啊!请大家帮忙。代码如下(我就只把红色部分的英文改成中文就不行了)
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <engine>
#include <fun>
#define PLUGIN"Purchase Mod"
#define VERSION "1.3"
#define AUTHOR"Dizzy"//Production
#define DISPLAY_MSG
#define FL_WATERJUMP (1<<11)
#define FL_ONGROUND (1<<9)
#define keyspageone (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<7)|(1<<8)|(1<<9) // Keys: 1234567890
#define keyspagetwo (1<<0)|(1<<7)|(1<<8)|(1<<9) // Keys: 1890
new powerpur = 1;
new powerpurgravity = 1;
new powerpurspeed = 1;
new powerpurstealth = 1;
new powerpurlaser = 1;
new powerpurflashglasses = 1;
new powerpurmultijump = 1;
new powerpurbunnyhop = 1;
new powerpurhealth = 1;
new powerpurparachute = 1;
new jumpnum;
new bool:dojump;
new para_ent
new pDetach, pFallSpeed
new g_msgscreenfade;
public client_connect(id)
{
powerpur = 1;
powerpurgravity = 1;
powerpurspeed = 1;
powerpurstealth = 1;
powerpurlaser = 1;
powerpurflashglasses = 1;
powerpurmultijump = 1;
powerpurbunnyhop = 1;
powerpurhealth = 1;
powerpurparachute = 1;
}
public client_disconnect(id)
{
powerpur = 1;
powerpurgravity = 1;
powerpurspeed = 1;
powerpurstealth = 1;
powerpurlaser = 1;
powerpurflashglasses = 1;
powerpurmultijump = 1;
powerpurbunnyhop = 1;
powerpurflashglasses = 1;
powerpurparachute = 1;
}
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
register_menucmd(register_menuid("Purchase Mod Page (1/2)"), keyspageone, "pressedpageone")
register_menucmd(register_menuid("Purchase Mod Page (2/2)"), keyspagetwo, "pressedpagetwo")
register_cvar("amx_pmod","1");
register_cvar("amx_multiabilities","0");
register_clcmd("say pmodmenu","showpageone");
register_clcmd("say pmodmenu2","showpagetwo");
register_clcmd("say_team pmodmenu","showpageone");
register_clcmd("say_team pmodmenu2","showpagetwo");
register_clcmd("pmodmenu","showpageone");
register_clcmd("pmodmenu2","showpagetwo");
register_concmd("pmodmenu","showpageone");
register_concmd("pmodmenu2","showpagetwo");
register_event("ResetHUD","roundchange","b");
register_event("CurWeapon","speedb","be","1=1");
register_event("ScreenFade","event_blinded","be","4=255","5=255","6=255","7>199")
register_event("DeathMsg","death_event","a");
g_msgscreenfade = get_user_msgid("ScreenFade");
pFallSpeed = register_cvar("amx_pmodfallspeed", "100")
pDetach = register_cvar("amx_pmoddetach", "1")
}
//////////////////////
// SOUNDS //
//////////////////////
public plugin_precache()
{
precache_sound("purchasemod/buy.wav");
precache_sound("purchasemod/drain.wav");
precache_sound("purchasemod/sorry.wav");
precache_model("models/parachute.mdl");
}
//////////////////////
// INFORM //
//////////////////////
#if defined DISPLAY_MSG
public client_putinserver(id)
{
if (is_user_bot(id))
return;
set_task(25.0, "inform", id);
}
#endif
#if defined DISPLAY_MSG
public inform(id)
{
client_print(id, print_chat, ": This server is running Purchase Mod v1.3 -- By: Dizzy");
client_print(id, print_chat, ": Type pmodmenu to start!");
return PLUGIN_HANDLED;
}
#endif
public showpageone(id)
{
show_menu(id, keyspageone, "Purchase Mod Page (1/2)^n ^n^n1. 轻功^n2. 加速^n3. 隐身^n4. 激光红外线^n5. 反闪光眼镜
^n6. 多重跳^n7. 兔子跳^n8. 加血包^n^n9. 下一页^n0. 退出^n", -1, "降落伞 Mod Page (1/2)")}
public pressedpageone(id, key)
{
switch(key)
{
case 0:
{
if(!get_cvar_num("amx_pmod"))
{
client_print(id, print_chat, ": Sorry, the plugin is off!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
if(!is_user_alive(id))
{
client_print(id, print_chat, ": You must be alive to purchase this item!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
if(get_cvar_num("amx_multiabilities")==0 && powerpur == 0)
{
client_print(id, print_chat, ": You already purchased a different skill!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
if(powerpurgravity == 0)
{
client_print(id, print_chat, ": You already purchased a gravity!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
new money = cs_get_user_money(id);
if(3500 > money)
{
client_print(id, print_chat, ": You have insufficient funds!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
cs_set_user_money(id, (money - 3500), 1);
client_cmd(id,"spk purchasemod/buy");
client_print(id, print_chat, ": You purchased gravity for $3500!");
set_user_gravity(id, 0.25);
powerpurgravity = 0;
powerpur = 0;
}
case 1:
{
if(!get_cvar_num("amx_pmod"))
{
client_print(id, print_chat, ": Sorry, the plugin is off!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
if(!is_user_alive(id))
{
client_print(id, print_chat, ": You must be alive to purchase this item!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
if(get_cvar_num("amx_multiabilities")==0 && powerpur == 0)
{
client_print(id, print_chat, ": You already purchased a different skill!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
if(powerpurspeed == 0)
{
client_print(id, print_chat, ": You already purchased speed!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
new money = cs_get_user_money(id);
if(4000 > money)
{
client_print(id, print_chat, ": You have insufficient funds!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
cs_set_user_money(id, (money - 4000), 1);
client_cmd(id,"spk purchasemod/buy");
client_print(id, print_chat, ": You purchased speed for $4000!");
new Float:speed = get_user_maxspeed(id) + 680.0;
set_user_maxspeed(id, speed);
powerpurspeed = 0;
powerpur = 0;
}
case 2:
{
if(!get_cvar_num("amx_pmod"))
{
client_print(id, print_chat, ": Sorry, the plugin is off!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
if(!is_user_alive(id))
{
client_print(id, print_chat, ": You must be alive to purchase this item!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
if(get_cvar_num("amx_multiabilities")==0 && powerpur == 0)
{
client_print(id, print_chat, ": You already purchased a different skill!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
if(powerpurstealth == 0)
{
client_print(id, print_chat, ": You already purchased stealth!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
new money = cs_get_user_money(id);
if(5000 > money)
{
client_print(id, print_chat, ": You have insufficient funds!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
cs_set_user_money(id, (money - 5000), 1);
client_cmd(id,"spk purchasemod/buy");
client_print(id, print_chat, ": You purchased stealth for $5000!");
set_user_rendering(id, kRenderFxNone, 50, 50, 50, kRenderTransAdd, 50);
set_user_footsteps(id, 1);
powerpurstealth = 0;
powerpur = 0;
} case 3:
{
if(!get_cvar_num("amx_pmod"))
{
client_print(id, print_chat, ": Sorry, the plugin is off!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
if(!is_user_alive(id))
{
client_print(id, print_chat, ": You must be alive to purchase this item!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
if(get_cvar_num("amx_multiabilities")==0 && powerpur == 0)
{
client_print(id, print_chat, ": You already purchased a different skill!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
if(powerpurlaser == 0)
{
client_print(id, print_chat, ": You already purchased a laser!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
new money = cs_get_user_money(id);
if(2000 > money)
{
client_print(id, print_chat, ": You have insufficient funds!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
cs_set_user_money(id, (money - 2000), 1);
client_cmd(id,"spk purchasemod/buy");
client_print(id, print_chat, ": You purchased a laser for $2000!");
set_hudmessage(255, 0, 0, -1.0, -1.0, 0, 6.0, 10.0, 0.1, 0.1, 10);
show_hudmessage(id, "*");
set_task(5.0,"laser_loop",id);
powerpurlaser = 0;
powerpur = 0;
}
case 4:
{
if(!get_cvar_num("amx_pmod"))
{
client_print(id, print_chat, ": Sorry, the plugin is off!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
if(!is_user_alive(id))
{
client_print(id, print_chat, ": You must be alive to purchase this item!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
if(get_cvar_num("amx_multiabilities")==0 && powerpur == 0)
{
client_print(id, print_chat, ": You already purchased a different skill!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
if(powerpurflashglasses == 0)
{
client_print(id, print_chat, ": You already purchased Anti-Flash Glasses!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
new money = cs_get_user_money(id);
if(5000 > money)
{
client_print(id, print_chat, ": You have insufficient funds!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
cs_set_user_money(id, (money - 5000), 1);
client_cmd(id,"spk purchasemod/buy");
client_print(id, print_chat, ": You purchased Anti-Flash Glasses for $5000!");
set_task(0.0,"event_blinded",id)
powerpurflashglasses = 0;
powerpur = 0;
}
case 5:
{
if(!get_cvar_num("amx_pmod"))
{
client_print(id, print_chat, ": Sorry, the plugin is off!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
if(!is_user_alive(id))
{
client_print(id, print_chat, ": You must be alive to purchase this item!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
if(get_cvar_num("amx_multiabilities")==0 && powerpur == 0)
{
client_print(id, print_chat, ": You already purchased a different skill!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
if(powerpurmultijump == 0)
{
client_print(id, print_chat, ": You already purchased Multi-Jump!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
new money = cs_get_user_money(id);
if(3000 > money)
{
client_print(id, print_chat, ": You have insufficient funds!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
cs_set_user_money(id, (money - 3000), 1);
client_cmd(id,"spk purchasemod/buy");
client_print(id, print_chat, ": You purchased multi-jump for $3000!");
powerpurmultijump = 0;
powerpur = 0;
}
case 6:
{
if(!get_cvar_num("amx_pmod"))
{
client_print(id, print_chat, ": Sorry, the plugin is off!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
if(!is_user_alive(id))
{
client_print(id, print_chat, ": You must be alive to purchase this item!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
if(get_cvar_num("amx_multiabilities")==0 && powerpur == 0)
{
client_print(id, print_chat, ": You already purchased a different skill!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
if(powerpurbunnyhop == 0)
{
client_print(id, print_chat, ": You already purchased bunny-hop!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
new money = cs_get_user_money(id);
if(6000 > money)
{
client_print(id, print_chat, ": You have insufficient funds!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
cs_set_user_money(id, (money - 6000), 1);
client_cmd(id,"spk purchasemod/buy");
client_print(id, print_chat, ": You purchased bunny-hop for $$6000!");
powerpurbunnyhop = 0;
powerpur = 0;
}
case 7:
{
if(!get_cvar_num("amx_pmod"))
{
client_print(id, print_chat, ": Sorry, the plugin is off!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
if(!is_user_alive(id))
{
client_print(id, print_chat, ": You must be alive to purchase this item!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
if(get_cvar_num("amx_multiabilities")==0 && powerpur == 0)
{
client_print(id, print_chat, ": You already purchased a different skill!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
if(powerpurhealth == 0)
{
client_print(id, print_chat, ": You already purchased health!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
new money = cs_get_user_money(id);
if(5000 > money)
{
client_print(id, print_chat, ": You have insufficient funds!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
cs_set_user_money(id, (money - 5000), 1);
client_cmd(id,"spk purchasemod/buy");
client_print(id, print_chat, ": You purchased health for $5000!");
set_user_health(id, get_user_health(id) + 50);
powerpurhealth = 0;
powerpur = 0;
}
case 8:
{
set_task(0.0,"showpagetwo",id);
return PLUGIN_CONTINUE;
}
case 9:
{
return PLUGIN_HANDLED;
}
}
return PLUGIN_CONTINUE;
} public showpagetwo(id)
{
show_menu(id, keyspagetwo, "Purchase Mod Page (2/2)^n ^n^n1. Parachute^n^n8. Back^n0. Exit^n", -1, "Purchase Mod Page (2/2)")
}
public pressedpagetwo(id, key)
{
switch(key)
{
case 0:
{
if(!get_cvar_num("amx_pmod"))
{
client_print(id, print_chat, ": Sorry, the plugin is off!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
if(!is_user_alive(id))
{
client_print(id, print_chat, ": You must be alive to purchase this item!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
if(get_cvar_num("amx_multiabilities")==0 && powerpur == 0)
{
client_print(id, print_chat, ": You already purchased a different skill!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
if(powerpurparachute == 0)
{
client_print(id, print_chat, ": You already purchased a parachute!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
new money = cs_get_user_money(id);
if(4000 > money)
{
client_print(id, print_chat, ": You have insufficient funds!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
cs_set_user_money(id, (money - 4000), 1);
client_cmd(id,"spk purchasemod/buy");
client_print(id, print_chat, ": You purchased a parachute for $4000!");
powerpurparachute = 0;
powerpur = 0;
}
case 7:
{
set_task(0.0,"showpageone",id);
return PLUGIN_CONTINUE;
}
case 9:
{
return PLUGIN_HANDLED;
}
}
return PLUGIN_CONTINUE;
}
//////////////////////
// PRETHINK //
//////////////////////
public client_PreThink(id)
{
if(powerpurmultijump == 0)
{
new nbut = get_user_button(id);
new obut = get_user_oldbutton(id);
if((nbut & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(obut & IN_JUMP))
{
if(jumpnum < 3)
{
dojump = true;
jumpnum++;
return PLUGIN_CONTINUE;
}
}
if((nbut & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))
{
jumpnum = 0
}
return PLUGIN_CONTINUE;
}
if(powerpurbunnyhop == 0)
{
entity_set_float(id, EV_FL_fuser2, 0.0);
if (entity_get_int(id, EV_INT_button) & 2)
{
new flags = entity_get_int(id, EV_INT_flags);
if (flags & FL_WATERJUMP)
{
return PLUGIN_CONTINUE;
}
if (entity_get_int(id, EV_INT_waterlevel) >= 2)
{
return PLUGIN_CONTINUE;
}
if(!(flags & FL_ONGROUND))
{
return PLUGIN_CONTINUE;
}
new Float:velocity;
entity_get_vector(id, EV_VEC_velocity, velocity);
velocity += 250.0;
entity_set_vector(id, EV_VEC_velocity, velocity);
entity_set_int(id, EV_INT_gaitsequence, 6);
}
return PLUGIN_CONTINUE;
}
if(powerpurparachute == 0)
{
if (!is_user_alive(id))
{
return PLUGIN_HANDLED;
}
new Float:fallspeed = get_pcvar_float(pFallSpeed) * -1.0
new Float:frame
new button = get_user_button(id)
new oldbutton = get_user_oldbutton(id)
new flags = get_entity_flags(id)
if (para_ent > 0 && (flags & FL_ONGROUND))
{
if (get_pcvar_num(pDetach))
{
if (get_user_gravity(id) == 0.1)
{
if(powerpurgravity == 0)
{
set_user_gravity(id, 0.25);
}
if(powerpurgravity == 1)
{
set_user_gravity(id, 1.0);
}
}
if (entity_get_int(para_ent,EV_INT_sequence) != 2)
{
entity_set_int(para_ent, EV_INT_sequence, 2)
entity_set_int(para_ent, EV_INT_gaitsequence, 1)
entity_set_float(para_ent, EV_FL_frame, 0.0)
entity_set_float(para_ent, EV_FL_fuser1, 0.0)
entity_set_float(para_ent, EV_FL_animtime, 0.0)
entity_set_float(para_ent, EV_FL_framerate, 0.0)
return PLUGIN_HANDLED;
}
frame = entity_get_float(para_ent,EV_FL_fuser1) + 2.0
entity_set_float(para_ent,EV_FL_fuser1,frame)
entity_set_float(para_ent,EV_FL_frame,frame)
if (frame > 254.0)
{
remove_entity(para_ent)
para_ent = 0
}
}
else
{
if(powerpurgravity == 0)
{
set_user_gravity(id, 0.25);
remove_entity(para_ent);
para_ent = 0;
}
if(powerpurgravity == 1)
{
set_user_gravity(id, 1.0);
remove_entity(para_ent);
para_ent = 0;
}
}
return PLUGIN_HANDLED;
}
if (button & IN_USE)
{
new Float:velocity
entity_get_vector(id, EV_VEC_velocity, velocity)
if (velocity < 0.0)
{
if(para_ent <= 0)
{
para_ent = create_entity("info_target")
if(para_ent > 0)
{
entity_set_string(para_ent,EV_SZ_classname,"parachute")
entity_set_edict(para_ent, EV_ENT_aiment, id)
entity_set_edict(para_ent, EV_ENT_owner, id)
entity_set_int(para_ent, EV_INT_movetype, MOVETYPE_FOLLOW)
entity_set_model(para_ent, "models/parachute.mdl")
entity_set_int(para_ent, EV_INT_sequence, 0)
entity_set_int(para_ent, EV_INT_gaitsequence, 1)
entity_set_float(para_ent, EV_FL_frame, 0.0)
entity_set_float(para_ent, EV_FL_fuser1, 0.0)
}
}
if (para_ent > 0)
{
entity_set_int(id, EV_INT_sequence, 3)
entity_set_int(id, EV_INT_gaitsequence, 1)
entity_set_float(id, EV_FL_frame, 1.0)
entity_set_float(id, EV_FL_framerate, 1.0)
set_user_gravity(id, 0.1)
velocity = (velocity + 40.0 < fallspeed) ? velocity + 40.0 : fallspeed
entity_set_vector(id, EV_VEC_velocity, velocity)
if (entity_get_int(para_ent,EV_INT_sequence) == 0)
{
frame = entity_get_float(para_ent,EV_FL_fuser1) + 1.0
entity_set_float(para_ent,EV_FL_fuser1,frame)
entity_set_float(para_ent,EV_FL_frame,frame)
if (frame > 100.0)
{
entity_set_float(para_ent, EV_FL_animtime, 0.0)
entity_set_float(para_ent, EV_FL_framerate, 0.4)
entity_set_int(para_ent, EV_INT_sequence, 1)
entity_set_int(para_ent, EV_INT_gaitsequence, 1)
entity_set_float(para_ent, EV_FL_frame, 0.0)
entity_set_float(para_ent, EV_FL_fuser1, 0.0)
}
}
}
}
else if (para_ent > 0)
{
if(powerpurgravity == 0)
{
set_user_gravity(id, 0.25);
remove_entity(para_ent);
para_ent = 0;
}
if(powerpurgravity == 1)
{
set_user_gravity(id, 1.0);
remove_entity(para_ent);
para_ent = 0;
}
}
}
else if ((oldbutton & IN_USE) && para_ent > 0 )
{
if(powerpurgravity == 0)
{
set_user_gravity(id, 0.25);
remove_entity(para_ent);
para_ent = 0;
}
if(powerpurgravity == 1)
{
set_user_gravity(id, 1.0);
remove_entity(para_ent);
para_ent = 0;
}
}
}
return PLUGIN_HANDLED;
} //////////////////////
// POSTTHINK //
//////////////////////
public client_PostThink(id)
{
if(dojump == true && powerpurmultijump == 0)
{
new Float:velocity;
entity_get_vector(id,EV_VEC_velocity,velocity);
velocity = random_float(265.0,285.0);
entity_set_vector(id,EV_VEC_velocity,velocity);
dojump = false;
return PLUGIN_CONTINUE;
}
return PLUGIN_CONTINUE;
}
//////////////////////
// SPEEDB //
//////////////////////
public speedb(id)
{
if(powerpurspeed == 0)
{
new Float:speed = get_user_maxspeed(id) + 680.0;
set_user_maxspeed(id, speed);
}
return PLUGIN_HANDLED;
}
//////////////////////
// LASER LOOP //
//////////////////////
public laser_loop(id)
{
if(!is_user_alive(id))
{
return PLUGIN_HANDLED;
}
if(powerpurlaser == 0)
{
set_hudmessage(255, 0, 0, -1.0, -1.0, 0, 6.0, 10.0, 0.1, 0.1, 10);
show_hudmessage(id, "*");
set_task(0.0,"laser_loop",id);
}
return PLUGIN_HANDLED;
}
//////////////////////
// FLASH EVENT //
//////////////////////
public event_blinded(id)
{
if(powerpurflashglasses == 0)
{
message_begin(MSG_ONE,g_msgscreenfade,{0,0,0},id);
write_short(~0);
write_short(10);
write_short(1<<12);
write_byte(0);
write_byte(0);
write_byte(0);
write_byte(100);
message_end();
set_task(0.0,"event_blinded",id)
}
if(powerpurflashglasses == 1)
{
return PLUGIN_HANDLED;
}
return PLUGIN_HANDLED;
}
//////////////////////
// DEATHEVENT //
//////////////////////
public death_event(id)
{
if(para_ent > 0)
{
if(powerpurgravity == 0)
{
set_user_gravity(id, 0.25);
remove_entity(para_ent);
powerpurparachute = 1;
para_ent = 0;
}
if(powerpurgravity == 1)
{
set_user_gravity(id, 1.0);
remove_entity(para_ent);
powerpurparachute = 1;
para_ent = 0;
}
}
return PLUGIN_HANDLED;
}
//////////////////////
// ROUNDCHANGE //
//////////////////////
public roundchange(id)
{
new arg, name;
read_argv(1, arg,31);
new player = cmd_target(id,arg,4);
get_user_name(player,name,31);
powerpur = 1;
if(powerpurgravity == 0)
{
set_user_gravity(id, 1.0);
client_cmd(id,"spk purchasemod/drain");
client_print(id, print_chat, ": Gravity set back to normal!");
powerpurgravity = 1;
}
if(powerpurspeed == 0)
{
new Float:speed = get_user_maxspeed(id) - 680.0;
set_user_maxspeed(id,speed);
client_cmd(id,"spk purchasemod/drain");
client_print(id, print_chat, ": Speed set back to normal!");
powerpurspeed = 1;
}
if(powerpurstealth == 0)
{
set_user_rendering(id,kRenderFxNone,255,255,255, kRenderNormal,16);
set_user_footsteps(id,0);
client_cmd(id,"spk purchasemod/drain");
client_print(id, print_chat, ": Stealth level set back to normal!");
powerpurstealth = 1;
}
if(powerpurlaser == 0)
{
client_print(id, print_chat, ": Laser bulb burnt out!");
client_cmd(id,"spk purchasemod/drain");
powerpurlaser = 1;
}
if(powerpurflashglasses == 0)
{
client_print(id, print_chat, ": Your Flash Glasses broke!");
client_cmd(id,"spk purchasemod/drain");
powerpurflashglasses = 1;
}
if(powerpurmultijump == 0)
{
client_print(id, print_chat, ": Multi-Jump ability ran out!");
client_cmd(id,"spk purchasemod/drain");
powerpurmultijump = 1;
}
if(powerpurbunnyhop == 0)
{
client_print(id, print_chat, ": Bunny Hop ability ran out!");
client_cmd(id,"spk purchasemod/drain");
powerpurbunnyhop = 1;
}
if(powerpurhealth == 0)
{
client_cmd(id,"spk purchasemod/drain");
powerpurhealth = 1;
}
if(powerpurparachute == 0)
{
client_print(id, print_chat, ": Parachute ability ran out!");
client_cmd(id,"spk purchasemod/drain");
remove_entity(para_ent);
set_user_gravity(id, 1.0);
para_ent = 0;
powerpurparachute = 1;
}
return PLUGIN_HANDLED;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/ 编码问题.
UTF-8无签名格式 谢了,去试下 看到了這個
你為什麼不把插件傳上來呢?
而要發好幾篇的原始碼出來勒
你直接發插件 把錯誤訊息用出來
這樣不是比較簡單又快呢? 楼上的,直接发源码大家下载是要收费的,我这样虽然麻烦些,但这样大家测试的时候是不需要付费得哦! 那你可以使用論壇上的 插入代碼阿
這樣可以節省空間
又方便看 只要移動 代碼中的捲動 就可以了 本帖最后由 我是新手 于 2009-5-12 22:30 编辑
哈哈,这个功能我还没发现,多谢指教!(另外,你别用繁体了,看着眼花)
页:
[1]
2