13.02.2012, 00:30
alguem tem o cod ou sabe como cria o cod pro player digitar ; ou # antes das palavras e sу quem estiver perto ver oque ele disse?
if(strcmp(cmd, "/p", true) == 0)
{
new str[128], proximo[128];
strmid(proximo, cmdtext, 2, strlen(cmdtext));
if(!strlen(proximo))
{
SendClientMessage(playerid, 0x00CCCCAA, "Uso: /p [mensagem]");
return 1;
}
else
{
for(new P=0; P < MAX_PLAYERS; P++)
{
if(GetDistanceBetweenPlayers(playerid, P) < 25)
{
format(str, sizeof(str), "(Chat Prуximo) %s diz: %s", nome(playerid), proximo);
SendClientMessage(P, 0x00EE00AA, str);
}
}
}
return 1;
}
public OnPlayerText(playerid, text[])
{
if(text[0] == '#') {
new n[24],s[128],Float:Pos[3];
GetPlayerName(playerid,n,24);
format(s,128,"%s diz:s%",n,text[1]);
GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
for(new i = 0 ; i < GetMaxPlayers(); i++) {
if(IsPlayerInRangeOfPoint(i,2,Pos[0],Pos[1],Pos[2])) {
SendClientMessage(i,-1,s);
}
}
}
return false;
}
public OnPlayerText(playerid, text[])
{
new messagetext[128];
SetPlayerChatBubble(playerid, text, 0xFFFDE8AA, 100.0, 10000);
format( messagetext, 128, "[ID:%d]: %s", playerid, text );
SendPlayerMessageToAll( playerid, messagetext );
if(text[0] == ';') {
new n[24],s[128],Float:Pos[3];
GetPlayerName(playerid,n,24);
format(s,128,"{FFFDE8}(Chat proximo){60F7FF}%s: s%",n,text[1]);
GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
for(new i = 0 ; i < GetMaxPlayers(); i++) {
if(IsPlayerInRangeOfPoint(i,2,Pos[0],Pos[1],Pos[2])) {
SendClientMessage(i,-1,s);
}
}
}
return false;
}
public OnPlayerText(playerid, text[])
{
if(text[0] == ';')
{
new n[24],s[128],Float:Pos[3];
GetPlayerName(playerid,n,24);
format(s,128,"{FFFDE8}(Chat proximo){60F7FF}%s: s%",n,text[1]);
GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
for(new i = 0 ; i < GetMaxPlayers(); i++)
{
if(IsPlayerInRangeOfPoint(i,2,Pos[0],Pos[1],Pos[2]))
{
SendClientMessage(i,-1,s);
}
}
return false;
}
new messagetext[128];
SetPlayerChatBubble(playerid, text, 0xFFFDE8AA, 100.0, 10000);
format( messagetext, 128, "[ID:%d]: %s", playerid, text );
SendPlayerMessageToAll( playerid, messagetext );
return false;
}
public OnGameModeInit()
{
LimitGlobalChatRadius(200.0);
return 1;
}
public OnPlayerText(playerid, text[])
{
if(text[0] == ';')
return 1;
return 0;
}