/me (need help)
#1

Okay i have this /me command

Код:
  if(!strcmp(cmdtext, "/me", true, 3)) // 3 is the length of /me
  {
    if(cmdtext[3] == 0) {
      SendClientMessage(playerid, 0xFF0000FF, "USAGE: /me [action]");
      return 1;
    }
    new str[128];
    GetPlayerName(playerid, str, sizeof(str));
    format(str, sizeof(str), "[ ! ] %s %s", str, cmdtext[4]);
    SendClientMessageToAll(COLOR_WHITE, str);
    return 1;
  }
But how to i send message to everybody in the players Team color? like if they are TEAM_CITIZEN they do /me in TEAM_CITIZEN_COLOR.

And how do i set somebody's color back to normal? I have this /adminonduty command it sets the admins color to ADMIN_RED and it says hes on duty but for /adminoffduty how do i make it so it sets the players color back? SCRIPT :

Код:
	if(strcmp(cmdtext, "/adminonduty", true) == 0) if(Admin[playerid] == 1)
	{
	format(tmp,sizeof(tmp),"Admin %s is now on duty.",Name(playerid));
	SendClientMessageToAll(COLOR_RED,tmp);
	return 1;
}
	if(strcmp(cmdtext, "/adminoffduty", true) == 0) if(Admin[playerid] == 1)
	{
	new COLOR[128];
	GetPlayerColor(COLOR,sizeof(COLOR));
	format(COLOR,sizeof(COLOR), COLOR);
	SetPlayerColor(playerid,COLOR);
	format(tmp,sizeof(tmp),"Admin %s is now off duty.",Name(playerid));
	SendClientMessageToAll(COLOR_RED,tmp);
	return 1;
}
Reply


Messages In This Thread
/me (need help) - by coole210 - 25.06.2009, 16:15
Re: /me (need help) - by zallomallo - 25.06.2009, 16:35
Re: /me (need help) - by coole210 - 25.06.2009, 19:13
Re: /me (need help) - by Serediucr - 25.06.2009, 19:20
Re: /me (need help) - by coole210 - 25.06.2009, 19:28
Re: /me (need help) - by Serediucr - 25.06.2009, 19:31
Re: /me (need help) - by zallomallo - 25.06.2009, 19:31

Forum Jump:


Users browsing this thread: 3 Guest(s)