19.10.2012, 13:27
Ola, percebi que no GM euro RPG o cara n loga com a skin que saiu, volta com a skin do cj, ou seja, nao esta salvando ou carregando a skin, poderiam me ajudar ?
ONPLAYERSPAWN...
PHP код:
stock SalvarDados(playerid)
{
new ip[25];
GetPlayerIp(playerid, ip, sizeof(ip));
format(StringContas, sizeof(StringContas), "EuroRPG/Contas/%s.txt", Nome(playerid));
DOF2_SetInt(StringContas, "Matou", PlayerDados[playerid][Matou]);
DOF2_SetInt(StringContas, "Morreu", PlayerDados[playerid][Morreu]);
DOF2_SetInt(StringContas, "Grana", GetPlayerMoney(playerid));
DOF2_SetInt(StringContas, "pSkin", GetPlayerSkin(playerid));
DOF2_SetInt(StringContas, "Procurado", GetPlayerWantedLevel(playerid));
DOF2_SetInt(StringContas, "pLevel", GetPlayerScore(playerid));
DOF2_SetInt(StringContas, "Respeito", PlayerDados[playerid][Respeito]);
DOF2_SetInt(StringContas, "Advertencias", PlayerDados[playerid][Advertencias]);
DOF2_SetInt(StringContas, "Preso", PlayerDados[playerid][Preso]);
DOF2_SetInt(StringContas, "Motorista", PlayerDados[playerid][Motorista]);
DOF2_SetInt(StringContas, "Sexo", PlayerDados[playerid][Sexo]);
DOF2_SetInt(StringContas, "Organizacao", PlayerDados[playerid][Organizacao]);
DOF2_SetInt(StringContas, "Cargo", PlayerDados[playerid][Cargo]);
DOF2_SetInt(StringContas, "Colocar", PlayerDados[playerid][Colocar]);
DOF2_SetInt(StringContas, "Emprego", PlayerDados[playerid][Emprego]);
DOF2_SetBool(StringContas,"Tutorial", PlayerDados[playerid][Tutorial]);
DOF2_SetString(StringContas, "IP", ip);
new str[50];
format(str, 50, "EuroRPG/Admins/%s.sav", Nome(playerid));
if(PlayerDados[playerid][Vip] == false)
{
if(DOF2_IsSet("EuroRPG/Vips.vip", Nome(playerid)))
{
DOF2_Unset("EuroRPG/Vips.vip", Nome(playerid));
}
}
if(PlayerDados[playerid][Vip] == true)
{
DOF2_SetBool(str, "Vip", true);
}
if(PlayerDados[playerid][Admin] > 0)
{
format(StringContas, sizeof StringContas, "EuroRPG/Admins/%s.sav", Nome(playerid));
DOF2_SetInt(str, "Admin", PlayerDados[playerid][Admin]);
}
DOF2_SaveFile();
return 1;
}
PHP код:
public OnPlayerSpawn(playerid)
{
TextDrawHideForPlayer(playerid,Textdraw0[playerid]);
TextDrawHideForPlayer(playerid,Textdraw2[playerid]);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
//---------------[ Skin dos Empregos ]------------//
if(PlayerDados[playerid][Emprego] == 0 || PlayerDados[playerid][Emprego] == 1 || PlayerDados[playerid][Emprego] == 2)
{
SetPlayerSkin(playerid,PlayerDados[playerid][pSkin]);
}
//------------[ Cor de Admin ]---------//
if(PlayerDados[playerid][Trabalhando] == true)
{
SetPlayerColor(playerid, 0x24E9FFFF);
}
if(PlayerDados[playerid][Afk] == true)
{
SetPlayerColor(playerid, PRETO);
}
if(PlayerDados[playerid][Afk] == false)
{
SetPlayerColor(playerid, BRANCO);
}
//--------------[ Cor das Orgs ]------------//
if(PlayerDados[playerid][Organizacao] == 0)
{
SetPlayerColor(playerid, BRANCO);
}
if(PlayerDados[playerid][Organizacao] == 1)
{
SetPlayerColor(playerid, COR_BALLAS);
}
if(PlayerDados[playerid][Organizacao] == 2)
{
SetPlayerColor(playerid, COR_PM);
}
//----------[ Spawn de Org ]---------//
if(PlayerDados[playerid][Organizacao] == 0)
{
SetPlayerHealth(playerid, 100);
SetPlayerPos(playerid, 1722.5750,-1631.1670,20.2145);
SetPlayerInterior(playerid,0);
}
else if(PlayerDados[playerid][Organizacao] == 1)
{
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 50);
SetPlayerPos(playerid, 2004.9247,-1127.5710,25.3749);
SetPlayerInterior(playerid,0);
}
else if(PlayerDados[playerid][Organizacao] == 2)
{
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 50);
SetPlayerPos(playerid, 1474.5262,-1756.2471,3285.2859);
SetPlayerInterior(playerid, 5);
}
//-----------------------------------------------//
if(DOF2_IsSet("EuroRPG/Admins.adm", Nome(playerid)))
{
PlayerDados[playerid][Admin] = DOF2_GetInt("EuroRPG/Admins.adm", Nome(playerid));
}
if(DOF2_IsSet("EuroRPG/Vips.vip", Nome(playerid)))
{
SetarDado(playerid, Vip, DOF2_GetBool("EuroRPG/vips.vip", Nome(playerid)));
}
format(StringContas, sizeof(StringContas), "EuroRPG/Contas/%s.txt", Nome(playerid));
#if SPAWNAR_HQ == 1
#endif
SetTimerEx("VerificarPreso", 1000, false, "i", playerid);
ResetPlayerWeapons(playerid);
#if USAR_SISTEMA_REGISTRO == 0
if(!DOF2_FileExists(StringContas))
{
DOF2_CreateFile(StringContas);
DOF2_SetInt(StringContas, "pLevel", 0);
DOF2_SetInt(StringContas, "Respeito", 0);
DOF2_SetInt(StringContas, "Matou", 0);
DOF2_SetInt(StringContas, "Morreu", 0);
DOF2_SetInt(StringContas, "Grana", 0);
DOF2_SetInt(StringContas, "pSkin", 0);
DOF2_SetInt(StringContas, "Advertencias", 0);
DOF2_SetInt(StringContas, "Preso", 0);
DOF2_SetInt(StringContas, "Motorista", 0);
DOF2_SetInt(StringContas, "Sexo", 0);
DOF2_SetInt(StringContas, "Organizacao", 0);
DOF2_SetInt(StringContas, "Cargo", 0);
DOF2_SetInt(StringContas, "Emprego", 0);
DOF2_SetInt(StringContas, "Procurado", 0);
PlayerDados[playerid][Logado] = true;
}
if(DOF2_FileExists(StringContas))
{
PlayerDados[playerid][Matou] = DOF2_GetInt(StringContas, "Matou");
PlayerDados[playerid][Morreu] = DOF2_GetInt(StringContas, "Morreu");
PlayerDados[playerid][Sexo] = DOF2_GetInt(StringContas, " Sexo");
PlayerDados[playerid][Organizacao] = DOF2_GetInt(StringContas, "Organizacao");
PlayerDados[playerid][Cargo] = DOF2_GetInt(StringContas, "Cargo");
PlayerDados[playerid][Emprego] = DOF2_GetInt(StringContas, "Emprego");
if(DOF2_IsSet("EuroRPG/Admins.adm", Nome(playerid)))
{
PlayerDados[playerid][Admin] = DOF2_GetInt("EuroRPG/Admins.adm", Nome(playerid));
}
PlayerDados[playerid][Advertencias] = DOF2_GetInt(StringContas, "Advertencias");
PlayerDados[playerid][Respeito] = DOF2_GetInt(StringContas, "Respeito");
GivePlayerMoney(playerid, DOF2_GetInt(StringContas, "Grana"));
GetPlayerSkin(playerid, DOF2_GetInt(StringContas, "pSkin"));
SetPlayerWantedLevel(playerid, DOF2_GetInt(StringContas, "Procurado"));
SetPlayerScore(playerid, DOF2_GetInt(StringContas, "pLevel"));
PlayerDados[playerid][Preso] = DOF2_GetInt(StringContas, "Preso");
PlayerDados[playerid][Motorista] = DOF2_GetInt(StringContas, "Motorista");
if(DOF2_IsSet("EuroRPG/Vips.vip", Nome(playerid)))
{
PlayerDados[playerid][Vip] = DOF2_GetBool("EuroRPG/Vips.vip", Nome(playerid));
}
if((PlayerDados[playerid][Admin] > 0) && (PlayerDados[playerid][Logado] == false))
{
PlayerDados[playerid][Logado] = true;
format(String, sizeof(String), "Logado de Admin Nнvel %d", PlayerDados[playerid][Admin]);
SendClientMessage(playerid, AZUL_CLARO, String);
format(String, sizeof(String), "~w~Admin ~g~%s ~y~Online", Nome(playerid));
GameTextForAll(String, 1000, 1);
PlayerDados[playerid][Trabalhando] = true;
SendClientMessage(playerid, AZUL_CLARO, "Vocк estб trabalhando, para jogar use /jogar");
SetPlayerColor(playerid, COR_ROSA);
SetPlayerHealth(playerid, 999999);
}
}
#endif
return 0;
}