send message to leaders
#6

Quote:
Originally Posted by HondaCBR
Посмотреть сообщение
How about if I used,
new Check[MAX_PLAYERS]

Check[playerid] = 0;

if you type lets say /abc
Check[playerid] = 1;

Now if somone types /123
It shows a dialog for the player who is on check = 1
Top of the script
Код:
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
Код:
new Check[MAX_PLAYERS];
Under OnPlayerCommandText
Код:
dcmd(abc, 3, cmdtext);
dcmd(123, 3, cmdtext);
Under the "}" of the OnPlayerCommandText
Код:
dcmd_abc(playerid, params[])
{
     #pragma unused params
     if(IsPlayerConnected(playerid))
          if(Check[playerid] == 0)
                Check[playerid] = 1;
     return 1;
}
Under the "}" of dcmd_abc put
Код:
dcmd_123(playerid, params[])
{
       #pragma unused params
       for(new i = 0; i < MAX_PLAYERS; ++i)
       {
             if(IsPlayerConnected(i))
                    if(Check[i] == 1)
                         SendClientMessage(playerid, -1, "ID: %d", i);
       }
       return 1;
}
This dont put the player in a dialog but sends a message to the player with the player's ID's that "Check = 1"
Try it
Reply


Messages In This Thread
send message to leaders - by HondaCBR - 06.04.2012, 21:07
Re: send message to leaders - by ivanVU - 06.04.2012, 21:11
Re: send message to leaders - by DR3AD - 06.04.2012, 21:13
Re: send message to leaders - by HondaCBR - 06.04.2012, 21:23
Re: send message to leaders - by TzAkS. - 06.04.2012, 21:29
Re: send message to leaders - by DR3AD - 06.04.2012, 21:39

Forum Jump:


Users browsing this thread: 1 Guest(s)