Raised This Month: $ Target: $400
 0% 

Solved [CSTRIKE] Non-player entity 0 out of range


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Old 07-21-2019 , 12:12   Re: [CSTRIKE] Non-player entity 0 out of range
Reply With Quote #7

Quote:
Originally Posted by E1_531G View Post
pWeapon is an ent. The correct check will be this:

or
Something like that:
Code:
public taskGiveWeapon(iTaskId)
{
	if (!is_user_alive(ID_GIVEWEAPON))
		return;

	if (ID_GIVEWEAPON == g_rgLR[LR_GUARD])
	{
		if (is_user_alive(g_rgLR[LR_PRISONER]))
			StripWeapons(g_rgLR[LR_PRISONER]);
	}
	else
	{
		if (is_user_alive(g_rgLR[LR_GUARD]))
			StripWeapons(g_rgLR[LR_GUARD]);
	}

	new pWeapon = give_item(ID_GIVEWEAPON, g_pszNameLrWeapon);
		
	if (!pev_valid(pWeapon)) 
		return;
		
	//if (pWeapon != -1)
	cs_set_weapon_ammo(pWeapon, 1);
}

Last edited by Fuck For Fun; 07-21-2019 at 13:53.
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
 



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:31.


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