This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

[Help] Admin models


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
black_heart
Senior Member
Join Date: May 2015
Old 07-26-2015 , 05:20   [Help] Admin models
Reply With Quote #1

Hi all, i want to edit this plugin
i want to make when someone choose model to stay until he dont want to change it agan
and the last 2 models (terminator and marijuana) to can be used only with admin flag (flag "d")
Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <colorchat>
#include <zombie_plague_advance>

#define PLUGIN "Admin Model Menu"
#define VERSION "1.0"
#define AUTHOR "Dimision"

public plugin_init() 
{
    register_plugin(PLUGIN, VERSION, AUTHOR)
    register_clcmd("say /model", "admin")
}

public plugin_precache() 
{
        precache_model("models/player/vip0/kotaka.mdl")
        precache_model("models/player/vip1/jigsaw.mdl")
	precache_model("models/player/vip2/death.mdl")
	precache_model("models/player/vip3/ADMIN-SKIN.mdl")
        precache_model("models/player/vip4/vipche.mdl")
	precache_model("models/player/vip5/admin3.mdl")
}
		
public admin(id)
{
	if (get_user_flags(id) & ADMIN_KICK)
		{
			model_menu(id)
		}
		else
        {
               ColorChat(id, GREEN, "^4[ZP]^1 This menu is for admins only!")
        }
	
}
public model_menu(id)
{
    new menu = menu_create("\dVIP/Admin \rSkin Menu", "menu_wybierz")
    
    menu_additem(menu, "\wModel \rPuss in boots", "1", 0)
    menu_additem(menu, "\wModel \rJigsaw", "2", 0)
    menu_additem(menu, "\wModel \rThe Death", "3", 0)
    menu_additem(menu, "\wModel \rMarijuana", "4", 0)
    menu_additem(menu, "\wModel \rTerminator", "5", 0)
    
    menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
    
    menu_display(id, menu, 0)
}

public menu_wybierz(id, menu, item)
{
    if (item == MENU_EXIT)
    {
        menu_destroy(menu)
        return PLUGIN_HANDLED
    }
    new data[6], iName[64]
    new acces, callback
    menu_item_getinfo(menu, item, acces, data,5, iName, 63, callback)
    
    new key = str_to_num(data)
    
    switch(key)
    { 
       case 1 : zp_set_user_model(id, "kotaka")
       case 2 : zp_set_user_model(id, "rabotche")
       case 3 : zp_set_user_model(id, "kroko")
       case 4 :	zp_set_user_model(id, "ADMIN-SKIN")
       case 5 : zp_set_user_model(id, "vipche")
       case 6 : zp_set_user_model(id, "admin3")
    }
    menu_destroy(menu)
    return PLUGIN_HANDLED
}
black_heart is offline
Send a message via Skype™ to black_heart
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:17.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode