Help Is Invalid Skin - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help Is Invalid Skin (
/showthread.php?tid=654278)
Help Is Invalid Skin -
nguyenthanhdanhsamp - 25.05.2018
How to exclude the function "Is Invalid Skin" because my custom skin is 20005 which rule is less than 299 how to leave it!
PHP код:
CMD:setskin(playerid, params[])
{
if (PlayerInfo[playerid][pAdmin] >= 3)
{
new string[128], giveplayerid, skinid;
if(sscanf(params, "ud", giveplayerid, skinid)) return SendClientMessageEx(playerid, COLOR_GREY, "SU DUNG: /setskin [Player] [skinid]");
if(IsPlayerConnected(giveplayerid))
{
if(!IsInvalidSkin(skinid))
{
if(GetPlayerSkin(giveplayerid) == skinid)
{
SendClientMessageEx( playerid, COLOR_WHITE, "The person you're trying to change skins of already is using the skin you're trying to set." );
}
else
{
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][pModel]);
}
}
else
{
SendClientMessageEx(playerid, COLOR_GREY, "Invalid skin ID!");
}
}
}
else
{
SendClientMessageEx(playerid, COLOR_GRAD1, "Ban Khфng Cу Kha Nang Su Dung Lкnh Nаy !");
}
return 1;
}
Re: Help Is Invalid Skin -
Nyzenic - 25.05.2018
Код:
CMD:setskin(playerid, params[])
{
if (PlayerInfo[playerid][pAdmin] >= 3)
{
new string[128], giveplayerid, skinid;
if(sscanf(params, "ud", giveplayerid, skinid)) return SendClientMessageEx(playerid, COLOR_GREY, "SU DUNG: /setskin [Player] [skinid]");
if(IsPlayerConnected(giveplayerid))
{
if(!IsInvalidSkin(skinid) && skinid != 20005)
{
if(GetPlayerSkin(giveplayerid) == skinid)
{
SendClientMessageEx( playerid, COLOR_WHITE, "The person you're trying to change skins of already is using the skin you're trying to set." );
}
else
{
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][pModel]);
}
}
else
{
SendClientMessageEx(playerid, COLOR_GREY, "Invalid skin ID!");
}
}
}
else
{
SendClientMessageEx(playerid, COLOR_GRAD1, "Ban Khфng Cу Kha Nang Su Dung Lкnh Nаy !");
}
return 1;
}
Or you can edit the "IsValidSkin" function itself if you're using 0.3.DL
Re: Help Is Invalid Skin -
nguyenthanhdanhsamp - 25.05.2018
I have used 0.3DL, how can I change it?
Re: Help Is Invalid Skin -
GeorgeMcReary - 25.05.2018
I just replied on your other thread.. why did you post same thread 2 times?