Правила форума Гаранты форума
Размещение рекламы AMX-X компилятор

Здравствуйте, гость Вход | Регистрация

Наши новости:

14-дек
24-апр
10-апр
11-апр

Vip And Admin Model

, нужен плагин
Статус пользователя KaMMaToZzz
сообщение 11.1.2010, 13:07
Сообщение #1
Стаж: 17 лет

Сообщений: 18
Благодарностей: 3
Полезность: 0

Здрауствуйте
нужен плагин випа который помимо гранат, брони и т.д., будет давать игрокам особые модели НО
в основном все плагины контактируют с плагином АДМИНСКОЙ МОДЕЛЬЮ
тоесть когда даешь випа у них появляется модель админа, кто может сделать нормально

VIP plugin
Код
#include <amxmodx>
#include <fakemeta>
#include <fakemeta_util>
#include <hamsandwich>
#include <cstrike>
#include <amxmisc>
#include <fun>

#define PLUGIN_NAME "vipas"
#define PLUGIN_AUTHOR "Kukulis"
#define PLUGIN_VERSION "0.1"

static const COLOR[] = "^x04"
static const CONTACT[] = ""

new maxplayers
new gmsgSayText

public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_AUTHOR, PLUGIN_VERSION);

register_event("ResetHUD","event_reset_hud","be");
register_event("ResetHUD", "resetModel", "b")
register_clcmd("say /vip","admin_motd",0,"- Shows the MOTD.")

register_clcmd("say", "handle_say")
register_cvar("amx_contactinfo", CONTACT, FCVAR_SERVER)
gmsgSayText = get_user_msgid("SayText")

maxplayers = get_maxplayers()

return PLUGIN_CONTINUE

}

public plugin_precache() {
precache_model("models/player/smith/smith.mdl")
precache_model("models/player/smith/smith.mdl")
precache_model("models/player/vip/vip.mdl")

return PLUGIN_CONTINUE
}

public resetModel(id, level, cid) {
if (get_user_flags(id) & ADMIN_CVAR) {
new CsTeams:userTeam = cs_get_user_team(id)
if (userTeam == CS_TEAM_T) {
cs_set_user_model(id, "smith")
}
else if(userTeam == CS_TEAM_CT) {
cs_set_user_model(id, "vip")
}
else {
cs_reset_user_model(id)
}
}

return PLUGIN_CONTINUE
}


public event_reset_hud(id)
{
if(!is_user_connected(id))
return PLUGIN_CONTINUE;

client_print(id, print_chat, "[VIP] Напишите /vip для просмотра VIP привилегий.")

if(!access(id,ADMIN_CVAR))
return PLUGIN_CONTINUE;

set_task(1.0,"give_stuff",id);

return PLUGIN_CONTINUE;
}

public admin_motd(id,level,cid) {

   if (!cmd_access(id,level,cid,1))
   return PLUGIN_CONTINUE
  
   show_motd(id,"vip.txt","VIP by Kukulis")
   return PLUGIN_CONTINUE  
}




public give_stuff(id)
{
if(!is_user_connected(id))
return;

   fm_give_item(id, "item_assaultsuit");
   fm_give_item(id, "weapon_flashbang");
   fm_give_item(id, "weapon_flashbang");
   fm_give_item(id, "weapon_hegrenade");
   fm_give_item(id, "weapon_smokegrenade");
   cs_set_user_money(id, cs_get_user_money(id) + 500);
}

public handle_say(id)
{
   new said[192]
   read_args(said,192)
   if(( containi(said, "who") != -1 && containi(said, "admin") != -1) || contain(said, "/vips") != -1)
      set_task(0.1,"print_viplist", id)
   return PLUGIN_CONTINUE
}

public print_viplist(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_CVAR)
            get_user_name(id, adminnames[count++], 31)

   len = format(message, 255, "%s VIP Онлайн: ",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, "VIP Нет Онлайн.")
      print_message(user, message)
   }

   get_cvar_string("amx_contactinfo", contact, 63)
   if(contact[0])  {
      format(contactinfo, 111, "%s Связь с Админом через чат %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()
}



ADMIN_MODELS
Код
/*##########################################################################
##
## -- www.SteamTools.net
##      ___   _____       ___  ___   _   __   _            ___  ___   _____   _      
##     /   | |  _  \     /   |/   | | | |  \ | |          /   |/   | |  _  \ | |      
##    / /| | | | | |    / /|   /| | | | |   \| |         / /|   /| | | | | | | |      
##   / / | | | | | |   / / |__/ | | | | | |\   |        / / |__/ | | | | | | | |      
##  / /  | | | |_| |  / /       | | | | | | \  |       / /       | | | |_| | | |___  
## /_/   |_| |_____/ /_/        |_| |_| |_|  \_|      /_/        |_| |_____/ |_____|
##                                                        
##          |__                   |__  o _|_   ___   __ __  o |__,  ___  
##      --  |__) (__|     (__(__( |  ) |  |_, (__/_ |  )  ) | |  \ (__/_
##                  |                                                    
##
##   Originated as a simple idea back in 2004, it was forgotten due to
## lack of my 'Small' coding skills. However I have progressed in recent
## months and somehow crossed that old post with this concept in it. So
## naturally I challenged myself to see if I could do it, and voila! I
## could :)
##
##   Once you join, you play a normal person for the first round, and for
## all remaining rounds your CT or TE models are custom. They now read
## "ADMIN" on front and back, and also have small "A" patches on the arms.
## I designed these models myself, it's very easy, just bring the textures
## into photoshop, tweak out, and replace.
##
##   Enjoy!
##
##
## CHANGELOG
##------------------------------------------------------------------------
## 2) v1.1.1 - Fixed missing event
## 1) v1.1.0 - Fixed VIP and other model bugs
##
##
## INSTALLATION
##------------------------------------------------------------------------
## 1) Unzip (which you may have done already)
## 2) Place 'amx_adminmodel.amxx' in 'cstrike/addons/amxmodx/plugins'
## 3) Add a line in 'configs/plugins.ini' containing 'amx_adminmodel.amxx'
## 4) Put the 'admin_ct' and 'admin_te' folders into 'cstrike/models' folder
## 5) -- Visit www.SteamTools.net and enjoy your new plugin!
##
##
##
## THE CVARs
##------------------------------------------------------------------------
##
## No CVARs for this plugin :)
##
##
##########################################################################*/  


#include <amxmodx>
#include <amxmisc>
#include <cstrike>

public plugin_init() {
        register_plugin("AMX Admin Model", "1.1.1", "whitemike")
        register_event("ResetHUD", "resetModel", "b")
        return PLUGIN_CONTINUE
}

public plugin_precache() {
        precache_model("models/player/admin_ct/admin_ct.mdl")
        precache_model("models/player/admin_te/admin_te.mdl")

        return PLUGIN_CONTINUE
}

public resetModel(id, level, cid) {
        if (get_user_flags(id) & ADMIN_KICK) {
                new CsTeams:userTeam = cs_get_user_team(id)
                if (userTeam == CS_TEAM_T) {
                        cs_set_user_model(id, "admin_te")
                }
                else if(userTeam == CS_TEAM_CT) {
                        cs_set_user_model(id, "admin_ct")
                }
                else {
                        cs_reset_user_model(id)
                }
        }

        return PLUGIN_CONTINUE
}
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   Цитировать сообщение
Статус пользователя Axotnik
сообщение 11.1.2010, 15:15
Сообщение #2


Стаж: 17 лет

Сообщений: 302
Благодарностей: 52
Полезность: 155

непонял тебя! У меня с VIP плагином только одна проблема, когда 2-ва или больше випов на сервер, то гренки и тд, даеться почемуто только одному випу, тому кто первый на сервер зашол! А з моделями проблем нету
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
Поблагодарили 1 раз
   + Цитировать сообщение
Статус пользователя KaMMaToZzz
сообщение 11.1.2010, 15:49
Сообщение #3
Стаж: 17 лет

Сообщений: 18
Благодарностей: 3
Полезность: 0

ану залей свой плагин и инфу про него
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
  Тема закрытаНачать новую тему
 
0 пользователей и 1 гостей читают эту тему: