[Ajuda] textlabel
#1

eu atualizei minha versao pra 0.3z e tinha um label no meus portao mostrando o id
mais nгo esta aparecendo quando eu digito /ap > abre o portao o label aparecer normalmente o que pode ser fiquei meio confuso

pawn Code:
if(strcmp(cmd, "/ap", true) == 0)
    {
        new id;

        if(sscanf(cmdtext, "s[4]d", cmd, id))
        {
            SendClientMessage(playerid, Vermelho, "/ap [id]");
            return 1;
        }
        format(file, sizeof(file), PASTA_PORTOES, id);
        if(dini_Exists(file))
        {
            if(!IsPlayerInRangeOfPoint(playerid, 50.0, dini_Float(file, "fCordX"), dini_Float(file, "fCordY"), dini_Float(file, "fCordZ")))
            {
                SendClientMessage(playerid, Vermelho, "Vocк estб muito longe do portгo!");
                return 1;
            }
            if(dini_Int(file, "TDono") == 3)
            {
                SendClientMessage(playerid, Vermelho, "Este portгo foi deletado!");
            }
            else
            {
                if(strcmp(dini_Get(file, "Dono"), GetPlayerNameEx(playerid), false) == 0 || strcmp(dini_Get(file, "Convidado1"), GetPlayerNameEx(playerid), false) == 0 || strcmp(dini_Get(file, "Convidado2"), GetPlayerNameEx(playerid), false) == 0 || strcmp(dini_Get(file, "Convidado3"), GetPlayerNameEx(playerid), false) == 0 || pAdmin[playerid] > 0)
                {
                    MoveDynamicObject(dini_Int(file, "Id"), dini_Float(file, "aCordX"), dini_Float(file, "aCordY"), dini_Float(file, "aCordZ"), 4.0);
                }
                else
                {
                    SendClientMessage(playerid, Vermelho, "Vocк nгo tem a chave!");
                }
            }
        }
        else
        {
            SendClientMessage(playerid, Vermelho, "Portгo invбlido, tente novamente!");
        }
        return 1;

Quando vocк esta perto do portao

pawn Code:
for(new strpt[128], portaoid, portao = 0; portao < MAX_PORTOES; portao++)
    {
        if(proximoportao != MAX_PORTOES)
        {
            format(strpt, sizeof(strpt), PASTA_PORTOES, portao);
            if(dini_Exists(strpt))
            {
                if(dini_Int(strpt, "TDono") == 0)
                {
                    portaoid = CreateDynamicObject(dini_Int(strpt, "Modelo"), dini_Float(strpt, "fCordX"), dini_Float(strpt, "fCordY"), dini_Float(strpt, "fCordZ"), dini_Float(strpt, "fCordRX"), dini_Float(strpt, "fCordRY"), dini_Float(strpt, "fCordRZ"), -1, -1, -1, 200.0);
                    dini_IntSet(strpt, "Id", portaoid);
                    format(STRX, sizeof(STRX), "{FFFF00}/ap %d {FF0000}para abrir\n{FFFF00}/fp %d {FF0000}para fechar", portao, portao);
                    potextoid[portao] = CreateDynamic3DTextLabel(STRX, -1, dini_Float(strpt, "fCordX"), dini_Float(strpt, "fCordY"), dini_Float(strpt, "fCordZ"), 30.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 200.0);
                    proximoportao++;
                }
                else
                {
                    if(dini_Int(strpt, "TDono") == 1)
                    {
                        portaoid = CreateDynamicObject(dini_Int(strpt, "Modelo"), dini_Float(strpt, "fCordX"), dini_Float(strpt, "fCordY"), dini_Float(strpt, "fCordZ"), dini_Float(strpt, "fCordRX"), dini_Float(strpt, "fCordRY"), dini_Float(strpt, "fCordRZ"), -1, -1, -1, 200.0);
                        dini_IntSet(strpt, "Id", portaoid);
                        format(STRX, sizeof(STRX), "{FFFF00}/ap %d {FF0000}para abrir\n{FFFF00}/fp %d {FF0000}para fechar", portao, portao);
                        potextoid[portao] = CreateDynamic3DTextLabel(STRX, -1, dini_Float(strpt, "fCordX"), dini_Float(strpt, "fCordY"), dini_Float(strpt, "fCordZ"), 30.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 200.0);
                        proximoportao++;
                    }
                    else
                    {
                        dini_IntSet(strpt, "TDono", 3);
                        dini_Set(strpt, "Dono", "Ninguem");
                        dini_IntSet(strpt, "Id", INVALID_OBJECT_ID);
                        proximoportao++;
                    }
                }
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
textlabel - by Dieguinho - 01.03.2014, 00:52

Forum Jump:


Users browsing this thread: 1 Guest(s)