One skin per person??
#4

Quote:
Originally Posted by PinkFloydLover
Посмотреть сообщение
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
1287 error 017: undefined symbol "usedSkins"
1287 error 001: expected token: ";", but found "]"
1287 error 029: invalid expression, assumed zero
1287 fatal error 107: too many error messages on one line


Lines
pawn Код:
public OnPlayerRequestSpawn(playerid)
{
  1287  new skin = GetPlayerSkin(playerid);
   1288 if(usedSkins[skin])
    1289    return 0: // return 0 to prevent them from spawning

   1290 usedSkins[skin] = 1;
}
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: 1 Guest(s)