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

-1 Problem plugin!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Tatu Eugen
Member
Join Date: Apr 2010
Old 04-28-2016 , 17:26   -1 Problem plugin!
Reply With Quote #1

Hello i have a problem, this code can make -1, -10, etc. weapons in every account used if that guy send a gift and sell in both times, i need to keep 0 if is -1 that player have unlimited "weapons". Anyone? Thanks
Code:
	else if(MenuMod[id] == 5)
	{
		if(Key == -1)
		{
			aTarget[id] = 0;
		}
		if(Key == -2)
		{
			MenuMod[id] = -2;
		}
		if(Key == -3)
		{
			if(aThing[id] < 100)
			{
				if(uWeapon[aThing[id]][id] > 0)
				{
					if(uWeapon[aThing[id]][id]<aPoints[id])
					{
						client_cmd(id, "messagemode Gift");
						print_color(id, "!g%s !y!g%d !t%s!y arma.", Prefix, aPoints[id], WeaponNames[aThing[id]]);
						return PLUGIN_CONTINUE;
					}
					uWeapon[aThing[id]][aTarget[id]]+=aPoints[id];
					uWeapon[aThing[id]][id]-=aPoints[id];
					new Name[32], Name2[32];
					get_user_name(id, Name, 31);
					get_user_name(aTarget[id], Name2, 31);
					print_color(id, "!g%s !yTrimis !t%s!y - !g%d !t%s!y", Prefix, Name2, aPoints[id], WeaponNames[aThing[id]]);
					print_color(aTarget[id], "!g%s !t%s !yTrimis !g%d !t%s!y.", Prefix, Name, aPoints[id], WeaponNames[aThing[id]]);
					Save(aTarget[id]);
					Save(id);
					MenuMod[id] = 0;
					aThing[id] = 0;
					aTarget[id] = 0;
					aPoints[id] = 0;
 
				}
			}
			else
			{
				new Name[32], Name2[32];
				get_user_name(id, Name, 31);
				get_user_name(aTarget[id], Name2, 31);
				if(101 == aThing[id])
				{
					if(Chest[id]<aPoints[id])
					{
						client_cmd(id, "messagemode Gift");
						print_color(id, "!g%s !yTrimite !g%d !tCufar!y.", Prefix, aPoints[id]);
						return PLUGIN_CONTINUE;
					}
					Chest[aTarget[id]]+=aPoints[id];
					Chest[id]-=aPoints[id];
					print_color(id, "!g%s !yTrimis !t%s!y - !g %d!t Cufar!y.", Prefix, Name2, aPoints[id]);
					print_color(aTarget[id], "!g%s !t%s !yTrimis!g %d!t Cufar!y.", Prefix, Name, aPoints[id]);
				}
				else if(102 == aThing[id])
				{
					if(pKey[id]<aPoints[id])
					{
						client_cmd(id, "messagemode Gift");
						print_color(id, "!g%s !yTrimite !g%d!t Cheie!y.", Prefix, aPoints[id]);
						return PLUGIN_CONTINUE;
					}
					pKey[aTarget[id]]+=aPoints[id];
					pKey[id]-=aPoints[id];
					print_color(id, "!g%s !yTrimis !t%s!y - !g %d!t Cheie!y.", Prefix, Name2, aPoints[id]);
					print_color(aTarget[id], "!g%s !t%s !yTrimis!g %d!t Cheie!y.", Prefix, Name, aPoints[id]);
				}
				else if(103 == aThing[id])
				{
					if(Points[id]<aPoints[id])
					{
						client_cmd(id, "messagemode Gift");
						print_color(id, "!g%s !yTrimite !g%d puncte.", Prefix, aPoints[id]);
						return PLUGIN_CONTINUE;
					}
					Points[aTarget[id]] += aPoints[id];
					Points[id] -= aPoints[id];
					print_color(id, "!g%s !yTrimis !t%s!y - !g%d!t Puncte!y.", Prefix, Name2, aPoints[id]);
					print_color(aTarget[id], "!g%s !t%s !yTrimis !g%d!t Puncte!y.", Prefix, Name, aPoints[id]);
				}
				Save(aTarget[id]);
				Save(id);
				MenuMod[id] = 0;
				aThing[id] = 0;
				aTarget[id] = 0;
				aPoints[id] = 0;
			}
		}
		if(Key == -4)
		{
			client_cmd(id, "messagemode Gift");
			return PLUGIN_CONTINUE;
		}
		if(Key > 0)
			aTarget[id] = Key;
		Menu(id);
		return PLUGIN_CONTINUE;
	}
__________________
Tatu Eugen is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 04-28-2016 , 20:00   Re: -1 Problem plugin!
Reply With Quote #2

What?
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd 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 07:21.


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