[Ajuda] TextDraw ;s
#1

qual eo erro a textdraw nгo estб aparecendo..

pawn Код:
for (new i=0;i<MAX_PLAYERS;i++){
if(IsPlayerConnected(i)){
//Scores
new aname[MAX_PLAYER_NAME];
GetPlayerName(i, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
SetPlayerScore(i,DOF2_GetInt(file, "Level"));

new nomepl[MAX_PLAYER_NAME];
GetPlayerName(i, nomepl, sizeof(nomepl));
format(file, sizeof(file), PASTA_CONTAS, nomepl);
//
format(string, sizeof(string), "~r~Exp:~b~%d/5~n~~b~Level:~b~%d~n~~g~Estudo:~b~%d~n~~w~Gasolina:~b~%d~n~~p~",DOF2_GetInt(file, "EXP"),DOF2_GetInt(file, "Level"),DOF2_GetInt(file, "Faculdade"),DOF2_GetInt(file, "Combustivel")); //menu abaixo do dinheiro
TextDrawSetString(gText2[i], string);
//
format(string, sizeof(string), "                     ~>~ ~w~Brasil~g~Crazy~r~Life~y~"); //DOF2_GetInt(file, "EXP"),DOF2_GetInt(file, "Level"),dini_Int(file, "Faculdade")
TextDrawSetString(gText2[i], string);
TextDrawSetString(gText2[i], string);
TextDrawShowForPlayer(i, gText2[i]);
Reply
#2

Coloco isso no Login
pawn Код:
TextDrawShowForPlayer(playerid, gText2[playerid]);
coloquei "i" como exemplo mais ele mudaria por que daria erros
Reply
#3

Quote:
Originally Posted by Sky_.
Посмотреть сообщение
Coloco isso no Login
pawn Код:
TextDrawShowForPlayer(i, gText2[i]);
pawn Код:
TextDrawShowForPlayer(playerid, gText2[playerid]);
Reply
#4

nгo *-*

onde posso coloca isso?
Reply
#5

Poste seu Login aki

Sua callback de login ou dialog n sei como й!!
Reply
#6

seria isso?

pawn Код:
if(dialogid == AVISO)
{
if(response == 1)
{
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, sizeof(aname));
format(file, sizeof(file), PASTA_CONTAS, aname);
if(PlayerInfo[playerid][Logged] == 0){
if(!fexist(file))
{
format(STRX, sizeof(STRX), "Vocк nгo tem uma conta registrada, %s!\n\nDigite uma senha e clique em \"Registrar\".", aname);
ShowPlayerDialog(playerid, REGISTRO, DIALOG_STYLE_PASSWORD, "CONTA", STRX, "Registrar", "Sair");
}
if(fexist(file))
{
format(STRX, sizeof(STRX), "Bem-vindo(a) novamente, %! Logue-se em sua conta.\n\nDigite sua senha e clique em \"Logar\".", aname);
ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_PASSWORD, "CONTA", STRX, "Logar", "Sair");
}
}
}else{
new stringz[256];
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(stringz, sizeof(stringz), "(INFO) %s Levou kick por [BCL]Crazy. por nгo se Registrar/Logar.", aname);
SendClientMessageToAll(tcadm,stringz);
Kick(playerid);
}
}

if(dialogid == REGISTRO)
{
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, sizeof(aname));
format(file, sizeof(file), PASTA_CONTAS, aname);
if(response == 1)
{
if(strlen(inputtext) < MIN_SENHA || strlen(inputtext) > MAX_SENHA)
{
format(STRX, sizeof(STRX), "(INFO) A senha deve ter entre %d e %d caracteres!", MIN_SENHA, MAX_SENHA);
SendClientMessage(playerid, Vermelho, STRX);
format(STRX, sizeof(STRX), "Senha muito grande ou pequena, %s!\nColoque sua senha e clique em \"Registrar\".", aname);
ShowPlayerDialog(playerid, REGISTRO, DIALOG_STYLE_PASSWORD, "Registrando uma conta", STRX, "Registrar", "Sair");
return 1;
}
@edit ou isso tbm..

pawn Код:
DOF2_CreateFile(file);
DOF2_SetString(file, "Senha", inputtext);
DOF2_SetString(file, "Skin", "289");
DOF2_SetString(file, "Profissao", "0");
DOF2_SetString(file, "ContaBancaria", "0");
DOF2_SetString(file, "SaldoBancario", "0");
DOF2_SetString(file, "Celular", "0");
DOF2_SetString(file, "CartaoTelefonico", "0");
DOF2_SetString(file, "MP3", "0");
DOF2_SetString(file, "HabTerrestre", "0");
DOF2_SetString(file, "HabAerea", "0");
DOF2_SetString(file, "HabNautica", "0");
DOF2_SetString(file, "Preso", "0");
DOF2_SetString(file, "Bloco", "0");
DOF2_SetString(file, "Casa", "0");
DOF2_SetString(file, "Carta", "0");
DOF2_SetString(file, "Lembrete", "Nada");
DOF2_SetString(file, "Level","0");
DOF2_SetInt(file,"Continuar",0);
DOF2_SetString(file, "Combustivel", "100");
DOF2_SetInt(file, "novato", 1);
DOF2_SetInt(file,"Porte", 0);
DOF2_SetInt(file,"Carteira", 0);
DOF2_SetInt(file,"Level",25);
DOF2_SetInt(file,"aAdmin",0);
DOF2_SetInt(file,"Admin",0);
DOF2_SetInt(file,"Org",0);
DOF2_SetInt(file,"Dinheiro",10000);
DOF2_SetString(file, "Faculdade", "25");
ShowPlayerDialog(playerid, cidades, DIALOG_STYLE_LIST, "Mundo virtual RPG - Escolha Sua Cidade", "::.Brasil Crazy Life.:: Los Santos", "Morar", "Cancelar");
GameTextForPlayer(playerid, "~g~Registrado com sucesso", 8000, 3);
PlayerPlaySound(playerid, 1057, 0, 0, 0);
PlayerInfo[playerid][Logged] = 1;
SetPlayerGrana(playerid,10000);
}else{
format(STRX, sizeof(STRX), "Vocк tem que ter uma conta para jogar %s!\nColoque sua senha e clique em \"Registrar\".", aname);
ShowPlayerDialog(playerid, REGISTRO, DIALOG_STYLE_INPUT, "Registrando uma conta", STRX, "Registrar", "Sair");
}
}
if(dialogid == LOGIN)
{
    new aname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, aname, sizeof(aname));
    format(file, sizeof(file), PASTA_CONTAS, aname);
    if(response == 1)
    {
        if(isnull(inputtext))return ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "CONTA", STRX, "Logar", "Sair");
        if(strcmp(DOF2_GetString(file, "Senha"), inputtext, true) == 0)
        {
            pAdmin[playerid] = DOF2_GetInt(file, "Admin");
            SetSpawnInfo(playerid, 1, DOF2_GetInt(file, "Skin"), DOF2_GetInt(file, "CasaX"), DOF2_GetInt(file, "CasaY"), DOF2_GetInt(file, "CasaZ"), 354.1657, 0, 0, 0, 0, 0, 0);
            if(DOF2_GetInt(file, "Continuar") == 1){
                SendClientMessage(playerid, Branco, "(INFO) Vocк pode voltar a posiзгo {900ADE}de quando saiu do server, use /continuar");
            }
            if(DOF2_GetInt(file, "Bloco") == 1){
                new stringlembrete[256];
                format(stringlembrete, sizeof(stringlembrete), "Lembrete: %s.", DOF2_GetString(file, "Lembrete"));
                SendClientMessage(playerid, Blue, stringlembrete);
            }
            if(DOF2_GetInt(file2,"novato") == 2){
                new string2[256];
                new ip[128];
                GetPlayerIp(playerid,ip,128);
                format(string2, sizeof(string2), "Seu Nick: %s » Seu {0AD0DE}ID: %d » Seu IP: %s", aname,playerid,ip);
                SendClientMessage(playerid, Azul, string2);
                SendClientMessage(playerid, Verde, "Veja sua identidade,{900ADE} digite /identidade");
            }
            if(pAdmin[playerid] > 0)
            {
                new AdminName[MAX_PLAYER_NAME];
                GetPlayerName(playerid, AdminName, sizeof(AdminName));
                format(string, sizeof(string), "~r~Adm ~p~%s: ~g~Online", AdminName);
                for(new i=0; i<MAX_PLAYERS; i++)
                {
                    GameTextForPlayer(i, string , 5000, 3);
                }
            }
            jasequestro[playerid]=0;
            NaFaculdade[playerid]=0;
            Mute[playerid]= 0;
            nautlls[playerid]= 0;
            nobarlv[playerid]=0;
            nobarls[playerid]=0;
            nobarsf[playerid]=0;
            nobarfc[playerid]=0;
            preso[playerid]=0;
            algemado[playerid]=0;
            sequestro[playerid]=0;
            aviso[playerid]=0;
            gmod[playerid]=0;
            amod[playerid]=0;
            autoescola[playerid]=0;
            Carregamento[playerid]=0;
            cacando[playerid]=0;
            nogame[playerid]=0;
            admin[playerid]=0;
            prefsf[playerid]=0;
            preflv[playerid]=0;
            prefls[playerid]=0;
            vercmds[playerid]=0;
            votou[playerid] = false;
            PlayerInfo[playerid][Logged] = 1;
            InCall[playerid]=0,GetCall[playerid]=0;
            GivePlayerGrana(playerid, DOF2_GetInt(file, "Dinheiro"));
            SpawnPlayer(playerid);
            GameTextForPlayer(playerid, "~r~Logado com sucesso", 8000, 3);
            PlayerPlaySound(playerid, 1057, 0, 0, 0);
        }else{
            PlayerInfo[playerid][LoginsFalsos]++;
            if(PlayerInfo[playerid][LoginsFalsos] >= 3)
            {
                format(STRX, sizeof(STRX), "(INFO) %s Levou kick automatico. Razгo: %d tentativas de login", aname, 3);
                SendClientMessageToAll(tcadm, STRX);
                Kick(playerid);
            }else{
                SendClientMessage(playerid, Vermelho,"[CONTA] Senha incorreta!");
                format(STRX, sizeof(STRX), "Senha incorreta, %! Logue-se em sua conta.\n\nDigite sua senha e clique em \"Logar\".", aname);
                ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "CONTA", STRX, "Logar", "Sair");
            }
        }
    }else{
        format(STRX, sizeof(STRX), "Logue para poder jogar, %! Logue-se em sua conta.\n\nDigite sua senha e clique em \"Logar\". \n\n BCL RPG!.",aname);
        ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "CONTA", STRX, "Logar", "Sair");
    }
Reply
#7

procure
pawn Код:
if(dialogid == LOGIN)
Reply
#8

ai postei td do login agr no @edit :P
Reply
#9

pawn Код:
public OnPlayerSpawn(playerid)
{
      TextDrawShowForPlayer(playerid, gText2[playerid]);
      return 1;
}
Feito.
Reply
#10

simples..

pawn Код:
if(dialogid == LOGIN)
{
    new aname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, aname, sizeof(aname));
    format(file, sizeof(file), PASTA_CONTAS, aname);
    if(response == 1)
    {
        if(isnull(inputtext))return ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "CONTA", STRX, "Logar", "Sair");
        if(strcmp(DOF2_GetString(file, "Senha"), inputtext, true) == 0)
        {
            pAdmin[playerid] = DOF2_GetInt(file, "Admin");
            SetSpawnInfo(playerid, 1, DOF2_GetInt(file, "Skin"), DOF2_GetInt(file, "CasaX"), DOF2_GetInt(file, "CasaY"), DOF2_GetInt(file, "CasaZ"), 354.1657, 0, 0, 0, 0, 0, 0);
            if(DOF2_GetInt(file, "Continuar") == 1){
                SendClientMessage(playerid, Branco, "(INFO) Vocк pode voltar a posiзгo {900ADE}de quando saiu do server, use /continuar");
            }
            if(DOF2_GetInt(file, "Bloco") == 1){
                new stringlembrete[256];
                format(stringlembrete, sizeof(stringlembrete), "Lembrete: %s.", DOF2_GetString(file, "Lembrete"));
                SendClientMessage(playerid, Blue, stringlembrete);
            }
            if(DOF2_GetInt(file2,"novato") == 2){
                new string2[256];
                new ip[128];
                GetPlayerIp(playerid,ip,128);
                format(string2, sizeof(string2), "Seu Nick: %s » Seu {0AD0DE}ID: %d » Seu IP: %s", aname,playerid,ip);
                SendClientMessage(playerid, Azul, string2);
                SendClientMessage(playerid, Verde, "Veja sua identidade,{900ADE} digite /identidade");
            }
            if(pAdmin[playerid] > 0)
            {
                new AdminName[MAX_PLAYER_NAME];
                GetPlayerName(playerid, AdminName, sizeof(AdminName));
                format(string, sizeof(string), "~r~Adm ~p~%s: ~g~Online", AdminName);
                for(new i=0; i<MAX_PLAYERS; i++)
                {
                    GameTextForPlayer(i, string , 5000, 3);
                }
            }
            jasequestro[playerid]=0;
            NaFaculdade[playerid]=0;
            Mute[playerid]= 0;
            nautlls[playerid]= 0;
            nobarlv[playerid]=0;
            nobarls[playerid]=0;
            nobarsf[playerid]=0;
            nobarfc[playerid]=0;
            preso[playerid]=0;
            algemado[playerid]=0;
            sequestro[playerid]=0;
            aviso[playerid]=0;
            gmod[playerid]=0;
            amod[playerid]=0;
            autoescola[playerid]=0;
            Carregamento[playerid]=0;
            cacando[playerid]=0;
            nogame[playerid]=0;
            admin[playerid]=0;
            prefsf[playerid]=0;
            preflv[playerid]=0;
            prefls[playerid]=0;
            vercmds[playerid]=0;
            votou[playerid] = false;
            PlayerInfo[playerid][Logged] = 1;
            InCall[playerid]=0,GetCall[playerid]=0;
            GivePlayerGrana(playerid, DOF2_GetInt(file, "Dinheiro"));
            SpawnPlayer(playerid);
            GameTextForPlayer(playerid, "~r~Logado com sucesso", 8000, 3);
            PlayerPlaySound(playerid, 1057, 0, 0, 0);
            TextDrawShowForPlayer(playerid, gText2[playerid]); // <<<< isso!
        }else{
            PlayerInfo[playerid][LoginsFalsos]++;
            if(PlayerInfo[playerid][LoginsFalsos] >= 3)
            {
                format(STRX, sizeof(STRX), "(INFO) %s Levou kick automatico. Razгo: %d tentativas de login", aname, 3);
                SendClientMessageToAll(tcadm, STRX);
                Kick(playerid);
            }else{
                SendClientMessage(playerid, Vermelho,"[CONTA] Senha incorreta!");
                format(STRX, sizeof(STRX), "Senha incorreta, %! Logue-se em sua conta.\n\nDigite sua senha e clique em \"Logar\".", aname);
                ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "CONTA", STRX, "Logar", "Sair");
            }
        }
    }else{
        format(STRX, sizeof(STRX), "Logue para poder jogar, %! Logue-se em sua conta.\n\nDigite sua senha e clique em \"Logar\". \n\n BCL RPG!.",aname);
        ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "CONTA", STRX, "Logar", "Sair");
    }


Quote:
Originally Posted by @FatalFormat
Посмотреть сообщение
pawn Код:
public OnPlayerSpawn(playerid)
{
      TextDrawShowForPlayer(playerid, gText2[playerid]);
      return 1;
}
Feito.
й tambem!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)