[Ajuda]Sistema de trocar skin org
#1

bem queria que alguйm me ajudasse como eu crio uma dialog lista que venha com 4 opзхes de skins diferentes para os membros das orgs mudarem o skin quando quizer eu so quero uma base alguem pf?
Reply
#2

Uma base boa seria assim,
pawn Код:
ShowPlayerDialog(playerid,1241,DIALOG_STYLE_LIST,"Skins","Skin 1\r\nSkin 2\r\nSkin 3\r\nSkin 4","Escolher","Cancelar");

public OnDialogResponse(playerid,dialogid, response, listitem, inputtext[])
{
    if(dialogid == 1241)
    {
        if(response)
        {
            if(listitem == 0)
            {
                //item da primeira escolha
                return 1;
            }
            if(listitem == 1)
            {
                //item da segunda escolha
                return 1;
            }
            if(listitem == 2)
            {
                //item da terceira escolha
                return 1;
            }
            if(listitem == 3)
            {
                //item da quarta escolha
                return 1;
            }
    return 1;
}
Caso ainda tenha dъvidas pode perguntar. Espero ter ajudado (:
Reply
#3

Quais as variaveis de suas Gangs?
Reply
#4

Vlw ae papah, vou adaptar aki...
Reply
#5

tentei colocar aki mais n consegui criei um comandos para abrir a dialog list e depois nos itens coloquei pra setar skin setplayerskin quando copilo da 26 erros o q me diz?

usei assim:
PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
    if(
strcmp(cmd"/skins"true) == 0
    
{
    
ShowPlayerDialog(playerid1241DIALOG_STYLE_LIST"Teleportes""TPD1\nTPD2\nTPD3\nTPD4\nTPD5\nTPD6""Seleciona""Cancela");
    return 
1;

PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == 1241)
    {
        if(
response == 0)
        {
            if(
listitem == 0)
            {
                  
SetPlayerSkin(playerid270);
                return 
1;
            }
            if(
listitem == 1)
            {
                  
SetPlayerSkin(playerid277);
                return 
1;
            }
            if(
listitem == 2)
            {
                
SetPlayerPos(playeridcoordXcoordYcoordZ);
                return 
1;
            }
            if(
listitem == 3)
            {
                  
SetPlayerSkin(playerid124);
                return 
1;
            }
            if(
listitem == 4)
            {
                 
SetPlayerSkin(playerid101);
                return 
1;
            }
            if(
listitem == 5)
            {
                  
SetPlayerSkin(playerid200);               
                return 
1;
            }
        }
    }

Reply
#6

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmd, "/skins", true) == 0)
    {
        ShowPlayerDialog(playerid, 1241, DIALOG_STYLE_LIST, "Teleportes", "TPD1\nTPD2\nTPD3\nTPD4\nTPD5\nTPD6", "Seleciona", "Cancela");
        return 1;
    }
    return 1;
}
Reply
#7

PHP код:
 return 1
            } 
        } 
    } 

acho q esse final ta errado, n?
Reply
#8

o Comando tambйm estava errado. Qual o erro?
Reply
#9

ja resolvi aki,, mais agora estou com problema quando estou no jogo q seleciono uma opзгo nгo altera a skin .... olha ae o como coloquei....

comando:
pawn Код:
if(strcmp(cmdtext, "/skins", true) == 0)
    {
        ShowPlayerDialog(playerid, 1241, DIALOG_STYLE_LIST, "Teleportes", "TPD1\nTPD2\nTPD3\nTPD4\nTPD5\nTPD6", "Seleciona", "Cancela");
        return 1;
    }
pawn Код:
if(dialogid == 1241)
    {
        if(response == 0)
        {
            if(listitem == 0)
            {
                  PlayerInfo[playerid][pSkin] = 101;
                return 1;
            }
            if(listitem == 1)
            {
                  PlayerInfo[playerid][pSkin] = 101;
                return 1;
            }
            if(listitem == 2)
            {
                PlayerInfo[playerid][pSkin] = 101;
                return 1;
            }
            if(listitem == 3)
            {
                  PlayerInfo[playerid][pSkin] = 101;
                return 1;
            }
            if(listitem == 4)
            {
                 PlayerInfo[playerid][pSkin] = 101;
                return 1;
            }
            if(listitem == 5)
            {
                  SetPlayerSkin(playerid, 200);
                return 1;
            }
        }
    }
Jб Testei setplayerskin e ficou do mesmo jeito
Reply
#10

Nгo entendi, qual o problema?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)