Raised This Month: $ Target: $400
 0% 

Vip head


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Admin Commands       
Reaload
Junior Member
Join Date: Jan 2009
Old 01-18-2009 , 03:55   Vip head
Reply With Quote #1

I try to edit admin_mark plugin to change the models, but I got the error. Maybe what I say what is wrong here and help?
Here is an error :
Code:
"Dropped DLK|#Reaload` from server
Reason:  Bad file Server is enforcing file consistency for models/player/terror/terror.mdl
And Here is plugin sma :
Code:
/* AMX Mod X
*   Admin Mark
*
* (c) Copyright 2007 by KaLoSZyFeR
*
* This file is provided as is (no warranties)
*
*     DESCRIPTION
*       Plugin marks admin by adding on his head special helmet or beret. Size of model
*	is less than 60kb, so player don't have to extra download whole admin model (size: 2Mb)
*	like in other plugins such as KaOs' "Admin Models".
*
*     FEATURES
*       - if admin is CT, he wears special helmet
*	- if admin is T, he wears special beret
*
*
*     CVARS
*       amx_admin_mark (0: OFF, 1: ON, default: 1) - disables/enables plugin
*
*     VERSIONS
*       1.0   first release
*	1.1   added forcing standard models, optimized some code
*	1.2   changed really smart part of code (1 word...)
*
*/

#include <amxmodx>
#include <cstrike>
#include <engine>

new g_adminmarkEnt[33]
new cvar_enable
new MODEL_MARK[] 	= "models/vip_head.mdl"

static const PLUGIN_NAME[] 	= "Vip Mark"
static const PLUGIN_AUTHOR[] 	= "Reaload"
static const PLUGIN_VERSION[]	= "1.2"

public plugin_init()
{
	register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)
	register_cvar(PLUGIN_NAME, PLUGIN_VERSION, FCVAR_SPONLY|FCVAR_SERVER)	
	cvar_enable = register_cvar("amx_admin_mark", "1")
}

public plugin_precache()
{
	precache_model(MODEL_MARK)	
	
	force_unmodified(force_model_samebounds,{0,0,0},{0,0,0},"models/player/gign/gign.mdl")
	force_unmodified(force_model_samebounds,{0,0,0},{0,0,0},"models/player/gsg9/gsg9.mdl")
	force_unmodified(force_model_samebounds,{0,0,0},{0,0,0},"models/player/sas/sas.mdl")
	force_unmodified(force_model_samebounds,{0,0,0},{0,0,0},"models/player/urban/urban.mdl")
	force_unmodified(force_model_samebounds,{0,0,0},{0,0,0},"models/player/vip/vip.mdl")

	force_unmodified(force_model_samebounds,{0,0,0},{0,0,0},"models/player/arctic/arctic.mdl")
	force_unmodified(force_model_samebounds,{0,0,0},{0,0,0},"models/player/guerilla/guerilla.mdl")
	force_unmodified(force_model_samebounds,{0,0,0},{0,0,0},"models/player/leet/leet.mdl")
	force_unmodified(force_model_samebounds,{0,0,0},{0,0,0},"models/player/terror/terror.mdl")	
}

public client_connect(id)
{
	if(g_adminmarkEnt[id] > 0)
		remove_entity(g_adminmarkEnt[id])
	g_adminmarkEnt[id] = 0
}

public client_disconnect(id)
{
	if(g_adminmarkEnt[id] > 0)
		remove_entity(g_adminmarkEnt[id])
	g_adminmarkEnt[id] = 0
}

public client_PreThink(id)
{
	if(!is_user_connected(id))
		return PLUGIN_CONTINUE
	
	if(!is_user_alive(id) && g_adminmarkEnt[id] > 0)
	{
		remove_entity(g_adminmarkEnt[id])
		g_adminmarkEnt[id] = 0
		
		return PLUGIN_CONTINUE
	}
	
	if (!(get_user_flags(id) & ADMIN_KICK))
	{
		remove_entity(g_adminmarkEnt[id])
		g_adminmarkEnt[id] = 0
		
		return PLUGIN_CONTINUE
	}
	
	if(!get_pcvar_num(cvar_enable))
		return PLUGIN_CONTINUE
		
	if(!is_user_alive(id))
		return PLUGIN_CONTINUE
		
	if(g_adminmarkEnt[id] < 1)
	{
		g_adminmarkEnt[id] = create_entity("info_target")
		if(g_adminmarkEnt[id] > 0)
		{
			entity_set_int(g_adminmarkEnt[id], EV_INT_movetype, MOVETYPE_FOLLOW)
			entity_set_edict(g_adminmarkEnt[id], EV_ENT_aiment, id)
			entity_set_model(g_adminmarkEnt[id], MODEL_MARK)			
		}
	}
	
	if (g_adminmarkEnt[id] > 0)
	{
		new modelID = get_model_id(id)
		entity_set_int(g_adminmarkEnt[id], EV_INT_body, modelID)
	}

	if(g_adminmarkEnt[id] < 1)
		return PLUGIN_CONTINUE

	return PLUGIN_CONTINUE
}

new modelname[9][] ={
	"gign",
	"gsg9",
	"sas",
	"urban",
	"vip",
	"arctic",
	"guerilla",
	"leet",
	"terror"
}

public get_model_id(id)
{
	new modelStr[32], iNum=32, modelID
	get_user_info(id,"model",modelStr,iNum)
	
	for(new i = 0; i < 9; i++)
	{
		if (equali (modelStr, modelname[i]) )
		{
			modelID = i
		}
	}	
	return modelID
}
Attached Files
File Type: sma Get Plugin or Get Source (vip_mark.sma - 993 views - 3.7 KB)
Reaload is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-18-2009 , 04:02   Re: Vip head
Reply With Quote #2

Wrong place, post this in scripting help section.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
kich0
Member
Join Date: Aug 2008
Old 01-18-2009 , 04:17   Re: Vip head
Reply With Quote #3

actually this is model bug...not plugin...so get a new model which your game will accept...try www.fpsbanana.com
kich0 is offline
Reaload
Junior Member
Join Date: Jan 2009
Old 01-18-2009 , 06:14   Re: Vip head
Reply With Quote #4

I try to change model but nothing.. Error again..
Reaload is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 01-18-2009 , 12:12   Re: Vip head
Reply With Quote #5

Moved to Scripting

You get that error because your terror.mdl file doesn't match the file on your client's comp.
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Plug me up
Member
Join Date: Aug 2008
Old 01-18-2009 , 14:38   Re: Vip head
Reply With Quote #6

do you have any skin on your cs? thats the error i think u r getting. Server is accusing that you dont have the original terror model
__________________
always +karma to thoose who helps
Plug me up is offline
kich0
Member
Join Date: Aug 2008
Old 01-18-2009 , 14:45   Re: Vip head
Reply With Quote #7

you can have different model then server...but you probably got corrupted model or model for ther game...
kich0 is offline
Plug me up
Member
Join Date: Aug 2008
Old 01-18-2009 , 18:39   Re: Vip head
Reply With Quote #8

Quote:
Originally Posted by kich0 View Post
you can have different model then server...but you probably got corrupted model or model for ther game...
not if the server has mp_consistency 1
__________________
always +karma to thoose who helps
Plug me up is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 01-18-2009 , 20:16   Re: Vip head
Reply With Quote #9

Quote:
Originally Posted by Plug me up View Post
not if the server has mp_consistency 1
And if the plugin force unmodified files, which this one does
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
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 01:40.


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