It sends only the Message to me..
#1

Код:
if(strcmp(cmd, "/msay", true) == 0)
{
  if(PlayerData[playerid][Medic] < 1) return SendClientMessage(playerid, RED, "SERVER MESSAGE: You are not high enough");
	if(PlayerData[playerid][Muted] == 1) return SendClientMessage(playerid, RED, "You have been muted, wait untill you are unmuted to talk");
	if(PlayerData[playerid][Mduty] == 0) return SendClientMessage(playerid, RED, "You are not in Medic duty");
	new otherplayer = strvalEx(tmp);
 	new pname[MAX_PLAYER_NAME];
 	new pname2[MAX_PLAYER_NAME];
 	GetPlayerName(otherplayer, pname, sizeof(pname));
 	GetPlayerName(playerid, pname2, sizeof(pname2));
  	tmp = strtok(cmdtext, idx);
  if(!strlen(tmp))
  {
	SendClientMessage(playerid, COLOR_RED, "USAGE: /msay [playerid] [text]");
 	return 1;
 	}
  if(!IsPlayerConnected(otherplayer)) { SendClientMessage(playerid,RED,"SERVER MESSAGE: Incorrect ID"); return true; }
  new length = strlen(cmdtext);
	while ((idx < length) && (cmdtext[idx] <= ' '))
	{
	idx++;
	}
	new offset = idx;
	new result[64];
	while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
	{
	result[idx - offset] = cmdtext[idx];
	idx++;
	}
	result[idx - offset] = EOS;
	{
 	if(!strlen(result)) { SendClientMessage(playerid,WHITE,"Correct Usage: /msay [playerid] [text]"); return true; }
	format(string, sizeof(string), "Medic %s says to you: %s", pname2, result);
	SendClientMessage(otherplayer,TEAM_MEDIC,string);
	}
	return 1;
}
Reply


Messages In This Thread
It sends only the Message to me.. - by Erkan - 14.09.2009, 07:10
Re: It sends only the Message to me.. - by Zeex - 14.09.2009, 09:06
Re: It sends only the Message to me.. - by Erkan - 14.09.2009, 09:18
Re: It sends only the Message to me.. - by Calgon - 14.09.2009, 12:50
Re: It sends only the Message to me.. - by Jakku - 14.09.2009, 13:38

Forum Jump:


Users browsing this thread: 1 Guest(s)