PM command fail?
#7

Код:
if(!strcmp(cmd, "/pm", true))
{
	tmp = strtok(cmdtext, idx);
	if(!strlen(tmp)) return SendClientMessage(playerid, RedCol, "USAGE: /pm [playerid] [message]");
	new ID = strval(tmp);
	if(!IsNumeric(ID)) return SendClientMessage(playerid,RedCol,"ERROR: Invalid player ID.");
	if(!IsPlayerConnected(ID)) return SendClientMessage(playerid,RedCol,"ERROR: Player is not connected.");
	if(ID == playerid) return SendClientMessage(playerid,RedCol,"ERROR: You cannot PM yourself.");
	tmp = strrest(cmdtext, idx);
	if(!strlen(tmp)) return SendClientMessage(playerid, RedCol, "USAGE: /pm [playerid] [message]");
	new name[24],mString[190];
	GetPlayerName(playerid,name,24);
	format(mString,sizeof(mString),"Message from %s(%d): %s",name,playerid,tmp);
	SendClientMessage(ID,YellowCol,mString);
	GetPlayerName(ID,name,24);
	format(mString,sizeof(mString),"Message succesfully sent to %s.",name);
	SendClientMessage(playerid,Yellow2Col,mString);
	return 1;
}
Reply


Messages In This Thread
PM command fail? - by [XST]O_x - 15.06.2010, 10:54
Re: PM command fail? - by DJDhan - 15.06.2010, 11:37
Re: PM command fail? - by [XST]O_x - 15.06.2010, 11:46
Re: PM command fail? - by Tnt12340 - 15.06.2010, 12:42
Re: PM command fail? - by [XST]O_x - 15.06.2010, 12:46
Re: PM command fail? - by randomkid88 - 15.06.2010, 15:19
Re: PM command fail? - by Jefff - 15.06.2010, 15:29
Re: PM command fail? - by [XST]O_x - 15.06.2010, 15:29

Forum Jump:


Users browsing this thread: 2 Guest(s)