Armour not working.
#1

Armour is totally not working on my RP based script.
This is the /setarmor command:

Код:
CMD:setarmor(playerid, params[])
{
	new playa, armor;
	if(PlayerInfo[playerid][pAdmin] >= 3 || PlayerInfo[playerid][pEventModd] > 0)
	{
		if(!sscanf(params, "ui", playa, armor))
		{
			if(IsPlayerConnected(playa))
			{
				if(playa != INVALID_PLAYER_ID)
				{
					strmid(giveplayer, PlayerICName(playa), 0, MAX_PLAYER_NAME);
					SetPlayerArmour(playa, armour);
					format(str, sizeof(str), "You have set %s's armor to %d.", giveplayer, armor);
					SendClientMessage(playerid, COLOR_GREY, str);
				}
			}
		}
		else
		{
			SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /setarmor [playerid/PartOfName] [armor]");
		}
	}
	else
	{
		AdmErrorMsg;
	}
	return 1;
}
Is there anything wrong with the command? Plus, Like.. Armour in general ain't working wether trying to consume crack which adds armor or buy a vest. I've updated to the latest SSCANF tho. Is there anything i'm supposed to update or fix?

Thanks.
Reply


Messages In This Thread
Armour not working. - by Clergy - 01.10.2017, 14:07
Re: Armour not working. - by BreakStore - 01.10.2017, 14:13
Re: Armour not working. - by Clergy - 01.10.2017, 14:25
Re: Armour not working. - by BreakStore - 01.10.2017, 14:26
Re: Armour not working. - by FuNkYTheGreat - 01.10.2017, 14:44
Re: Armour not working. - by Clergy - 01.10.2017, 15:49
Re: Armour not working. - by Sew_Sumi - 01.10.2017, 16:07
Re: Armour not working. - by Clergy - 01.10.2017, 16:59
Re: Armour not working. - by RxErT - 01.10.2017, 17:02
Re: Armour not working. - by Clergy - 01.10.2017, 17:28

Forum Jump:


Users browsing this thread: 1 Guest(s)