[ajuda] Atualizar Text Draw
#8

pequena mudanзa nos cуdigos:
pawn Код:
public GangZonesCheck()
{
    new string[256];
    for(new i = 0; 42 > i; i++)
    {
        if (IsPlayerConnected(i))
        {
            TextDrawHideForPlayer(i, ZoneName[i]);
           
            if(GetPlayerZone(i) == -1)
            {
                format(string,256,"~n~~g~Brasil Mata-Mata 2012                 Participe da Nossa comunidade no orkut ~g~http://www.orkut.com.br/Main#Community?cmm=110617106");
                TextDrawSetString(ZoneName[i], string);
                TextDrawShowForPlayer(i, ZoneName[i]);
                return 1;
            }
           
            format(string,128,"~n~~p~Territ¦rio - %s -", gZonesCoordinates[pZone][gZoneName]);
            TextDrawSetString(ZoneName[i], string);
            TextDrawShowForPlayer(i, ZoneName[i]);
        }
    }
    return 1;
}


stock GetPlayerZone(playerid)
{
    if(GetPlayerState(playerid) == PLAYER_STATE_SPECTATING ||GetPlayerInterior(playerid) != 0 || GetPlayerVirtualWorld(playerid) != 0)
        return -1;

    for (new i = 0 ; i < 42; i++)
    {
        //if (playerX >= zone_minX && playerX <= zone_maxX && playerY >= zone_minY && playerY <= zone_maxY)
        if(isPlayerGangZone(pid, gZonesCoordinates[i][ZArea][2], gZonesCoordinates[i][ZArea][0], gZonesCoordinates[i][ZArea][3], gZonesCoordinates[i][ZArea][1]))
        {
            LastZone[playerid] = i;
            return LastZone[playerid];
        }
    }
    return -1;
}


isPlayerGangZone(pid, Float: gz_x, Float: gz_y,  Float: gz_x2, Float: gz_y2)
{
        static 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


Messages In This Thread
[ajuda] Atualizar Text Draw - by Link_ - 27.10.2011, 23:17
Respuesta: [ajuda] Atualizar Text Draw - by DrTHE - 28.10.2011, 10:36
Re: [ajuda] Atualizar Text Draw - by [O.z]Caroline - 28.10.2011, 14:06
Re: [ajuda] Atualizar Text Draw - by Link_ - 28.10.2011, 20:14
Re: [ajuda] Atualizar Text Draw - by [O.z]Caroline - 28.10.2011, 20:18
Re: [ajuda] Atualizar Text Draw - by [S]trong - 28.10.2011, 21:41
Re: [ajuda] Atualizar Text Draw - by Link_ - 28.10.2011, 22:08
Re: [ajuda] Atualizar Text Draw - by [O.z]Caroline - 28.10.2011, 22:10
Re: [ajuda] Atualizar Text Draw - by Link_ - 30.10.2011, 14:37

Forum Jump:


Users browsing this thread: 1 Guest(s)