Posts: 350
Threads: 115
Joined: Aug 2010
Reputation:
0
Well, title, basicly. Am I able to make a /me with the basic CMD shite, and not with ZCMD or any other plugin? If so, could any of you give me an example? (What I'm trying to reach is, /me [text], only player so close can see it.]
Posts: 2,593
Threads: 34
Joined: Dec 2007
pawn Код:
if(!strcmp(cmdtext,"/me",true,3))
{
if(!strlen(cmdtext[4])) return SendClientMessage(playerid,-1,"Usage: /me [text]");
new Float:P[4],Nick[24],str[128];
GetPlayerName(playerid,Nick,24);
GetPlayerPos(playerid,P[0],P[1],P[2]);
format(str,sizeof(str),"(me) %s: %s",Nick,cmdtext[4]);
for(new d,g=GetMaxPlayers(); d < g; d++)
if(IsPlayerConnected(d))
{
P[3] = GetPlayerDistanceFromPoint(d,P[0],P[1],P[2]);
if(P[3] <= YOUR_DISTANCE) // example 10.0
SendClientMessage(d,-1,str);
}
return 1;
}
Posts: 350
Threads: 115
Joined: Aug 2010
Reputation:
0
...Woah, lol, you're awesome, buddy.