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

ZP5.0.8 Lasermine


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Andriis
Member
Join Date: May 2019
Old 06-02-2019 , 06:59   ZP5.0.8 Lasermine
Reply With Quote #1

I am trying to make the lasermine plugin from zp 4.3 for 5.0.8 to be compatible with both of them but .. I have a few problems defining each round like, assassin, nemesis, survivor, swarm, plague, armageddon and !round not started..
Here is the code:

Code:
bool:CreateCheck(id)
{
	if(!CanCheck(id,0)) return false;

	#if defined USE_ZP50
	if(zp_has_round_started() && get_pcvar_num(g_NOROUND))
	{
		client_print(id, print_chat, "%L %L", id, "CHATTAG",id, "STR_NOROUND")
		return false;
	}

	if(zp_class_nemesis_get() && get_pcvar_num(g_NEMROUND))
	{
		client_print(id, print_chat, "%L %L", id, "CHATTAG",id, "STR_NEMROUND")
		return false;
	}

	if(zp_class_survivor_get() && get_pcvar_num(g_SURVROUND))
	{
		client_print(id, print_chat, "%L %L", id, "CHATTAG",id, "STR_SURVROUND")
		return false;
	}
	
	if(zp_is_swarm_round() && get_pcvar_num(g_SWARMROUND))
	{
		client_print(id, print_chat, "%L %L", id, "CHATTAG",id, "STR_SWARMROUND")
		return false;
	}
	if(zp_is_plague_round() && get_pcvar_num(g_PLAGUEROUND))
	{
		client_print(id, print_chat, "%L %L", id, "CHATTAG",id, "STR_PLAGUEROUND")
		return false;
	}
	if(zp_class_assassin_get() && get_pcvar_num(g_ASSROUND))
	{
		client_print(id, print_chat, "%L %L", id, "CHATTAG",id, "STR_ASSROUND")
		return false;
	}
	if(zp_class_sniper_get() && get_pcvar_num(g_SNIPERROUND))
	{
		client_print(id, print_chat, "%L %L", id, "CHATTAG",id, "STR_SNIPERROUND")
		return false;
	}
	if(zp_is_lnj_round() && get_pcvar_num(g_ARMAGEROUND))
	{
		client_print(id, print_chat, "%L %L", id, "CHATTAG",id, "STR_LNJROUND")
		return false;
	}
	#else
	if(!zp_has_round_started() && get_pcvar_num(g_NOROUND))
	{
		client_print(id, print_chat, "%L %L", id, "CHATTAG",id, "STR_NOROUND")
		return false;
	}

	if(zp_is_nemesis_round() && get_pcvar_num(g_NEMROUND))
	{
		client_print(id, print_chat, "%L %L", id, "CHATTAG",id, "STR_NEMROUND")
		return false;
	}

	if(zp_is_survivor_round() && get_pcvar_num(g_SURVROUND))
	{
		client_print(id, print_chat, "%L %L", id, "CHATTAG",id, "STR_SURVROUND")
		return false;
	}
	
	if(zp_is_swarm_round() && get_pcvar_num(g_SWARMROUND))
	{
		client_print(id, print_chat, "%L %L", id, "CHATTAG",id, "STR_SWARMROUND")
		return false;
	}
	#endif
	

	if(g_deployed[id] >= get_pcvar_num(g_LAMMO))
	{
		client_print(id, print_chat, "%L %L", id, "CHATTAG",id, "STR_MAXDEPLOY")
		return false;
	}

	if(TeamDeployedCount(id) >= get_pcvar_num(g_LTMAX))
	{
		client_print(id, print_chat, "%L %L", id, "CHATTAG",id, "STR_MANYPPL")
		return false;
	}
	new Float:vTraceDirection[3], Float:vTraceEnd[3],Float:vOrigin[3];
	pev(id, pev_origin, vOrigin);
	velocity_by_aim(id, 128, vTraceDirection);
	xs_vec_add(vTraceDirection, vOrigin, vTraceEnd);
	engfunc(EngFunc_TraceLine, vOrigin, vTraceEnd, DONT_IGNORE_MONSTERS, id, 0);
	new Float:fFraction,Float:vTraceNormal[3];
	get_tr2(0, TR_flFraction, fFraction);
	// -- We hit something!
	if(fFraction < 1.0)
	{
		// -- Save results to be used later.
		get_tr2(0, TR_vecEndPos, vTraceEnd);
		get_tr2(0, TR_vecPlaneNormal, vTraceNormal);

		return true;
	}

	client_print(id, print_chat, "%L %L", id, "CHATTAG",id, "STR_PLANTWALL")
	DeleteTask(id);
	// -- Did not touched something. (not solid)
	return false;
}
Can someone help me with this? Thanks in advance
Andriis is offline
Andriis
Member
Join Date: May 2019
Old 06-02-2019 , 08:45   Re: ZP5.0.8 Lasermine
Reply With Quote #2

delete
Andriis 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 17:39.


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