SA-MP Forums Archive
[Ajuda] Virtual World - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Virtual World (/showthread.php?tid=375336)



Virtual World - Hydra_RuleZ - 06.09.2012

Daew galera do forums samp , eu queria saber se tem como eu colocar restriзхes do tipo, no meu GM o interior da hq Rotam LS e SF й o mesmo mas o mas o virtual world nгo, eu queria colocar quando o player estб nesse interior mas em virtual world diferente nao ve o que o player fala tem como?


VLW desde jб pela atenзгo


Re: Virtual World - .FuneraL. - 06.09.2012

Usa SetPlayerVirtualWorld para Cada Interior...


Re: Virtual World - paulor - 06.09.2012

Posta o OnPlayerText.


Re: Virtual World - Hydra_RuleZ - 06.09.2012

que parte do OnPlayerText. se quer paulor ?, й que й muita mercadoria XDD


Re: Virtual World - Hydra_RuleZ - 06.09.2012

pawn Код:
if (realchat)
    {
        if(gPlayerLogged[playerid] == 0)
        {
            return 0;
        }
        if(PlayerInfo[playerid][pMaskuse] == 1)
        {
            format(string, sizeof(string), "Mascarado diz: %s", text);
            ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
            SetPlayerChatBubble(playerid, text, COLOR_AZULBB, 20.0, 10000);
            //ApplyAnimation(playerid,"PED","IDLE_CHAT",4.0,0,0,0,0,0);
        }
        else
        {
            format(string, sizeof(string), "%s diz: %s", PlayerName(playerid), text);
            ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
            SetPlayerChatBubble(playerid, text, COLOR_AZULBB, 20.0, 10000);
            //ApplyAnimation(playerid,"PED","IDLE_CHAT",4.1,0,1,1,1,1);
        }
        return 0;
    }
nгo sei se ajuda...


Re: Virtual World - paulor - 06.09.2012

pawn Код:
forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
public ProxDetector(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) && (GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(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))) // If the player is within 16 meters
                {
                    SendClientMessage(i, col1, string);
                }
                else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8))) // within 8 meters
                {
                    SendClientMessage(i, col2, string);
                }
                else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4))) //4 meters
                {
                    SendClientMessage(i, col3, string);
                }
                else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2))) //2 meters
                {
                    SendClientMessage(i, col4, string);
                }
                else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) //1 meter
                {
                    SendClientMessage(i, col5, string);
                }
            }
        }
    }
    return 1;
}
Troque o seu ProxDetector por esse ai!


Re: Virtual World - Hydra_RuleZ - 06.09.2012

vlw funcionou XDD