08.06.2017, 19:57
Como salvo a skin em DOF2? Alguйm poderia me ajuda, eu tentei aqui mais quando dava spawn aparecia o CJ
new Skin[MAX_PLAYERS];
SetPlayerSkin(playerid, Skin[playerid]);
DOF2_SetInt(string,"Skin",Skin[playerid]);
Skin[playerid] = DOF2_GetInt(string,"Skin"); SetPlayerSkin(playerid,Skin[playerid]);
#define Users "Users/%s.sav" // Definir onde vocк quer salvar! DOF2_SetInt(getAccount(playerid), "Skin", GetPlayerSkin(playerid)); // OnPlayerDisconnect SetPlayerSkin(playerid, DOF2_GetInt(getAccount(playerid), "Skin"));// OnPlayerConnect ou onde vocк queira carregar! /* Abrir diretуrio do arquivo */ stock getAccount(playerid) { new File[156], Name[MAX_PLAYER_NAME]; GetPlayerName(playerid, Name, MAX_PLAYER_NAME); format(File, sizeof(File), Users, Name); return File; }
new Skin[MAX_PLAYERS];
//OnPlayerDisconect
Skin[playerid] = GetPlayerSkin(playerid);
DOF2_SetInt(Arquivo, "Skin", Skin[playerid]);
DOF2_SaveFile();
//OnPlayerConnect
Skin[playerid] = DOF2_GetInt(Arquivo, "Skin");
//OnPlayerSpawn
SetPlayerSkin(playerid, Skin[playerid]);