Nomes RolePlay
#8

@KrZ7:
Cara na boa odeio gente de 1° post que vem me corrigir sem mesmo olha o code, nгo eu defini 2 string...

@Vitor:
Muito Fбcil, se algo do tipo 'ProxDetector' encontrado em alguns GameModes,FilterScript...
Ficaria desta forma mais ou menos
:
pawn Код:
new Text3D:label[MAX_PLAYERS];
 
public OnPlayerText(playerid,text[])
{

    new name[MAX_PLAYER_NAME], string[44];
    GetPlayerName(playerid, name, sizeof(name));
    format(string, sizeof(string), "%s",name);
    new nomedele = strfind(text, name, true);//Procura no texto o nome
    if(nomedele == -1)//Caso tiver
{
     for(new allplayers = 0; allplayers < GetMaxPlayers(); allplayers++)
    {
    if(GetDistanceBetweenPlayers(playerid,allplayers) >= 15)
      { //Usa ProxDetector
 
    label[playerid] = Create3DTextLabel(name,0x008080FF,30.0,40.0,50.0,40.0,0);
    Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.7);
   }}
}
    return 1;
}
 
public OnPlayerDisconnect(playerid, reason)
{
    Delete3DTextLabel(label[playerid]);
    return 1;
}
stock GetDistanceBetweenPlayers(playerid,playerid2) //By Slick (Edited by Sacky)
{
new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2;
new Float:dis;
GetPlayerPos(playerid,x1,y1,z1);
GetPlayerPos(playerid2,x2,y2,z2);
dis = floatsqroot((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1)+(z2-z1)*(z2-z1));
return floatround(dis);
}
Obs: Isso apenas geta a distancia, й um exemplo,deve-se usar ProxDetector
Reply


Messages In This Thread
Nomes RolePlay - by VitorMondim - 08.07.2010, 00:21
Re: Nomes RolePlay - by ipsBruno - 08.07.2010, 00:44
Re: Nomes RolePlay - by Amendoim - 08.07.2010, 00:57
Re: Nomes RolePlay - by ipsBruno - 08.07.2010, 01:09
Re: Nomes RolePlay - by Amendoim - 08.07.2010, 12:29
Re: Nomes RolePlay - by KrZ7 - 08.07.2010, 12:29
Re: Nomes RolePlay - by VitorMondim - 08.07.2010, 13:06
Re: Nomes RolePlay - by ipsBruno - 08.07.2010, 13:44
Re: Nomes RolePlay - by VitorMondim - 08.07.2010, 14:02
Re: Nomes RolePlay - by KrZ7 - 08.07.2010, 21:02

Forum Jump:


Users browsing this thread: 2 Guest(s)