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;
}