|
New Member
|

07-15-2013
, 19:23
Vip is not working
|
#1
|
hi, i have an forum of surf, and i get some scripts, actually 3, all the 3 doesn't worked...
the first one was only working with the admins and not with the vips and we created a new admin and didn't work, and the other 2 didn't work. i copy one plugin of here from an another problem who was solved and i edited him to get the config most symilar what i want, the script is that
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <hamsandwich>
#include <fakemeta_util>
#include <colorchat>
static const COLOR[] = "^x04" //green
static const CONTACT[] = ""
new maxplayers
new gmsgSayText
new mpd, mkb, mhb
new round;
new g_menu_active
#define Keysrod (1<<0)|(1<<1)|(1<<2)|(1<<9)
public plugin_init()
{
register_plugin("VIP", "3.0", "Hasky")
mpd = register_cvar("vip_money_damage","3")
mkb = register_cvar("vip_money_kill","500")
mhb = register_cvar("vip_money_hs","1000")
g_menu_active = register_cvar("vip_guns_menu", "1")
register_event("Damage","Damage","b")
register_event("DeathMsg","death_msg","a")
register_clcmd("say /vip","ShowMotd")
register_clcmd("say /vmenu","MenuCMD")
maxplayers = get_maxplayers()
gmsgSayText = get_user_msgid("SayText")
register_clcmd("say", "handle_say")
register_cvar("amx_contactinfo", CONTACT, FCVAR_SERVER)
}
public MenuCMD(id) {
if(!is_user_alive(id)) {
client_print(id, print_chat, "[%s] You cannot use this command when you're dead");
return 0;
}
if(!(get_user_flags(id) & ADMIN_LEVEL_H)) {
client_print(id, print_chat, "[%s] You don't have access at ADMIN_LEVEL_H");
return 0;
}
Showrod(id);
return 0;
}
public Damage(id)
{
new weapon, hitpoint, attacker = get_user_attacker(id,weapon,hitpoint)
if(attacker<=maxplayers && is_user_alive(attacker) && attacker!=id)
if (get_user_flags(attacker) & ADMIN_LEVEL_H)
{
new money = read_data(2) * get_pcvar_num(mpd)
if(hitpoint==1) money += get_pcvar_num(mhb)
cs_set_user_money(attacker,cs_get_user_money(attacker) + money)
}
}
public Event_RoundRestart(id)
{
round=0;
}
public Showrod(id)
{
show_menu(id, Keysrod, "Guns Menu^n\w1. M3+Deagle^n\w2. Grenades^n0. Exit^n", -1, "rod") // Display menu
}
public Pressedrod(id, key)
{
switch (key) {
case 0: {
give_item(id,"weapon_m3")
give_item(id,"weapon_deagle")
give_item(id, "item_assaultsuit");
give_item(id, "item_thighpack");
cs_set_user_bpammo(id, CSW_M3, 264 );
cs_set_user_bpammo(id, CSW_DEAGLE, 264 );
client_print(id, print_center, "Você pegou gratuitamente M3 e Deagle.")
ColorChat(id, GREEN, "[VIP]^x01 Pegou gratuitamente M3 e Deagle")
}
case 2: {
give_item(id, "weapon_hegrenade");
give_item(id, "weapon_flashbang");
give_item(id, "weapon_flashbang");
give_item(id, "weapon_smokegrenade");
give_item(id, "item_assaultsuit");
give_item(id, "item_thighpack");
ColorChat(id, GREEN, "[VIP]^x01 Pegou gratuitamente um set de granadas.")
}
case 9: {
}
}
return PLUGIN_CONTINUE
}
public ShowMotd(id)
{
show_motd(id, "vip.txt")
}
public handle_say(id) {
new said[192]
read_args(said,192)
if( contain(said, "/vips") != -1 )
set_task(0.1,"print_adminlist",id)
return PLUGIN_CONTINUE
}
public print_adminlist(user)
{
new adminnames[33][32]
new message[256]
new contactinfo[256], contact[112]
new id, count, x, len
for(id = 1 ; id <= maxplayers ; id++)
if(is_user_connected(id))
if(get_user_flags(id) & ADMIN_LEVEL_H)
get_user_name(id, adminnames[count++], 31)
len = format(message, 255, "%s VIP Online: ",COLOR)
if(count > 0) {
for(x = 0 ; x < count ; x++) {
len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? ", ":"")
if(len > 96 ) {
print_message(user, message)
len = format(message, 255, "%s ",COLOR)
}
}
print_message(user, message)
}
else {
len += format(message[len], 255-len, "No VIP online.")
print_message(user, message)
}
get_cvar_string("amx_contactinfo", contact, 63)
if(contact[0]) {
format(contactinfo, 111, "%s Contato com o admin --(Skype Ar4kninja) %s", COLOR, contact)
print_message(user, contactinfo)
}
}
print_message(id, msg[]) {
message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
write_byte(id)
write_string(msg)
message_end()
}
please help me no one script is working with the vips work only with the old admins. all the vips and new admins say who don't have permission to use.
|
|