ID bug -
PrinceOfPersia - 20.05.2014
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.
Re: ID bug -
ThatThoseTheThy - 20.05.2014
Show the script lines of the /setskin command
Re: ID bug -
PrinceOfPersia - 20.05.2014
Код:
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;
}
Re: ID bug -
Konstantinos - 20.05.2014
Is the sscanf updated to the latest version?
Re: ID bug -
PrinceOfPersia - 20.05.2014
No, It's not.
Re: ID bug -
Konstantinos - 20.05.2014
Then update both sscanf plugin and its include, re-compile and try again.
You should always use the latest version of any plugin/include!
Re: ID bug -
Threshold - 20.05.2014
If you're using sscanf, update it.
Otherwise, show us your code.
EDIT: I should really refresh the page before I submit...
Re: ID bug -
PrinceOfPersia - 20.05.2014
Thanks for the advice guys.
But, any problems if I've got the links of them ? thanks.
Re: ID bug -
Konstantinos - 20.05.2014
But next time search:
https://sampforum.blast.hk/showthread.php?tid=120356
Re: ID bug -
PrinceOfPersia - 20.05.2014
Fixed.
I hope this bug wont continue, if it continued please keep updated in this thread guys, thanks.