[Help] Restricted skins on skin selection to factions
#1

Hello,

Is there a better way to restrict faction skins on skin selection than as follows?

I have this set under OnPlayerRequestSpawn:
pawn Код:
if(GetPlayerSkin(playerid) == 280 || GetPlayerSkin(playerid) == 281 || GetPlayerSkin(playerid) == 265 || GetPlayerSkin(playerid) == 266 || GetPlayerSkin(playerid) == 267 || GetPlayerSkin(playerid) == 284 || GetPlayerSkin(playerid) == 285)
        {
            if(PlayerInfo[playerid][pFaction] != 1)
            {
                SendClientMessage(playerid, COLOR_LIGHTRED, " {FF6347}ERROR:{FF6347} {F0F8FF}Locked faction skin.{F0F8FF}");
                return 0;
            }
            else
            {
                return 1;
            }
        }
The annoying issue with this is that when someone press spawn the error mesage will spam the player while they keep the spawn key pressed. Other than that, it works relatively good. But like I said, better way to restrict faction skins?
Reply
#2

Try y_classes
Reply
#3

Quote:
Originally Posted by ikkentim
Посмотреть сообщение
Try y_classes
Thanks for the response. I've been looking into y_classes but I just can't get any smarter at it. Could you give me a small example how it would benefit my situation?
Reply
#4

Well, make it like "new factionrank=0;" and then "OnPlayerRequestClass - if factionrank=0;" Use "if" and make it like that, and it may help you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)