Raised This Month: $ Target: $400
 0% 

[REQ] VIP+ADMIN+Owner Skins Plugin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ironskillz1
AlliedModders Donor
Join Date: Jul 2012
Location: Sweden
Old 12-04-2016 , 19:08   Re: [REQ] VIP+ADMIN+Owner Skins Plugin
Reply With Quote #2

Not tested, did this while tired so maybe some mistake some where.

Code:
#include <amxmodx> 
#include <cstrike> 

enum 
{ 
	TEAM_UNASSIGNED, 
	TEAM_T, 
	TEAM_CT, 
	TEAM_SPECTATOR 
}; 

enum _:enumPlayerModels
{
	Owner,
	Admin,
	Vip
}

new const Player_Level[enumPlayerModels][] =
{
	ADMIN_LEVEL_C, //owner
	ADMIN_BAN, //admin
	ADMIN_LEVEL_H //vip
}

new const Player_Models[enumPlayerModels][] =
{
	{"models/player/lamdaskins/ownerct.mdl", "models/player/lamdaskins/ownert.mdl"},
	{"models/player/lamdaskins/adminct.mdl", "models/player/lamdaskins/admint.mdl"},
	{"models/player/lamdaskins/vipct.mdl", "models/player/lamdaskins/vipt.mdl"}
}

new playerModel[33];

public plugin_precache() 
{ 
	for(new i = 0; i < enumPlayerModels; i++)
	{
		precache_model(Player_Models[i][0]) //ct models
		precache_model(Player_Models[i][1]) //t models
	}
} 

public plugin_init() 
{ 
	register_plugin("Admin Models", "1.0", "SnusMumrikeN");
	
	register_event("ResetHUD", "ResetHUD", "be"); 
} 

public client_authorized(id)
{
	playerModel[id] = -1;
	
	for(new i = 0; i < enumPlayerModels; i++)
	{
		if (get_user_flags(id) & Player_Level[i][0]) 
		{
			playerModel[id] = i;
			return;
		}
	}
}

public ResetHUD(id) 
{ 
	if(playerModel[id] == -1)
		return;
		
	if (!is_user_alive(id)) 
		return; 
	
	new CsTeams:Team = cs_get_user_team(id); 
	
	switch (Team) 
	{ 
		case TEAM_CT: cs_set_user_model(id, Player_Models[playerModel[id]][0]); 	
		case TEAM_T: cs_set_user_model(id, Player_Models[playerModel[id]][1]);  
	} 
	
}
__________________
I have many private and unique plugins for Jailbreak and Hide'N'Seek. PM me for more info.

Pm me.

Check out my roulette site.
ironskillz1 is offline
Send a message via Skype™ to ironskillz1
 


Thread Tools
Display Modes

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 18:11.


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