Guten Tag
Ich habe den normalen Text, der bei OnPlayerText gesendet wird, deaktiviert und durch einen anderen String ausgetauscht. Das hat bisher auch super geklappt. Doch nun habe ich ein Handy System eingefügt und nun wird der String und der normale Text gesendet.
Eventuell könntet ihr mir bei diesem Problem helfen.
Vorher:
public OnPlayerText(playerid, text[])
{
new Float:x, Float:y, Float:z, String[128], Name[128],Telestr[150];
GetPlayerPos(playerid, x, y, z);
GetPlayerName(playerid, Name, sizeof Name);
format(String, sizeof String, "%s sagt: %s", Name, text);
format(Telestr,sizeof(Telestr),"[Telefon] %s: %s",Name,text);
SetPlayerChatBubble(playerid, text, 0xFF0000FF, 31.0, 10000);
SendClientMessage(playerid, COLOR_DISTANCE_1, String);
for(new i = 0; i <= MAX_PLAYERS; i++)
{
if(i != playerid)
{
if(GetPlayerInterior(i) == GetPlayerInterior(playerid) && GetPlayerVirtualWorld(i) == GetPlayerVirtualWorld(playerid))
{
if(IsPlayerInRangeOfPoint(i, 5.0, x, y, z))
{
SendClientMessage(i, COLOR_DISTANCE_1, String);
}
else if(IsPlayerInRangeOfPoint(i, 10.0, x, y, z))
{
SendClientMessage(i, COLOR_DISTANCE_2, String);
}
else if(IsPlayerInRangeOfPoint(i, 16.0, x, y, z))
{
SendClientMessage(i, COLOR_DISTANCE_3, String);
}
else if(IsPlayerInRangeOfPoint(i, 23.0, x, y, z))
{
SendClientMessage(i, COLOR_DISTANCE_4, String);
}
else if(IsPlayerInRangeOfPoint(i, 31.0, x, y, z))
{
SendClientMessage(i, COLOR_DISTANCE_5, String);
}
}
}
}
return 0;
}
Nacher:
public OnPlayerText(playerid, text[])
{
new Float:x, Float:y, Float:z, String[128], Name[128],Telestr[150];
GetPlayerPos(playerid, x, y, z);
GetPlayerName(playerid, Name, sizeof Name);
format(String, sizeof String, "%s sagt: %s", Name, text);
format(Telestr,sizeof(Telestr),"[Telefon] %s: %s",Name,text);
SetPlayerChatBubble(playerid, text, 0xFF0000FF, 31.0, 10000);
SendClientMessage(playerid, COLOR_DISTANCE_1, String);
for(new i = 0; i <= MAX_PLAYERS; i++)
{
if(i != playerid)
{
if(GetPlayerInterior(i) == GetPlayerInterior(playerid) && GetPlayerVirtualWorld(i) == GetPlayerVirtualWorld(playerid))
{
if(IsPlayerInRangeOfPoint(i, 5.0, x, y, z))
{
SendClientMessage(i, COLOR_DISTANCE_1, String);
}
else if(IsPlayerInRangeOfPoint(i, 10.0, x, y, z))
{
SendClientMessage(i, COLOR_DISTANCE_2, String);
}
else if(IsPlayerInRangeOfPoint(i, 16.0, x, y, z))
{
SendClientMessage(i, COLOR_DISTANCE_3, String);
}
else if(IsPlayerInRangeOfPoint(i, 23.0, x, y, z))
{
SendClientMessage(i, COLOR_DISTANCE_4, String);
}
else if(IsPlayerInRangeOfPoint(i, 31.0, x, y, z))
{
SendClientMessage(i, COLOR_DISTANCE_5, String);
}
}
if(AmTelen[playerid][i] >= 2 || AmTelen[i][playerid] >= 2)
{
SendClientMessage(i,0xFFFF00FF,Telestr);
}
}
}
return 0;
}
Lg
Simon