Raised This Month: $12 Target: $400
 3% 

BB 5.4 | Grabs


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ace67
Senior Member
Join Date: Sep 2020
Location: France
Old 04-15-2021 , 11:43   BB 5.4 | Grabs
Reply With Quote #1

Hello,
I have a question, can someone edit this line for me so that the VIPS have the color blue and the users another color ?
I use the version 5.4 of basebuilder

Code:
	DispatchKeyValue(ent, "rendermode", "1");
	DispatchKeyValue(ent, "renderamt", "100");
	DispatchKeyValue(ent, "rendercolor", "135.0 206.0 235.0");

	g_MovingEnt[ent] = true
	g_EntMover[ent] = id
	g_pEnt[id] = ent
	g_pDist[id] = dist
Code:
public cmdMoveEnt(id)
{
	if (g_BuildBan[id] == true)
		return PLUGIN_HANDLED
	
	if (g_iszombie[id] && !access(id, AFTER_BUILD))
      		return PLUGIN_HANDLED 
			
	if (!g_CanBuild && !access(id, AFTER_BUILD))
	{
		client_print (id, print_center, "%L", LANG_SERVER, "FAIL_TIME_UP")
		return PLUGIN_HANDLED 
	}
	
	if (!g_isalive[id] && !access(id, DEAD_BUILD))
	{
		client_print (id, print_center, "%L", LANG_SERVER, "FAIL_DEAD")
		return PLUGIN_HANDLED 
	}

	if (g_pEnt[id] && is_valid_ent(g_pEnt[id])) 
		cmdStopEnt(id)
	
	new ent, bodypart
	get_user_aiming (id,ent,bodypart)
	
	if (!is_valid_ent(ent) || ent == g_iEntBarrier)
	{
		return PLUGIN_HANDLED
	}
	
	if (ent <= g_MaxPlayers && g_isalive[ent])
	{	
		return PLUGIN_HANDLED
	}
		
	if (IsBlockLocked(ent) || g_MovingEnt[ent])
	{
		return PLUGIN_HANDLED
	}

	if (get_pcvar_num(g_pcvar_claimable) == 1)
	{
		if (!g_EntOwner[ent])
		{
			if ((g_OwnedEnts[id]<get_pcvar_num(g_pcvar_maxclaimable)) || get_pcvar_num(g_pcvar_maxclaimable) == 0)
			{
				g_EntOwner[ent] = id
				g_OwnedEnts[id]++
			}
			else
			{
				client_print (id, print_center, "%L", LANG_SERVER, "FAIL_MAXOWNED", get_pcvar_num(g_pcvar_maxclaimable))
				//return PLUGIN_HANDLED 
			}
		}
		else if (g_EntOwner[ent] != id && !access(id, AFTER_BUILD))
		{
			client_print (id, print_center, "%L", LANG_SERVER, "FAIL_ALREADYOWNED")
			return PLUGIN_HANDLED 
		}
	}
	
	new tname[7], cname[10];
	entity_get_string(ent, EV_SZ_targetname, tname, 6);
	entity_get_string(ent, EV_SZ_classname, cname, 9);
	if (!equal(cname, "func_wall") || equal(tname, "ignore"))
	{
		return PLUGIN_HANDLED
	}
	
	new origin[3], entOrigin[3], Float:orig[3], Float:mins[3], Float:maxs[3], dist
	
	entity_get_vector(ent, EV_VEC_origin, orig);
	entity_get_vector(ent, EV_VEC_mins, mins);
	entity_get_vector(ent, EV_VEC_maxs, maxs);

	entOrigin[0] = floatround((mins[0] + maxs[0]) / 2 + orig[0]);
	entOrigin[1] = floatround((mins[1] + maxs[1]) / 2 + orig[1]);
	entOrigin[2] = floatround((mins[2] + maxs[2]) / 2 + orig[2]);
	
	get_user_origin(id, origin);

	dist = get_distance(origin, entOrigin);
	
	new max = get_pcvar_num(g_pcvar_entmaxdist)
	new min = get_pcvar_num(g_pcvar_entmindist)
	if (min) //min
	{
		if(dist < min) //minimum
			dist = get_pcvar_num(g_pcvar_entsetdist);
	}

	if (max) //maximum
	{
		if (dist > max)
			return PLUGIN_HANDLED
	}
	
	DispatchKeyValue(ent, "rendermode", "1");
	DispatchKeyValue(ent, "renderamt", "100");
	DispatchKeyValue(ent, "rendercolor", "135.0 206.0 235.0");

	g_MovingEnt[ent] = true
	g_EntMover[ent] = id
	g_pEnt[id] = ent
	g_pDist[id] = dist
	
	if (!g_CanBuild && access(id, AFTER_BUILD))
	{
		new adminauthid[35],adminname[35]
		get_user_authid (id,adminauthid,34)
		get_user_name(id,adminname,34)
		Log("[MOVE] Admin: %s || SteamID: %s moved an entity", adminname, adminauthid)
	}
	
	return PLUGIN_HANDLED
}
__________________
CS:CZ > CS 1.6

Last edited by Ace67; 04-15-2021 at 11:43.
Ace67 is offline
Reply


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 07:45.


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