public OnPlayerText(playerid, text[])
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
new string[128];
format(string,sizeof(string), "%s sagt: %s",
getPlayerName(playerid), text);
new chat_color;
for(new i=0; i<MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i))continue;
if(!IsPlayerInRangeOfPoint(i, CHAT_RADIUS, x, y, z))continue;
new Float:distance = GetPlayerDistanceFromPoint(i, x, y, z);
if(distance < CHAT_RADIUS / CHAT_FADES)
{
chat_color = COLOR_CHAT;
}
else if(distance < CHAT_RADIUS / CHAT_FADES * 2)
{
chat_color = COLOR_FADE1;
}
else if(distance < CHAT_RADIUS / CHAT_FADES * 3)
{
chat_color = COLOR_FADE2;
}
else if(distance < CHAT_RADIUS / CHAT_FADES * 4)
{
chat_color = COLOR_FADE3;
}
else if(distance <= CHAT_RADIUS / CHAT_FADES * 5)
{
chat_color = COLOR_FADE4;
}
SendClientMessage(i, chat_color, string);
}
return 0;
}
Hey ich wollte fragen ich arbeite mit CMD
OCMD:close 2 befehl zum nutzen /c
%s sagt: %s
CMD:shout 2 Befehl /s
CMD:me
format(string, sizeof(string), "* %s %s", sendername, result);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);