Certain Classes?
#1

How can I make it so that if this variable: PlayerInfo[playerid][GameType] = 1, they will have access to classids 1, 2 and 3, but PlayerInfo[playerid][GameType] = 2 will have access to 3, 4 and 5?

If you don't understand, just ask.
Reply
#2

If you mean while player is in classselection, this should work:
pawn Код:
public OnPlayerRequestSpawn(playerid)
{
  new skin = GetPlayerSkin(playerid);
  if(PlayerInfo[playerid][GameType] == 1)
  {
    if(skin == 1 || skin == 2 || skin == 3) return 1;
  }
  else if(PlayerInfo[playerid][GameType] == 2)
  {
    if(skin == 3 || skin == 4 || skin == 5) return 1;
  }
  ...
  SendClientMessage(playerid, WHITE, "You don't have access to this skin.");
  return 0;
}
Notice that those are skinids, not classids.
Reply
#3

I want it so that it won't let them see that class at all, not just not select it.
Reply
#4

then Add it under OnPlayerRequestClass , Not Spawn
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)