ID bug
#1

Hey guys, I've got ID bug.

It's
When you like /setskin [ID 0] [285] It doesn't even give ID 0 the skin, it wants to give the skin to id 1 instead of id 0, also, like there's no ID 1 online, so the script wont find any another one to give the skin to, so it wont give the skin, it's for the all commands also.
Reply
#2

Show the script lines of the /setskin command
Reply
#3

Код:
CMD:setskin(playerid, params[])
{
	if (PlayerInfo[playerid][pAdmin] >= 3)
	{
		new string[128], giveplayerid, skinid;
		if(sscanf(params, "ud", giveplayerid, skinid)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /setskin [playerid] [skinid]");

		if(IsPlayerConnected(giveplayerid))
		{
			if(!IsInvalidSkin(skinid))
			{
				if(GetPlayerSkin(giveplayerid) == skinid)
				{
					SendClientMessageEx( playerid, COLOR_WHITE, "The player you're trying to change skins of already is using the skin you're trying to set." );
				}
				else
				{
					PlayerInfo[giveplayerid][pChar] = skinid;
					PlayerInfo[giveplayerid][pModel] = skinid;
					format(string, sizeof(string), "Your skin has been changed to ID %d by Administrator %s.", skinid, GetPlayerNameEx(playerid));
					SendClientMessageEx(giveplayerid, COLOR_WHITE, string);
					format(string, sizeof(string), "You have given %s skin ID %d.", GetPlayerNameEx(giveplayerid), skinid);
					SendClientMessageEx(playerid, COLOR_WHITE, string);
					SetPlayerSkin(giveplayerid, PlayerInfo[giveplayerid][pChar]);
				}
			}
			else
			{
				SendClientMessageEx(playerid, COLOR_GREY, "Invalid skin ID!");
			}
		}
	}
	else
	{
		SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
	}
	return 1;
}
Reply
#4

Is the sscanf updated to the latest version?
Reply
#5

No, It's not.
Reply
#6

Then update both sscanf plugin and its include, re-compile and try again.

You should always use the latest version of any plugin/include!
Reply
#7

If you're using sscanf, update it.

Otherwise, show us your code.

EDIT: I should really refresh the page before I submit...
Reply
#8

Thanks for the advice guys.

But, any problems if I've got the links of them ? thanks.
Reply
#9

But next time search: https://sampforum.blast.hk/showthread.php?tid=120356
Reply
#10

Fixed.
I hope this bug wont continue, if it continued please keep updated in this thread guys, thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)