Question ! !! [+2 REP]
#1

How to check this -->

DM Lauched ---> 5 players joined --> some x players leave dm

How to check how many players still in DM Area ?
Reply
#2

You need to use a Global variable to use this for example


PHP код:
new DMPlayers 0// At top of script Global variable 
then make it on command join DM

PHP код:
CMD:join(playeridparams[])
{
          
DMPlayers++;
          return 
1;

And Leave DM

PHP код:
CMD:leave(playeridparams[])
{
          new 
string[20], playername[25];
          
GetPlayerName(playeridplayernameMAX_PLAYER_NAME); 
          
format(string,sizeof(string), "%s has left the DM"playername);
          
SendClientMessageToAll(-1string);
          
DMPlayers--;
          return 
1;

And now see how many players left

PHP код:
CMD:dmplayers(playeridparams[])
{
          new 
string[20];
          
format(string,sizeof(string), "%d players left in the DM"DMPlayers);
          
SendClientMessage(playerid, -1string);
          return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)