One skin per person??
#3

Try something like

pawn Код:
new usedSkins[300];

public OnPlayerRequestSpawn(playerid)
{
    new skin = GetPlayerSkin(playerid);
    if(usedSkins[skin])
        return 0: // return 0 to prevent them from spawning

    usedSkins[skin] = 1;
}
I wrote this out on my iPad so my apologies if there is any mistakes, you also would have to set the variable back to 0 whenever they disconnect, now that I think about it you would also have to set it back to 0 if the player changes his character a second time, a better way to do it would be to set the variable under player spawn/death

It's late now but I'll fix it up tomorrow
Reply


Messages In This Thread
One skin per person?? - by cleme - 13.01.2014, 01:27
Re: One skin per person?? - by Jacapo - 13.01.2014, 01:54
Re: One skin per person?? - by PinkFloydLover - 13.01.2014, 13:50
Re: One skin per person?? - by cleme - 13.01.2014, 17:15
Re: One skin per person?? - by cleme - 13.01.2014, 17:19
Re: One skin per person?? - by Jacapo - 13.01.2014, 18:03

Forum Jump:


Users browsing this thread: 2 Guest(s)