[Ajuda]Salvar skin - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda]Salvar skin (
/showthread.php?tid=321235)
[Ajuda]Salvar skin -
whiXґ - 26.02.2012
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.
Re: [Ajuda]Salvar skin -
andmeida10 - 26.02.2012
https://sampforum.blast.hk/showthread.php?tid=320022
espero ter ajudado
Re: [Ajuda]Salvar skin -
whiXґ - 26.02.2012
Consegui ^^ agora existe alguma funзгo dini que exclua o arquivo criado da skin quando o player disconnecta
Re: [Ajuda]Salvar skin -
whiXґ - 26.02.2012
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
Re: [Ajuda]Salvar skin -
andmeida10 - 26.02.2012
posta o comando inteiro e as ultimas 20 linhas do ficheiro: server_log
Re: [Ajuda]Salvar skin -
whiXґ - 26.02.2012
Код:
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] |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|