[ajuda] Salvar skin
#1

Bem estou com um FS aki e gostaria de salvar as skin. Coloquei um sistema de trocar skin e queria salvar a skin olha ae o FS....

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp("/ducks",cmdtext,true,11) == 0)
{
    ShowPlayerDialog(playerid,MaGnO_357,DIALOG_STYLE_LIST,"Mudar Skin Em Dialog by MaGnO_357","Roupas\nEquipar","Selecionar", "Cancelar");
    return 1;
}
    return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == MaGnO_357)
    {
        if(response)
        {
            if(listitem == 0)
            {
            ShowPlayerDialog(playerid, Groove, DIALOG_STYLE_LIST, "Roupas", "Roupa1\nRoupa2\nRoupa3\nRoupa4", "Selecionar", "Cancelar" );
            }
        }
        return 1;
    }
//==============================================================================
    if(dialogid == Groove)
    {
        if(response)
        {
            if(listitem == 0)
            {
            SetPlayerSkin(playerid, 0);
            SendClientMessage(playerid,VERMELHO,"vocк mudou seu skin para o id 0");
            return 1;
   }
            if(listitem == 1)
            {
            SetPlayerSkin(playerid, 105);
            SendClientMessage(playerid,VERMELHO,"vocк mudou seu skin para o id 105");
            return 1;
   }
            if(listitem == 2)
            {
            SetPlayerSkin(playerid, 106);
            SendClientMessage(playerid,VERMELHO,"vocк mudou seu skin para o id 106");
            return 1;
   }
            {
            SetPlayerSkin(playerid, 107);
            SendClientMessage(playerid,VERMELHO,"vocк mudou seu skin para o id 107");
            return 1;
   }
        }
        return 1;
    }
Reply
#2

Olб wallacematheus,

como vocк nгo especificou o seu modo de salvamento de dados vou lhe deixar o exemplo em dini.

pawn Код:
dini_IntSet(arquivo, "Skin", GetPlayerSkin(playerid));
Como viu, basta usar a funзгo GetPlayerSkin, caso vocк nгo salve deste modo jб dб para ter uma noзгo, caso ainda tenha problemas em relaзгo а isto diga aqui.


Atenciosamente,
Falcon.
Reply
#3

me diz como coloco pra salvar o q postei acima
Reply
#4

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp("/ducks",cmdtext,true,11) == 0)
{
    ShowPlayerDialog(playerid,MaGnO_357,DIALOG_STYLE_LIST,"Mudar Skin Em Dialog by MaGnO_357","Roupas\nEquipar","Selecionar", "Cancelar");
    return 1;
}
    return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == MaGnO_357)
    {
        if(response)
        {
            if(listitem == 0)
            {
            ShowPlayerDialog(playerid, Groove, DIALOG_STYLE_LIST, "Roupas", "Roupa1\nRoupa2\nRoupa3\nRoupa4", "Selecionar", "Cancelar" );
            }
        }
        return 1;
    }
//==============================================================================
    if(dialogid == Groove)
    {
        if(response)
        {
            if(listitem == 0)
            {
            SetPlayerSkin(playerid, 0);
            SetPVarInt(playerid,"Skin",0);
            SendClientMessage(playerid,VERMELHO,"vocк mudou seu skin para o id 0");
            return 1;
   }
            if(listitem == 1)
            {
            SetPlayerSkin(playerid, 105);
            SetPVarInt(playerid,"Skin",105);
            SendClientMessage(playerid,VERMELHO,"vocк mudou seu skin para o id 105");
            return 1;
   }
            if(listitem == 2)
            {
            SetPlayerSkin(playerid, 106);
            SetPVarInt(playerid,"Skin",106);
            SendClientMessage(playerid,VERMELHO,"vocк mudou seu skin para o id 106");
            return 1;
   }
            {
            SetPlayerSkin(playerid, 107);
            SetPVarInt(playerid,"Skin",107);
            SendClientMessage(playerid,VERMELHO,"vocк mudou seu skin para o id 107");
            return 1;
   }
        }
        return 1;
    }
Ai na parte de salvamento coloque
pawn Код:
dini_IntSet(arquivo, "Skin", GetPVarInt(playerid,"Skin"));
E na parte de carregamento coloque
pawn Код:
SetPlayerSkin(playerid,dini_IntSet(arquivo, "Skin", GetPVarInt(playerid,"Skin")));
Reply
#5

Deu esses dois erros aki:

pawn Код:
C:\Documents and Settings\Wallace\Desktop\GM BVS\gamemodes\BZC.pwn(53065) : error 017: undefined symbol "playerid"
C:\Documents and Settings\Wallace\Desktop\GM BVS\gamemodes\BZC.pwn(53099) : error 017: undefined symbol "playerid"
foi naa linha do salvamento e carregamento
Reply
#6

LOOL? WTF?

pawn Код:
#include <a_samp>
Reply
#7

Quote:
Originally Posted by wallacematheus
Посмотреть сообщение
Deu esses dois erros aki:

pawn Код:
C:\Documents and Settings\Wallace\Desktop\GM BVS\gamemodes\BZC.pwn(53065) : error 017: undefined symbol "playerid"
C:\Documents and Settings\Wallace\Desktop\GM BVS\gamemodes\BZC.pwn(53099) : error 017: undefined symbol "playerid"
foi naa linha do salvamento e carregamento
poste a funзгo de salvamente e carregamento '-'
Reply
#8

Coloquei em um Fs como boto pra salvar...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)