[Ajuda] Oque tem de errado aqui?
#1

Код:
	for(new i =0; i < MAX_PLAYERS; i++)
	{
	    if(IsPlayerConnected(i))
	    {
	        if(IsPlayerInArea(i,2777.4788,1022.8942, 2894.6960,833.6323))
	        {
	            TextDrawSetString(areaGangZona,"agora foi");
	            TextDrawShowForPlayer(i,areaGangZona);
	            SendClientMessage(playerid,0x00c900ff,"saia");
	        }
	    }
	}
era pra funcionar O.O, nгo retorna nada
Reply
#2

pawn Код:
for(new carol = GetMaxPlayers(), i = 0; i != carol; ++i)
    {
        if(IsPlayerConnected(i))
        {
            if(isPlayerGangZone(i, 2777.4788,1022.8942, 2894.6960,833.6323))
            {
                TextDrawSetString(areaGangZona,"agora foi");
                TextDrawShowForPlayer(i,areaGangZona);
                SendClientMessage(playerid,0x00c900ff,"saia");
            }
        }
    }
   
   
   
   
isPlayerGangZone(pid, Float: gz_x, Float: gz_y,  Float: gz_x2, Float: gz_y2)
{
    new Float:X, Float:Y, Float:Z;
    GetPlayerPos(pid, X, Y, Z);
    if (X > gz_x && X < gz_x2 && Y > gz_y && Y < gz_y2)
        return true;
    return 0;
}
Reply
#3

Caroline, jб disse que vocк й foda hoje? Risos.
Muito obrigado!
Reply
#4

Sу um probleminha, tentei usar com minha array e nгo deu certo:

Код:
new Float:checkGzs[MAX_GZS][4] = {
	{1017.134948, 1222.946899, 1096.891235, 1361.736572}, 	  //GZs
	{2372.279052, 1832.521362, 2496.685302, 1962.471801},
	{2777.4753, 833.6251, 2894.6955, 1022.9479},
	{918.294555, 2043.856567, 996.507202, 2182.339599},
	{1638.5530,1284.3757, 1716.3368,1319.3700},
	{2079.743,978.1417, 2329.653,1171.545},
	{2099.267,1535.143, 2290.605,1728.547},
	{1111.341,2718.771, 1509.635,2842.55}
};
	for(new carol = GetMaxPlayers(), i = 0; i != carol; ++i)
    {
        if(IsPlayerConnected(i))
        {
            if(isPlayerGangZone(i, checkGzs[i][0],checkGzs[i][1],checkGzs[i][2],checkGzs[i][3]))
            {
                TextDrawSetString(areaGangZona,"agora foi");
                TextDrawShowForPlayer(i,areaGangZona);
                SendClientMessage(playerid,0x00c900ff,"saia");
            }
            else
            {
                TextDrawHideForPlayer(i, areaGangZona);
            }
        }
    }
Reply
#5

pawn Код:
for(new carol = GetMaxPlayers(), i = 0; i != carol; ++i)
    {
        if(IsPlayerConnected(i))
        {
            for(new e; e != MAX_GZS; ++e)
            {
                if(isPlayerGangZone(i, checkGzs[e][0],checkGzs[e][1],checkGzs[e][2],checkGzs[e][3]))
                {
                    TextDrawSetString(areaGangZona,"agora foi");
                    TextDrawShowForPlayer(i,areaGangZona);
                    SendClientMessage(playerid,0x00c900ff,"saia");
                }
                else
                {
                    TextDrawHideForPlayer(i, areaGangZona);
                }
             }
        }
    }
...
Reply
#6

Caroline, sу tem um problema, o TextDraw nгo aparece em todos lugares.. mas o SendClientMessage sim
Reply
#7

Quote:
Originally Posted by cotonete
Посмотреть сообщение
Caroline, sу tem um problema, o TextDraw nгo aparece em todos lugares.. mas o SendClientMessage sim
pawn Код:
for(new carol = GetMaxPlayers(), i = 0; i != carol; ++i)
    {
        if(IsPlayerConnected(i))
        {
            for(new e; e != MAX_GZS; ++e)
            {
                if(isPlayerGangZone(i, checkGzs[e][0],checkGzs[e][1],checkGzs[e][2],checkGzs[e][3]))
                {
                    TextDrawSetString(areaGangZona,"agora foi");
                    TextDrawShowForPlayer(i,areaGangZona);
                    SendClientMessage(playerid,0x00c900ff,"saia");
                    printf("CAROL: %d | %d", i, e);
                }
                else
                {
                    TextDrawHideForPlayer(i, areaGangZona);
                    printf("CAROL22: %d | %d", i, e);
                }
             }
        }
    }
bota isto e depois testa e depois posta oque apareceu no console.
Reply
#8

olha: http://pastebin.com/nKnmU1k5

repetindo, sу o TextDraw estб bugando, o resto funciona perfeitamente
Reply
#9

pawn Код:
for(new carol = GetMaxPlayers(), i = 0; i != carol; ++i)
    {
        if(IsPlayerConnected(i))
        {
            for(new e; e != MAX_GZS; ++e)
            {
                if(isPlayerGangZone(i, checkGzs[e][0],checkGzs[e][1],checkGzs[e][2],checkGzs[e][3]))
                {
                    new Text:areaGangZona;
                    areaGangZona = TextDrawSetString(areaGangZona,"agora foi");
                    TextDrawShowForPlayer(i, areaGangZona);
                    SendClientMessage(playerid,0x00c900ff,"saia");
                    printf("CAROL: %d | %d", i, e);
                }
                else
                {
                    TextDrawHideForPlayer(i, areaGangZona);
                    printf("CAROL22: %d | %d", i, e);
                }
             }
        }
    }
Reply
#10

Cotonete, poste oque estб no topo em areaGangZona.
pawn Код:
new Text:areaGangZona;

// ou

new Text:areaGangZona[MAX_PLAYERS];
Como estб ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)