[Ajuda] Player Demora para descongelar?
#1

Porque quando o player nгo esperou um UP para usar a prof novamente, ele nгo descongela? Ele sу descongela o player se ele apertar F e aparecer o dialog novamente.

pawn Код:
case 0:
{
        if(dini_Int(file,"naoupou") == 1) return SendClientMessage(playerid, Vermelho, "Espere um UP para escolher a prof novamente!");
        if(dini_Int(file,"naoupou") == 0)
        TogglePlayerControllable(playerid, 1);
        if(dini_Int(file, "Level")> 10){
        SendClientMessage(playerid, 0xFFFFFF, "|INFO| Profissгo alterada com sucesso!"); // Jornalista
        SendClientMessage(playerid, 0x6767B4AA, "|INFO| Para saber os comandos de sua profissгo, digite /profissao");
        PlayerPlaySound(playerid, 1057, 0, 0, 0);
        Logarprof(playerid);
        dini_IntSet(file, "Profissao", 16); // 16 = pizzaboy
        dini_FloatSet(file,"CasaX",Float:1310.1312);
        dini_FloatSet(file,"CasaY",Float:-1373.9531);
        dini_FloatSet(file,"CasaZ",Float:13.6218);
        ShowMenuForPlayer(spawnprof, playerid);
        SetSpawnInfo(playerid, 0, dini_Int(file, "Skin"), dini_Int(file, "CasaX"), dini_Int(file, "CasaY"), dini_Int(file, "CasaZ"), 354.1657, 0, 0, 0, 0, 0, 0);
        TogglePlayerControllable(playerid, 1);
        } else {
        TogglePlayerControllable(playerid, 1);
        SendClientMessage(playerid, Vermelho, "|INFO| Erro na escolha da sua prof!");
    }
Reply
#2

pawn Код:
case 0:
{
        if(dini_Int(file,"naoupou") == 1) return SendClientMessage(playerid, Vermelho, "Espere um UP para escolher a prof novamente!");
        if(dini_Int(file,"naoupou") == 0)
        TogglePlayerControllable(playerid, 1);
        if(dini_Int(file, "Level")> 10){
        SendClientMessage(playerid, 0xFFFFFF, "|INFO| Profissгo alterada com sucesso!"); // Jornalista
        SendClientMessage(playerid, 0x6767B4AA, "|INFO| Para saber os comandos de sua profissгo, digite /profissao");
        PlayerPlaySound(playerid, 1057, 0, 0, 0);
        Logarprof(playerid);
        dini_IntSet(file, "Profissao", 16); // 16 = pizzaboy
        dini_FloatSet(file,"CasaX",Float:1310.1312);
        dini_FloatSet(file,"CasaY",Float:-1373.9531);
        dini_FloatSet(file,"CasaZ",Float:13.6218);
        ShowMenuForPlayer(spawnprof, playerid);
        SetSpawnInfo(playerid, 0, dini_Int(file, "Skin"), dini_Int(file, "CasaX"), dini_Int(file, "CasaY"), dini_Int(file, "CasaZ"), 354.1657, 0, 0, 0, 0, 0, 0);
        } else {
        TogglePlayerControllable(playerid, 0);
        SendClientMessage(playerid, Vermelho, "|INFO| Erro na escolha da sua prof!");
    }
Reply
#3

@double net ta lenta '-'
Reply
#4

Nгo funcionou mau.tito

Jб tentei mudar de 1 para 0 e vice-versa..

Serб que nгo й por causa do dialog?

Porque nesse eu uso Menu.

E no outro de roubar o banco uso dialog..
Reply
#5

Olб

Tenta assim;

pawn Код:
case 0:
{
    if(dini_Int(file,"naoupou") == 1)
    {
        SendClientMessage(playerid, Vermelho, "Espere um UP para escolher a prof novamente!");
        return 1;
    }
    else if(dini_Int(file,"naoupou") == 0)
    {
        if(dini_Int(file, "Level")> 10)
        {
            SendClientMessage(playerid, 0xFFFFFF, "|INFO| Profissгo alterada com sucesso!"); // Jornalista
            SendClientMessage(playerid, 0x6767B4AA, "|INFO| Para saber os comandos de sua profissгo, digite /profissao");
            PlayerPlaySound(playerid, 1057, 0, 0, 0);
            Logarprof(playerid);
            dini_IntSet(file, "Profissao", 16); // 16 = pizzaboy
            dini_FloatSet(file,"CasaX",Float:1310.1312);
            dini_FloatSet(file,"CasaY",Float:-1373.9531);
            dini_FloatSet(file,"CasaZ",Float:13.6218);
            ShowMenuForPlayer(spawnprof, playerid);
            SetSpawnInfo(playerid, 0, dini_Int(file, "Skin"), dini_Int(file, "CasaX"), dini_Int(file, "CasaY"), dini_Int(file, "CasaZ"), 354.1657, 0, 0, 0, 0, 0, 0);
        }
    }
    else
    {
        SendClientMessage(playerid, Vermelho, "|INFO| Erro na escolha da sua prof!");
    }
}
Espero ajuda

PT
Reply
#6

Nгo deu certo.
Agora o player pode escolher a prof quantas vezes quiser sem esperar o up.
Reply
#7

Ola

E assim?

pawn Код:
case 0:
{
    new aname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, aname, sizeof(aname));
    format(file, sizeof(file), PASTA_CONTAS, aname);
    if(dini_Int(file,"naoupou") == 1)
    {
        SendClientMessage(playerid, Vermelho, "Espere um UP para escolher a prof novamente!");
        return 1;
    }
    else if(dini_Int(file,"naoupou") == 0)
    {
        if(dini_Int(file, "Level")> 10)
        {
            SendClientMessage(playerid, 0xFFFFFF, "|INFO| Profissгo alterada com sucesso!"); // Jornalista
            SendClientMessage(playerid, 0x6767B4AA, "|INFO| Para saber os comandos de sua profissгo, digite /profissao");
            PlayerPlaySound(playerid, 1057, 0, 0, 0);
            Logarprof(playerid);
            dini_IntSet(file, "Profissao", 16); // 16 = pizzaboy
            dini_FloatSet(file,"CasaX",Float:1310.1312);
            dini_FloatSet(file,"CasaY",Float:-1373.9531);
            dini_FloatSet(file,"CasaZ",Float:13.6218);
            ShowMenuForPlayer(spawnprof, playerid);
            SetSpawnInfo(playerid, 0, dini_Int(file, "Skin"), dini_Int(file, "CasaX"), dini_Int(file, "CasaY"), dini_Int(file, "CasaZ"), 354.1657, 0, 0, 0, 0, 0, 0);
        }
    }
    else
    {
        SendClientMessage(playerid, Vermelho, "|INFO| Erro na escolha da sua prof!");
    }
}
PT
Reply
#8

Ainda continua a selecionar a prof vбrias vezes.
Reply
#9

Me manda essa parte do cуdigo completa por favor;

PT
Reply
#10

Me manda essa parte do cуdigo completa por favor

PT

@ edit - desculpa o double mas e que a net e lenta e nao sei deletar postagem
Reply
#11

Como assim?
Reply
#12

Ve se isto existe no seu GM

pawn Code:
GetPlayerName(playerid, aname, sizeof(aname));
PT
Reply
#13

vai ver que ele ta com frio .
tenta usar um comando para esquentar o jogador .
dai ele descongela uaн
Reply
#14

Quote:
Originally Posted by PT
View Post
Ve se isto existe no seu GM

pawn Code:
GetPlayerName(playerid, aname, sizeof(aname));
PT
Existe sim '='
Reply
#15

entao manda a resposta a dialog completa

essa dialog desde onde comeзa ate ao fim

PT
Reply
#16

pawn Code:
if(current == honestas1)
{
new string[266];
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
switch(row)
{
case 0:
{
  //  new aname[MAX_PLAYER_NAME];
   // GetPlayerName(playerid, aname, sizeof(aname));
    //format(file, sizeof(file), PASTA_CONTAS, aname);
    if(dini_Int(file,"rouboubanco") == 1)
    {
        SendClientMessage(playerid, Vermelho, "Espere um UP para escolher a prof novamente!");
    }
   else if(dini_Int(file,"rouboubanco") == 0)
   {
        if(dini_Int(file, "Level")> 10)
        {
            SendClientMessage(playerid, 0xFFFFFF, "|INFO| Profissгo alterada com sucesso!"); // Jornalista
            SendClientMessage(playerid, 0x6767B4AA, "|INFO| Para saber os comandos de sua profissгo, digite /profissao");
            PlayerPlaySound(playerid, 1057, 0, 0, 0);
            Logarprof(playerid);
            dini_IntSet(file, "Profissao", 16); // 16 = pizzaboy
            dini_FloatSet(file,"CasaX",Float:1310.1312);
            dini_FloatSet(file,"CasaY",Float:-1373.9531);
            dini_FloatSet(file,"CasaZ",Float:13.6218);
            ShowMenuForPlayer(spawnprof, playerid);
            SetSpawnInfo(playerid, 0, dini_Int(file, "Skin"), dini_Int(file, "CasaX"), dini_Int(file, "CasaY"), dini_Int(file, "CasaZ"), 354.1657, 0, 0, 0, 0, 0, 0);
        }
    }
    else
    {
        SendClientMessage(playerid, Vermelho, "|INFO| Erro na escolha da sua prof!");
    }
}
....

e

pawn Code:
}
}
if(current == profissoes)
{
switch(row)
{
case 0: // Honestas
{
HideMenuForPlayer(profissoes, playerid);
ShowMenuForPlayer(honestas1, playerid);
TogglePlayerControllable(playerid, 0);
}
e

pawn Code:
profissoes = CreateMenu("Profissoes", 1, 50.0, 180.0, 200.0, 200.0);
AddMenuItem(profissoes, 0, "~>~ Honestas 1");
e
pawn Code:
new Menu:profissoes;
new Menu:honestas1;
Reply
#17

Ixe voce entendeu mal, o codigo todo mas e da dialog....
Do que voce quer para fazer ...

PT
Reply
#18

Atualizei, ve lв.
Reply
#19

Ola

Cara se voce nao coloca os
pawn Code:
return 1;
onde eles sao precisos claro que o cara vai poder pegar a prof

ae ta direito

pawn Code:
if(current == honestas1)
{
new string[266];
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
switch(row)
{
case 0:
{
    if(dini_Int(file,"rouboubanco") == 1)
    {
        SendClientMessage(playerid, Vermelho, "Espere um UP para escolher a prof novamente!");
        return 1;
    }
   else if(dini_Int(file,"rouboubanco") == 0)
   {
        if(dini_Int(file, "Level")> 10)
        {
            SendClientMessage(playerid, 0xFFFFFF, "|INFO| Profissгo alterada com sucesso!"); // Jornalista
            SendClientMessage(playerid, 0x6767B4AA, "|INFO| Para saber os comandos de sua profissгo, digite /profissao");
            PlayerPlaySound(playerid, 1057, 0, 0, 0);
            Logarprof(playerid);
            dini_IntSet(file, "Profissao", 16); // 16 = pizzaboy
            dini_FloatSet(file,"CasaX",Float:1310.1312);
            dini_FloatSet(file,"CasaY",Float:-1373.9531);
            dini_FloatSet(file,"CasaZ",Float:13.6218);
            ShowMenuForPlayer(spawnprof, playerid);
            SetSpawnInfo(playerid, 0, dini_Int(file, "Skin"), dini_Int(file, "CasaX"), dini_Int(file, "CasaY"), dini_Int(file, "CasaZ"), 354.1657, 0, 0, 0, 0, 0, 0);
            return 1;
        }
    }
    else
    {
        SendClientMessage(playerid, Vermelho, "|INFO| Erro na escolha da sua prof!");
        return 1;
    }
}
Reply
#20

Meudeus '-'


Ainda o player pode selecionar quantas vez quiser o emprego.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)