搜索
查看: 3366|回复: 1

控制玩家金钱【只能給警察加錢】高手看哈什麽也上T的也可以加錢 或有沒有新版的插件

[复制链接]
发表于 2008-6-22 03:40:17 | 显示全部楼层 |阅读模式 来自 中国–广东–佛山
/* AMX Mod script.
*
* (c) Copyright 2002-2003, f117bomb
* This file is provided as is (no warranties).
*/
#include <amxmod>
#include <amxmisc>
#include <fun>
/*
* Usage: amx_money <authid, nick, @team or #userid> <money>
* Examples:
* amx_money @CT 100 - adds 100 dollars to ct's money
*
*/
public admin_money(id,level,cid) {
if (!cmd_access(id,level,cid,3))
return PLUGIN_HANDLED
new arg[32], arg2[8], name2[32]
read_argv(1,arg,31)
read_argv(2,arg2,7)
get_user_name(id,name2,31)
if (arg[0]=='@'){
new players[32], inum
get_players(players,inum,"ae",arg[1])
if (inum==0){
console_print(id,"No clients in such team")
return PLUGIN_HANDLED
}
for(new a=0;a<inum;++a) {
new money = get_user_money(players[a])
set_user_money(players[a],str_to_num(arg2) + money ,1)
}
switch(get_cvar_num("amx_show_activity")) {
case 2: client_print(0,print_chat,"ADMIN %s: set money on all %s",name2,arg[1])
case 1: client_print(0,print_chat,"1987: money %s",arg[1])
}
console_print(id,"All clients have set money")
}
else {
new player = cmd_target(id,arg,3)
if (!player) return PLUGIN_HANDLED
new money = get_user_money(player)
set_user_money(player,str_to_num(arg2) + money ,1)
new name[32]
get_user_name(player,name,31)
switch(get_cvar_num("amx_show_activity")) {
case 2: client_print(0,print_chat,"ADMIN %s: set money on %s",name2,name)
case 1: client_print(0,print_chat,"ADMIN: set money on %s",name)
}
console_print(id,"Client ^"%s^" has set money",name)
}
return PLUGIN_HANDLED
}
public plugin_init() {
register_plugin("Admin Money","0.9.3","f117bomb")
register_concmd("amx_money","admin_money",ADMIN_LEVEL_A,"<authid, nick, @team or #userid> <money>")
return PLUGIN_CONTINUE
}
发表于 2008-6-24 12:25:49 | 显示全部楼层 来自 中国–广东–云浮

回复: 控制玩家金钱【只能給警察加錢】高手看哈什麽也上T的也可以加錢 或有沒有新版

cmdmenu.amxx        ; 命令菜单 (声音播放, 各种设置)
plmenu.amxx        ; 玩家菜单 (踢人, 封人, 客户端命令等.)

例,给T加5000    amx_givemoney @TERRORIST 5000
一般的插件包都会有这两个插件的了.只是自己没留意而已

本帖子中包含更多资源

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

×
回复

使用道具 举报

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

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