下面是引用 tony987852 於 2010-01-22 21:07 發表的 :  
 
其實直接用 give_item(id, "weapon_ak47") 就好了... 
其實不用fm就可以了- - 
set_user_gravity(id, x.x)  // 這個就是重力是800x多少,例如你想要重力400的,就把x.x變成0.5 ,因為800x0.5=400 
.......
 #include <amxmodx> 
#include <cstrike> 
#include <fun> 
#include <zombieplague> 
#define PLUGIN "插件的大名" 
#define VERSION "版本" 
#define AUTHOR "作者名" 
new const g_item_name[] = { "他的名字" } 
const g_item_cost = 20 // 多少子彈包 
new g_item 
new item[33] 
public plugin_init() 
{ 
register_plugin( PLUGIN, VERSION, AUTHOR ) 
item = zp_register_extra_item(g_item_name, g_item_cost, ZP_TEAM_HUMAN) 
register_forward(FM_PlayerPreThink, "fwd_PlayerPreThink") 
register_event("DeathMsg", "event_Death", "a") 
register_event("HLTV", "event_RoundStart", "a", "1=0", "2=0")  
} 
public zp_extra_item_selected(id, itemid) 
{ 
if (itemid == g_item) 
{ 
item[id] = true 
} 
} 
public  fwd_PlayerPreThink(id) 
{ 
if(item[id]) 
{ 
new random = random_num(0,9) //這個代表有多少個機會(從0至9抽一個數字) 這個代表有10次機會 
if(!is_user_alive(id)) return PLUGIN_HANDLED // 當他不是在生存時, 不讓他抽 
switch (random) 
{ 
case 0: // 如果抽中的數字為0 
{ 
cs_set_user_money(id,16000) // 玩家金錢變16000美元 
client_print(id,print_chat,"你獲得了16000美元。") 
} 
case 1: // 如果抽中的數字為1 
{ 
set_user_health(id,30000) // 玩家的血變成30000 
client_print(id,print_chat,"你變成了血牛...") 
} 
default: //沒有抽中 
{ 
client_print(id,print_chat,"下次再抽吧...") 
} 
} 
} 
return PLUGIN_HANDLED 
} 
public zp_user_infected_post(id, infector) 
{ 
 item[id] = false 
} 
public zp_user_humanized_post(id) 
{ 
item[id] = false 
} 
public client_connect(id) 
{ 
 item[id] = false 
} 
public client_disconnect(id) 
{ 
item[id] = false 
} 
public event_Death() 
{ 
 new id = read_data(2) 
 if (!(1 <= id <= 32)) 
  return;    
item[id] = false 
} 
public event_RoundStart(id) 
{ 
 for (new id = 1; id <= 32; id++) 
 { 
 item[id] = false 
 } 
}