11.06.2017, 22:23
tente isso:
como vocк nгo passou o cуdigo inteiro tera que editar onde ele salva o arquivo sla talvez em on player disconnect ou passe onde vocк pegou o cуdigo
PHP код:
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid,-1959.0863,585.5798,34.9280);
SetPlayerCameraPos(playerid, 1959.0863,585.5798,34.9280);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
new str[128]; new NAME[128];
GetPlayerName(playerid,NAME,128);
format(str, sizeof(str),"%s.ini", NAME);
if(DOF2_FileExists(str)) {
//Execute login
} else {
new string[150], ip[16];
GetPlayerIp(playerid, ip, sizeof(ip));
format(string, sizeof(string), "{FFD700}Seja Bem Vindo(a) ao Thug Rio\n\n{FFD700}Nome: {FFFFF}%s\n{FFD700}Conta:{FF0000} Nгo Registrada\n{FFD700}IP: {FFFFF}%s\n\n{FFFFFF}Digite uma senha abaixo para registrar!", PlayerName(playerid), ip);
ShowPlayerDialog(playerid, DIALOG_REGISTRO, DIALOG_STYLE_INPUT, "Thug Rio - Registro", string, "Registro", "Cancelar");
PlayerInfo[playerid][Dinheiro] == 5000;
/*
DOF2_CreateFile(OnPlayerAccount(playerid));
DOF2_SetInt(OnPlayerAccount(playerid), "Dinheiro", 5000);
DOF2_SetInt(OnPlayerAccount(playerid), "Level", 1);
DOF2_SetInt(OnPlayerAccount(playerid), "Level_procurado", 0);
DOF2_SetFloat(OnPlayerAccount(playerid), "Vida", 100);
DOF2_SetFloat(OnPlayerAccount(playerid), "Colete", 100);
DOF2_SetString(OnPlayerAccount(playerid), "Senha", inputtext);
DOF2_SetString(OnPlayerAccount(playerid), "Email", inputtext);
DOF2_SaveFile(); */
/*
Dinheiro
Vida
Colete
Level procurado
Senha
Email
*/
}
return 1;
}