forward ProxChat(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
//onplayertext
ProxChat(/*distancia maxima */, playerid, string, cor1,cor2,cor3,cor4,cor5);
public ProxChat(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
{
if(IsPlayerConnected(playerid))
{
new Float:posx, Float:posy, Float:posz;
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
GetPlayerPos(i, posx, posy, posz);
tempposx = (oldposx -posx);
tempposy = (oldposy -posy);
tempposz = (oldposz -posz);
if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
{
SendClientMessage(i, col1, string);
}
else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
{
SendClientMessage(i, col2, string);
}
else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
{
SendClientMessage(i, col3, string);
}
else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
{
SendClientMessage(i, col4, string);
}
else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
SendClientMessage(i, col5, string);
}
}
}
}
return true;
}
//tive rperto cor1 e dai quanto mais longe vai aumentando cor2 cor3 ..etc
pawn Код:
|
//onplayertext
format(string, sizeof(string), "%s Diz: %s", PlayerName(playerid), text);
ProxChat(30.0, playerid, string, Branco,ZinzaC,Zinzam,Zinzae,preto);
ProxChat(/*distancia maxima */, playerid, string, cor1,cor2,cor3,cor4,cor5);
public OnPlayerText(playerid, text[])
{
new Float:P[3];
GetPlayerPos(playerid,P[0],P[1],P[2]);
for(new i; i < MAX_PLAYERS; i++){
if(IsPlayerInRangeOfPoint(i, 15.0, P[0], P[1], P[2])) return SendClientMessage(i,-1,text);
if(IsPlayerInRangeOfPoint(i, 30.0, P[0], P[1], P[2])) return SendClientMessage(i,0xFF0000AA,text);
}
return 1;
}
#define Branco 0xFFFFFFAA
#define Cinza 0x660000AA
#define Cinza1 0x66000085
#define Cinza2 0x66000065
#define Preto 0x00000085
public OnPlayerText(playerid, text[])
{
new string[145];
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
//onplayertext
format(string, sizeof(string), "%s Diz: %s", aname, text);
ProxChat(30.0, playerid, string, Branco,Cinza,Cinza1,Cinza2,preto);
return 0;
}
pawn Код:
|
C:\Documents and Settings\Kieryce\Desktop\HeyHoLeysGo Trabalhos\gamemodes\GM.pwn(349) : warning 202: number of arguments does not match definition C:\Documents and Settings\Kieryce\Desktop\HeyHoLeysGo Trabalhos\gamemodes\GM.pwn(349) : warning 202: number of arguments does not match definition C:\Documents and Settings\Kieryce\Desktop\HeyHoLeysGo Trabalhos\gamemodes\GM.pwn(349) : warning 202: number of arguments does not match definition C:\Documents and Settings\Kieryce\Desktop\HeyHoLeysGo Trabalhos\gamemodes\GM.pwn(349) : warning 202: number of arguments does not match definition C:\Documents and Settings\Kieryce\Desktop\HeyHoLeysGo Trabalhos\gamemodes\GM.pwn(349) : warning 202: number of arguments does not match definition C:\Documents and Settings\Kieryce\Desktop\HeyHoLeysGo Trabalhos\gamemodes\GM.pwn(3037) : error 010: invalid function or declaration C:\Documents and Settings\Kieryce\Desktop\HeyHoLeysGo Trabalhos\gamemodes\GM.pwn(3038) : error 010: invalid function or declaration
ProxChat(30.0, playerid, string, Branco,Cinza,Cinza1,Cinza2,Preto); //<~~~~~~ 349
forward ProxChat(Float:radi, playerid, string[],0xFFFFFFFF,0xE8E8E8FF,0xD1D1D1FF,0xC2C2C2FF,0xB0B0B0FF); // <~~~~~~ 3037
public ProxChat(Float:radi, playerid, string[],0xFFFFFFFF,0xE8E8E8FF,0xD1D1D1FF,0xC2C2C2FF,0xB0B0B0FF) //<~~~~~~ 3038