public OnPlayerConnect(playerid)
{
new Nome[MAX_PLAYER_NAME];
GetPlayerName(playerid, Nome, sizeof(Nome));
new String[128];
format(String, sizeof(String), CONTAS, Nome);
calado[playerid] = false;
tv[playerid] = false;
if(!dini_Exists(String))
{
format(String, sizeof(String), "{7FFFD4}Nick: {1E90FF}%s {1E90FF}Nгo Registrado\n\n{FFFFFF} Digite Uma Senha Para Continuar", Nome);
ShowPlayerDialog(playerid, REGISTRO, DIALOG_STYLE_INPUT, "Registro", String, "Registrar", "Cancelar");
}
else
{
format(String, sizeof(String), "{7FFFD4}Nick: {1E90FF}%s {1E90FF}Registrado\n\n{FFFFFF} Digite Sua Senha Para Logar", Nome);
ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Registro", String, "Logar", "Cancelar");
}
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
SalvarPlayer(playerid);
if(IsPlayerInAnyVehicle(playerid))
{
VeiculoOcupado[GetPlayerVehicleID(playerid)] = false;
}
return 1;
}
#include <a_samp>
#include <core>
#include <float>
#include <sscanf2>
#include <Dini>
#include losgs
#pragma tabsize 0
#define CONTAS "Admin/Players/%s.ini"
#define log "Admin/Admin/Administraзгo.txt"
#define REGISTRO 1
#define LOGIN 2
// ---------- Outros --------- //
Status(playerid)
{
new Nome[MAX_PLAYER_NAME];
GetPlayerName(playerid, Nome, sizeof(Nome));
new String[70];
SendClientMessage(playerid, 0xFF0000AA, "=========================================");
format(String, sizeof(String),"Minhas Informaзхes : %s", Nome);
SendClientMessage(playerid, 0xFFFF00AA,String);
format(String, sizeof(String),"Dinheiro: %d", GetPlayerMoney(playerid));
SendClientMessage(playerid, 0x1E90FFAA,String);
format(String, sizeof(String),"Matou: %d", Matou[playerid]);
SendClientMessage(playerid, 0x1E90FFAA,String);
format(String, sizeof(String),"Morreu: %d", Morreu[playerid]);
SendClientMessage(playerid, 0x1E90FFAA,String);
format(String, sizeof(String),"Medalhas: %d", medalhas[playerid]);
SendClientMessage(playerid, 0x1E90FFAA,String);
format(String, sizeof(String),"Level %d de Admin", PlayerInfo[playerid][Admin]);
SendClientMessage(playerid, 0x1E90FFAA,String);
format(String, sizeof(String),"Level %d de Helper", PlayerInfo[playerid][cHelper]);
SendClientMessage(playerid, 0x1E90FFAA,String);
SendClientMessage(playerid, 0xFF0000AA, "=========================================");
return 1;
}
SalvarPlayer(playerid)
{
new Float:Vida;
new Float:Colete;
GetPlayerHealth(playerid, Vida);
GetPlayerArmour(playerid, Colete);
new Nome[MAX_PLAYER_NAME];
GetPlayerName(playerid, Nome, sizeof(Nome));
new String[50];
format(String, sizeof(String), CONTAS, Nome);
dini_IntSet(String,"Dinheiro", GetPlayerMoney(playerid));
dini_FloatSet(String,"Vida", Vida);
dini_FloatSet(String,"Colete", Colete);
dini_IntSet(String,"Matou", Matou[playerid]);
dini_IntSet(String,"Morreu", Morreu[playerid]);
dini_IntSet(String,"Admin", PlayerInfo[playerid][Admin]);
dini_IntSet(String,"Helper", PlayerInfo[playerid][cHelper]);
dini_IntSet(String,"Medalhas", medalhas[playerid]);
return 1;
}
SetarPlayer(playerid)
{
new Nome[MAX_PLAYER_NAME];
GetPlayerName(playerid, Nome, sizeof(Nome));
new String[50];
format(String, sizeof(String), CONTAS, Nome);
GivePlayerMoney(playerid, dini_Int(String,"Dinheiro"));
SetPlayerHealth(playerid, dini_Int(String,"Vida"));
SetPlayerArmour(playerid, dini_Int(String,"Colete"));
Matou[playerid] = dini_Int(String, "Matou");
Morreu[playerid] = dini_Int(String, "Morreu");
PlayerInfo[playerid][Admin] = dini_Int(String, "Admin");
PlayerInfo[playerid][cHelper] = dini_Int(String, "Helper");
medalhas[playerid] = dini_Int(String, "Medalhas");
return 1;
}
pawn Код:
|