ID('s) problem
#9

Don't need new topic for this right?

Код:
public OnPlayerSelectedMenuRow(playerid, row)
{
  if(GetPlayerMenu(playerid) == LVPDMenu)
  {
      switch(row)
      {
	    case 0:
			{
			  if(gTeam[playerid] == TEAM_LVPD)
			  {
			  SendClientMessage(playerid,COLOR_RED2,"You are already member of this Organization!");
			  TogglePlayerControllable(playerid,true);
			  return 1;
			  }
			  SendClientMessage(playerid,COLOR_BLUE,"You have joined Las Venturas Police Dept");
			  SendClientMessage(playerid,0xF0DC82FF,"Your job is to help making Las Venturas a better place!");
			  SendClientMessage(playerid,0xF0DC82FF,"Type /lvcmds to see a list of commands.");
			  gTeam[playerid] = TEAM_LVPD;
			  GivePlayerWeapon(playerid, 24,20);
			  SetPlayerTeam(playerid,TEAM_LVPD);
			  OnPlayerShiftTeam(playerid);
			  TogglePlayerControllable(playerid,true);
			  return 1;
			}
			case 1:
			{
			  if(gTeam[playerid] == TEAM_CIVILIAN)
			  {
			  SendClientMessage(playerid,COLOR_RED2,"You are not member of this Organization!");
			  TogglePlayerControllable(playerid,true);
			  return 1;
			  }
			  SendClientMessage(playerid,COLOR_BLUE,"You have resigned from Las Venturas Police Dept");
			  gTeam[playerid] = TEAM_CIVILIAN;
			  SetPlayerTeam(playerid,TEAM_CIVILIAN);
			  OnPlayerShiftTeam(playerid);
			  SetPlayerSkin(playerid, VorigeSkin);
			  TogglePlayerControllable(playerid,true);
			  return 1;
	    }
      }
  }
  return 1;
}
I tried this with 2 players online, first id 1 went to the gate (was no cop yet, so the gates wouldn't open) and id 0 went to the checkpoint and joined the lvpd force.... there's problem nr 1, the other player with id 1 also became lvpd and the gates opened :O. Now when i resigned we both became civil again. The other way around worked perfectly! when id 0 is at the gate, and id 1 joins LVPD , id 0 still stays civil !


Pls tell me someone can fix this ID problem! PLS, I'm working on this problem for a long time together with Zybero who send me this code to test

Thnx for that zybero!

Grts Rizzy
Reply


Messages In This Thread
ID('s) problem - by Rizard - 23.05.2009, 10:26
Re: Can't get single Team activation - ID('s) problem - by Weirdosport - 23.05.2009, 10:28
Re: Can't get single Team activation - ID('s) problem - by miokie - 23.05.2009, 10:30
Re: Can't get single Team activation - ID('s) problem - by Rizard - 23.05.2009, 12:15
Re: Can't get single Team activation - ID('s) problem - by Cabby - 23.05.2009, 14:11
Re: Can't get single Team activation - ID('s) problem - by miokie - 23.05.2009, 16:13
Re: Can't get single Team activation - ID('s) problem - by Rizard - 23.05.2009, 16:22
Re: Can't get single Team activation - ID('s) problem - by Rizard - 24.05.2009, 10:24
Re: Can't get single Team activation - ID('s) problem - by Rizard - 03.06.2009, 12:09
Re: ID('s) problem - by Rizard - 14.06.2009, 11:49

Forum Jump:


Users browsing this thread: 2 Guest(s)