[Ajuda]Salvar skin
#1

Olб galera estou tentando criar um sistema de skin mais naum estou conseguindo vou dar um ex abaixo:

pawn Код:
if(strcmp(cmd, "/skin", true) == 0)
{
      SetPlayerSkin(playerid, 0);
      SetPVarInt(playerid,"Skin",0);
      return 1;
}
Код:
Ai na parte de salvamento coloque
pawn Code:

dini_IntSet(arquivo, "Skin", GetPVarInt(playerid,"Skin"));


E na parte de carregamento coloque
pawn Code:

SetPlayerSkin(playerid,dini_IntSet(arquivo, "Skin", GetPVarInt(playerid,"Skin")));
No caso ali no salvamento eu coloco no comando /skin para salvar e no onplayerspawn para carregar e se caso o player disconnectar o arquivo criado й deletado.
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=320022



espero ter ajudado
Reply
#3

Consegui ^^ agora existe alguma funзгo dini que exclua o arquivo criado da skin quando o player disconnecta
Reply
#4

Estб crashando quando eu do spawn o.o

pawn Код:
enum pInfo
{
    pSkin
};
new PlayerInfo[MAX_PLAYERS][pInfo];


public OnPlayerSpawn(playerid)
{
    SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
    return 1;
}

if(strcmp(cmd, "/skin", true) == 0)
{
    new file[256];
    dini_Create(file);//Cria Ficheiro
    dini_IntSet(file, "pSkin", skinid); //Seleciona e salva com a skinid
    SetPlayerSkin(playerid,skinid);
    return 1;
}
OBS: NAUM POSTEI O COMANDO INTEIRO i.i
Reply
#5

posta o comando inteiro e as ultimas 20 linhas do ficheiro: server_log
Reply
#6

Код:
SA-MP Dedicated Server
----------------------
v0.3d-R2-800p, ©2005-2011 SA-MP Team

[10:45:30] 
[10:45:30] Server Plugins
[10:45:30] --------------
[10:45:30]  Loading plugin: streamer
[10:45:30] 

*** Streamer Plugin v2.5.2 R2 by Incognito loaded ***

[10:45:30]   Loaded.
[10:45:30]  Loaded 1 plugins.

[10:45:30] 
[10:45:30] Filterscripts
[10:45:30] ---------------
[10:45:30]   Loading filterscript '********'...
[10:45:30]   Loading filterscript '********'...
[10:45:30]   Loaded 2 filterscripts.

[10:45:30] |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
[10:45:30] |      Game Mode Criado Por Roli Souza      |
[10:45:30] |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
[10:45:30] Number of vehicle models: 50
[10:45:58] Incoming connection: 127.0.0.1:59353
[10:45:58] [join] wHiX has joined the server (0:127.0.0.1)
[10:59:43] [part] wHiX has left the server (0:1)
[10:59:44] --- Server Shutting Down.
[10:45:30] |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
[10:45:30] |      Game Mode Criado Por Roli Souza      |
[10:45:30] |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)