SA-MP Forums Archive
[HELP] 2 players in dm - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] 2 players in dm (/showthread.php?tid=140441)



[HELP] 2 players in dm - J. - 09.04.2010

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



Re: [HELP] 2 players in dm - Grim_ - 09.04.2010

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



Re: [HELP] 2 players in dm - J. - 09.04.2010

Thanks


Re: [HELP] 2 players in dm - Grim_ - 09.04.2010

No problem.


Re: [HELP] 2 players in dm - J. - 10.04.2010

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?