Command not returning a weapon
#1

Код:
CMD:knife(playerid, params[])
{
	if (IsAHitman(playerid))
		{
			if(PlayerInfo[playerid][pKnife] == 1 && GetPlayerWeapon(playerid) == 4)
			{
				PlayerInfo[playerid][pKnifeHidden] = 1;
				RemovePlayerWeapon(playerid, 4);
				SendClientMessageEx(playerid, COLOR_YELLOW, "You have hidden your knife.");
			}
			if(PlayerInfo[playerid][pKnifeHidden] == 1 && !GetPlayerWeapon(playerid) == 4)
			{
				PlayerInfo[playerid][pKnifeHidden] = -1;
				GivePlayerValidWeapon(playerid, 4);
				SendClientMessageEx(playerid, COLOR_YELLOW, "You have pulled out your knife.");
			}
		}
	else 
	{
		SendClientMessageEx(playerid, COLOR_GREY, "You are not a member of the hitman agency!");
	}
	return 1;
}
Код:
	pKnife,
	pKnifeGet,
	pKnifeHidden,
I don't know what I am doing wrong. Whenever I acquire a knife, hiding it works fine but it doesn't come back when I execute the command again.
Reply


Messages In This Thread
Command not returning a weapon - by Avetsky - 25.07.2016, 10:11
Re: Command not returning a weapon - by Konstantinos - 25.07.2016, 10:15
Re: Command not returning a weapon - by Avetsky - 25.07.2016, 10:24

Forum Jump:


Users browsing this thread: 1 Guest(s)