[Ajuda] Virtual World
#1

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
Reply
#2

Usa SetPlayerVirtualWorld para Cada Interior...
Reply
#3

Posta o OnPlayerText.
Reply
#4

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

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...
Reply
#6

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!
Reply
#7

vlw funcionou XDD
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)