|
发表于 2009-4-19 23:38:07
|
显示全部楼层
来自 中国–广东–东莞
#include <amxmodx>
#include <fun>
#include <cstrike>
#include <zombieplague>
/*===========自定权限分类========*/
//生命
#define hp1 100
#define hp2 110
#define hp3 120
#define hp4 130
#define hp5 140
#define hp6 150
/*==========*/
//子弹包
#define ap1 200
#define ap2 200
#define ap3 200
#define ap4 200
#define ap5 200
#define ap6 200
/*=========*/
//护甲
#define am1 150
#define am2 170
#define am3 190
#define am4 200
#define am5 220
#define am6 255
public eNewRound(id){
{
if(get_user_flags(id) & ADMIN_LEVEL_A){
set_user_health(id, get_user_health(id) + hp1)
}
if(get_user_flags(id) & ADMIN_LEVEL_B){
set_user_health(id, get_user_health(id) + hp2)
}
if(get_user_flags(id) & ADMIN_LEVEL_C){
set_user_health(id, get_user_health(id) + hp3)
}
if(get_user_flags(id) & ADMIN_LEVEL_D){
set_user_health(id, get_user_health(id) + hp4)
}
if(get_user_flags(id) & ADMIN_LEVEL_E){
set_user_health(id, get_user_health(id) + hp5)
}
if(get_user_flags(id) & ADMIN_ADMIN){
set_user_health(id, get_user_health(id) + hp6)
}
if(get_user_flags(id) & ADMIN_USER){
set_user_health(id, get_user_health(id) + 0)
}}}
public eResetHUD(id){
set_hudmessage(255,0,0,0.7, 0.5, 0, 10.0, 10.0, 0.5, 0.15, 3)
{
if(get_user_flags(id) & ADMIN_LEVEL_B){
show_hudmessage(id,"等级权限:<体验会员>额外增值生命%d护甲%d子弹包",am1 ,ap1)
zp_set_user_ammo_packs(id, zp_get_user_ammo_packs(id) + ap1)
cs_set_user_armor(id ,am1 ,CS_ARMOR_KEVLAR)
}
if(get_user_flags(id) & ADMIN_LEVEL_C){
show_hudmessage(id,"等级权限:<普通VIP>额外增值生命%d护甲%d子弹包",am2, ap2)
zp_set_user_ammo_packs(id, zp_get_user_ammo_packs(id) + ap2)
cs_set_user_armor(id ,am2 ,CS_ARMOR_KEVLAR)
}
if(get_user_flags(id) & ADMIN_LEVEL_D){
show_hudmessage(id,"等级权限:<中级VIP>^n^n额外增值生命%d护甲%d子弹包",am3, ap3 )
zp_set_user_ammo_packs(id, zp_get_user_ammo_packs(id) + ap3)
cs_set_user_armor(id ,am3 ,CS_ARMOR_KEVLAR)
}
if(get_user_flags(id) & ADMIN_LEVEL_E){
show_hudmessage(id,"等级权限:<高级VIP>额外增值生命%d护甲%d子弹包",am4, ap4)
zp_set_user_ammo_packs(id, zp_get_user_ammo_packs(id) + ap4)
cs_set_user_armor(id ,am4 ,CS_ARMOR_KEVLAR)
}
if(get_user_flags(id) & ADMIN_LEVEL_F){
show_hudmessage(id,"等级权限:<OP巡查>额外增值生命%d护甲%d子弹包",am5, ap5)
zp_set_user_ammo_packs(id, zp_get_user_ammo_packs(id) + ap5)
cs_set_user_armor(id ,am5 ,CS_ARMOR_KEVLAR)
}
if(get_user_flags(id) & ADMIN_ADMIN){
show_hudmessage(id,"等级权限:<服务器OP>额外增值生命%d护甲%d子弹包",am6, ap6)
zp_set_user_ammo_packs(id, zp_get_user_ammo_packs(id) + ap6)
cs_set_user_armor(id ,am6 ,CS_ARMOR_KEVLAR)
}
if(get_user_flags(id) & ADMIN_USER){
show_hudmessage(id,"等级权限:<普通玩家>无任何增值生命和护甲^n^n每局额外获得2子弹包")
zp_set_user_ammo_packs(id, zp_get_user_ammo_packs(id) + 2)
}
}
}
public plugin_init(){
register_plugin("admin分级系统","1.0","飞的更高")
register_event("RoundTime", "eNewRound", "be")
register_event("ResetHUD","eResetHUD","be")
}
public client_putinserver(id){
client_print(0, print_chat, "[BT服]本服务器拥有等级分级系统,VIP拥有不同的级别<所属作者:飞的更高>ID:OKOK")
} |
|