|
发表于 2005-6-19 11:36:52
|
显示全部楼层
来自 中国–辽宁–沈阳
我不太会编码,这个是我的朋友Hydralisk刚刚编的
用法:amx_slapw 用户名或者他的id 力量 SLAP the player
amx_slayw 用户名或者他的id Slay the player
- /* AMX MOD Script
- * Author: Hydralisk
- * Date: 2005.6.19 11:27
- *
- */
- #include <amxmod>
- #include <amxmisc>
- public plugin_init(){
- register_plugin("Slay and Slap wo a","0.1","Hydralisk")
- register_concmd("amx_slayw","slayw",ADMIN_SLAY,"Slay a player")
- register_concmd("amx_slapw","slapw",ADMIN_SLAY,"Slap a player")
- return PLUGIN_CONTINUE
- }
- public slayw(id,level,cid){
- if (!cmd_access(id,level,cid,2)) return PLUGIN_HANDLED
- new arg[33]
- read_argv(1,arg,32)
- new player = cmd_target(id,arg,4)
- if (!player) return PLUGIN_HANDLED
- user_kill(player,1)
- return PLUGIN_HANDLED
- }
- public slapw(id,level,cid){
- if (!cmd_access(id,level,cid,2)) return PLUGIN_HANDLED
- new arg[33],arg2[9]
- read_argv(1,arg,32)
- read_argv(2,arg2,8)
- new poweri = str_to_num(arg2)
- new player = cmd_target(id,arg,4)
- if (!player) return PLUGIN_HANDLED
- user_slap(player,poweri)
- return PLUGIN_HANDLED
- }
复制代码
试试,我的机器没有CS |
|