Skin problem.
#1

Hello guys.
Well i was trying to make RestrictedSkins for families but its not working.
Players can select skins at clothes from that i did already at Cases.
Here is my script.

Код HTML:
 stock RestrictedSkin(id)
{
	switch(id)
		{
			case 124,129:
			{
			new playerid;
			if(PlayerInfo[playerid][playerteam]<CORLE)return SendClientError(playerid,"This skin is reserved for faction");
			return 1;
			}
			case 113,127:
			{
			new playerid;
			if(PlayerInfo[playerid][playerteam]<WARLOCK)return SendClientError(playerid,"This skin is reserved for faction");
			return 1;
			}
			}
  return 1;
}


Clothes command Where skins that i've reserved wouldnt be available here.
/clothes cmd is onlies way to set player skins.

PHP код:
COMMAND:clothes(playeridparams[])
{
    new 
tmpid=IsPlayerInBiz(playerid);
    if(
tmpid!=-&& biz[tmpid][biztype]==&& GetPlayerVirtualWorld(playerid)==biz[tmpid][vbiz])
    {
    new 
iSkin;
        if(
sscanf(params"d"iSkin)) return SCP(playerid"[skin id]");
        if(!
IsValidSkin(iSkin)) return SCP(playerid"[skin id]");
        if(!
RestrictedSkin(iSkin)) return SCP(playerid,"This skin is reserved for faction");
        new 
query[250], pname[25];
        
GetPlayerName(playeridpname24);
        
format(querysizeof(query), "UPDATE PlayerInfo SET Skin=%d WHERE user='%s'"iSkinpname);
        
mysql_query(query);
        
SetPlayerSkin(playeridiSkin);
        
PlayerInfo[playerid][Skin] = iSkin;
        return 
1;
    } 
Reply


Messages In This Thread
Skin problem. - by TheLegend1 - 16.08.2015, 15:12
Re: Skin problem. - by DaniceMcHarley - 16.08.2015, 15:15
Re: Skin problem. - by X337 - 16.08.2015, 15:20
Re: Skin problem. - by DaniceMcHarley - 16.08.2015, 15:32
Re: Skin problem. - by TheLegend1 - 16.08.2015, 15:56
Re: Skin problem. - by DaniceMcHarley - 16.08.2015, 15:56
Re: Skin problem. - by TheLegend1 - 16.08.2015, 16:02

Forum Jump:


Users browsing this thread: 1 Guest(s)