[HELP] 2 players in dm
#1

Please! Can anyone help me in this arena, I put it to only 2 players to dm, when it is filled with 2 player in the case, if someone tries to enter a message "You already have 2 players in this arena".

Код:
if(strcmp(cmdtext, "/dm", true) == 0)
{
  SetPlayerInterior(playerid, 0);
  ResetPlayerWeapons(playerid);
  SetPlayerPos(playerid,-1845.9524,1069.3036,145.1297);
  InDM8[playerid] = 1;
  GivePlayerWeapon(playerid,46,5);
  new name[MAX_PLAYERS];
  new stringa[256];
  GetPlayerName(playerid, name, sizeof(name));
  format(stringa, sizeof(stringa), "'%s' was to DM. (/dm)", name);
  SendClientMessageToAll(AzulClaro,stringa);
  PlayerPlaySound(playerid, 1133, 257.6206, -41.5307, 1002.0234);
  GivePlayerWeapon(playerid,16,6);
  GivePlayerWeapon(playerid,31,1000);
  GivePlayerWeapon(playerid,26,100);
  GivePlayerWeapon(playerid,32,1000);
  GameTextForPlayer(playerid,"~r~KILL~n~ALL!", 3000, 5);
  return 1;
}
Reply
#2

An example
pawn Код:
// Before main()
new DMcount;

// in the command
if(DMcount >= 2) return SendClientMessage(playerid, RED, "Already 2 players.");
-- At the end, before "return 1" --
DMcount++;
Reply
#3

Thanks
Reply
#4

No problem.
Reply
#5

I tested the command today and after going 2 players for the arena has no way back to the arena only appears "Already 2 players." Help me fix this?
Reply


Forum Jump:


Users browsing this thread: