Script problem,
#1

listen I added this script and when I typing /fg it must give me full weapons set and armor, but it write in the game "invalid player specified",
what should I do?
(Role Play server)

Код:
CMD:fg(playerid, params[])
{
	if(PlayerInfo[playerid][pAdmin] >= 8)
	{
		new giveplayerid;
		if(sscanf(params, "u", giveplayerid)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /fg(fullgear) [playerid]");

		if(IsPlayerConnected(giveplayerid))
		{
			SetPlayerHealth(giveplayerid, 100);
			SetPlayerArmour(giveplayerid, 100);
			GivePlayerValidWeapon(giveplayerid, 27, 60000);
		    GivePlayerValidWeapon(giveplayerid, 24, 60000);
		    GivePlayerValidWeapon(giveplayerid, 31, 60000);
		    GivePlayerValidWeapon(giveplayerid, 34, 60000);
		    GivePlayerValidWeapon(giveplayerid, 29, 60000);
			return 1;
		}
	}
	else SendClientMessageEx(playerid, COLOR_GRAD1, "Invalid player specified.");
	return 1;
}
Reply
#2

It because you are not an admin of level 8 or higher (print out PlayerInfo[playerid][pAdmin] to check) . Checkout the admin script's page?
Reply
#3

If you're typing only /fg it will need a playerid parameter. Just /fg 0 whatever is your playerid.
Reply
#4

thx it works I changed the admin level,
thx guys
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)