[Ajuda] Como Setar Prof
#1

pessoal eu criei uma prof Taxista Mais Nгo Consigo Botar Ela Pra Quando Selecionar Ela No Dialog Setar a PROF Taxista Como Seto A Prof Apois Selecionar ela no Dialog ?
Reply
#2

PHP код:
Profissao[playerid] = escolhida
Basta seguir a lуgica.
Reply
#3

sim to tentando mais nгo to conseguindo
Reply
#4

Cade os cуdigos?

Cуdigos da dialog das profissхes e variбvel global da profissгo.
Reply
#5

Codigo Do Dialog

Quote:

ShowPlayerDialog(playerid,0,DIALOG_STYLE_LIST,"Emp regos","Cantor\nTexte2\nTexte3\nTexte4","OK","Fech ar");

Quote:

if(dialogid == 0){
if(response){
if(listitem == 0){

}
if(listitem == 1){

}
if(listitem == 2){

}
if(listitem == 3){

}
if(listitem == 4){

}
}
else{
}
}

Variбvel

PHP код:
new Profissao[MAX_PLAYERS]; 
Reply
#6

PHP код:
#include <a_samp>
#include <zcmd>

#define DIALOG_EMPREGOS 100
#define PROF_CANTOR 10

enum pInfo {
    
Profissao
}

new 
PlayerInfo[MAX_PLAYERS][pInfo];

public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == DIALOG_EMPREGOS)
    {
        if(
response)
        {
            if(
listitem == 0)
            {
                if(
PlayerInfo[playerid][Profissao] != PROF_CANTOR)
                {
                    
PlayerInfo[playerid][Profissao] = PROF_CANTOR;
                    
SendClientMessage(playerid0x00FF80AA"Parabйns: Agora vocк й um cantor!");
                    return 
1;
                }

            }
            if(
listitem == 1)
            {

            }
            if(
listitem == 2)
            {

            }
            if(
listitem == 3)
            {

            }
            if(
listitem == 4)
            {

            }
        }
    }
    return 
1;
}

CMD:empregos(playerid)
{
    
ShowPlayerDialog(playeridDIALOG_EMPREGOSDIALOG_STYLE_LIST,"Empregos","Cantor\nTexte2\nTexte3\nTexte4","Aceitar","Fechar");
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)