Posts: 2,474
Threads: 79
Joined: Apr 2010
Reputation:
0
Hello i need help with commands like /s(shout).
I need something like /s You are ugly! with this result
0-25 meters: Justsomeguy shouts: You are ugly!
I got an proxdetector wont i be able to use that? if sow how?
Thanks in advance!
Posts: 6,129
Threads: 36
Joined: Jan 2009
pawn Код:
stock MessageToClientsInRadius(playerid, iColor, szString[], Float: fRadius = 5.0) {
if(!IsPlayerConnected(playerid))
return 1;
new
l_iLocation[2],
Float: l_fPosition[3];
GetPlayerPos(playerid, l_fPosition[0], l_fPosition[1], l_fPosition[2]);
l_iLocation[0] = GetPlayerInterior(playerid);
l_iLocation[1] = GetPlayerVirtualWorld(playerid);
foreach(Player, i) {
if(IsPlayerInRangeOfPoint(i, fRadius, l_fPosition[0], l_fPosition[1], l_fPosition[2])) {
if(GetPlayerVirtualWorld(i) == l_iLocation[1] && GetPlayerInterior(i) == l_iLocation[0]) {
SendClientMessage(i, iColor, szString);
}
}
}
return 1;
}
CMD:shout(playerid, params[]) {
if(isnull(params))
return SendClientMessage(playerid, 0, "Syntax: /shout [message]");
MessageToClientsInRadius(playerid, 0, params, 25);
return 1;
}
ProxDetector is slow and outdated.
Try this, I haven't tested it though.
You'll need foreach & zcmd.
Posts: 2,474
Threads: 79
Joined: Apr 2010
Reputation:
0
Thanks! But what do i do if i want like an /b with this usage?:
/b omg your ugly!
((justsomeguy: omg your ugly!))