SA-MP Forums Archive
[Ajuda] Com meu Registro - 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] Com meu Registro (/showthread.php?tid=357869)



Com meu Registro - .:LucasxD:. - 08.07.2012

Bem galera como o tуpico jб diz tudo eu estou tentando e tentando mais nгo consigo resolver este problema de que: o Player entra no server,O Sampserver.exe fecha, quando volta o server o player nasce no meio do mapa no san andreas. poxa algem pode me ajudar?

A Define da Login e da Registro:

pawn Код:
#define REGISTRO    9
#define LOGIN       10
Os Arquivos da Script Files:

pawn Код:
//REGISTRO
#define PASTA_CONTAS        "/Contas/%s.ini"         //Diretуrio onde as contas sгo salvas
#define PASTA_CASAS         "/Casas/%s.ini"         //Diretуrio onde as contas sгo salvas
#define PASTA_PROP          "/Props/%s.ini"         //Diretуrio onde as contas sгo salvas
#define PASTA_CONCE         "/Conce/%s.ini"         //Diretуrio onde as contas sгo salvas
#define PASTA_CLANS         "/Clans/%s.ini"         //Diretуrio onde as contas sгo salvas
#define PASTA_Int           "/Interiores/%s.ini"         //Diretуrio onde as contas sгo salvas
#define MAX_SENHA           16                      //Tamanho mбximo da senha
#define MIN_SENHA           4                       //Tamanho mнnimo da senha
Se For Problema de Stock ta Aqui:

pawn Код:
new File:temp;
new index = 0;
new tmp[256];
new modelid, Float:X, Float:Y, Float:Z, Float:ang, Cor1, Cor2;
temp = fopen("carros.txt", io_readwrite);
while(fread(temp, tmp, sizeof(tmp), false)) {
index = 0;
modelid    = strval(strtok(tmp, index));
X          = Float:floatstr(strtok(tmp, index));
Y          = Float:floatstr(strtok(tmp, index));
Z          = Float:floatstr(strtok(tmp, index));
ang        = Float:floatstr(strtok(tmp, index));
Cor1       = strval(strtok(tmp, index));
Cor2       = strval(strtok(tmp, index));

cAddStaticVehicleEx(modelid, X, Y, Z, ang, Cor1, Cor2, 9999999999);
}
OnPlayerRequestSpawn,public OnPlayerRequestClass(playerid, classid),public OnPlayerConnect(playerid):

pawn Код:
public OnPlayerRequestSpawn(playerid) {
SendClientMessage(playerid, Vermelho,"Vocк nгo se registrou/logou.");
return 0;
}
public OnPlayerRequestClass(playerid, classid)
{
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
SetPlayerSkin(playerid,dini_Int(file, "Skin"));
SetPlayerCameraPos(playerid, 1473.01, -1621.39, 15.60);
SetPlayerCameraLookAt(playerid, 1471.11, -1625.93, 14.72);
SetPlayerPos(playerid, 1472.7699,-1626.6316,14.0469);
SetPlayerFacingAngle(playerid, 27.3939);
return 1;
}


public OnPlayerConnect(playerid)
{
for(new i=0;i<MAX_PLAYERS;i++){
ofereceu[playerid][i] = 0;
}
if(IsPlayerNPC(playerid)){ SpawnPlayer(playerid); }
else{ AtirandoTimer[playerid] = SetTimerEx("Atirando",250,1,"i",playerid);}
if(IsPlayerNPC(playerid)){ SpawnPlayer(playerid); }
SetPlayerColor(playerid,0xFFFFFFAA);
kick[playerid] = 0;
aradar[playerid] = 0;
blindagem[playerid]=0;
TPedagio[playerid] = 0;
TPedagioL[playerid] = 0;
abordado2[playerid]=0;
tanafavela[playerid] = 0;
format(ucomando[playerid], 45,"Nenhum Comando");
new string32[256];
new Pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, Pname, sizeof(Pname));
format(string32, sizeof(string32), "» %s entrou no server. ", Pname);
SendClientMessageToAll(0xFFFFFFAA,string32);
format(string32, sizeof(string32), ">> %s(%d) entrou no server!",Pname,playerid);
MsgLog(string32);

//~•~•~•~•~•~•~•~•~•~•~•~•~•~•~•~•~•~•~•~•~•~•~•~•~•~•~•~•~•~•~•~•~•~•~•~•------------------
TextDrawShowForPlayer(playerid, mote);
TextDrawShowForPlayer(playerid, NEW);




statu[playerid] = TextDrawCreate(230, 350,"~r~Vida:~w~100 ~b~Colete:~w~0");
//TextDrawLetterSize(statu[playerid], 0, 0);
TextDrawTextSize(statu[playerid], 450, 500);
//TextDrawAlignment(statu[playerid], 0);
TextDrawColor(statu[playerid], -1);
TextDrawUseBox(statu[playerid], 1);
TextDrawSetShadow(statu[playerid], 2);
TextDrawBoxColor(statu[playerid], 170);
TextDrawSetOutline(statu[playerid], 0);
TextDrawBackgroundColor(statu[playerid], 170);
TextDrawFont(statu[playerid], 1);
TextDrawSetProportional(statu[playerid], 1);
TextDrawHideForPlayer(playerid, statu[playerid]);

Textdraw2[playerid] = TextDrawCreate(500, 10,"~w~Procurado(0)");
//TextDrawTextSize(Textdraw2[playerid], 220, 2);
TextDrawAlignment(Textdraw2[playerid], 0);
TextDrawColor(Textdraw2[playerid], -1);
TextDrawUseBox(Textdraw2[playerid], 1);
TextDrawSetShadow(Textdraw2[playerid], 0);
TextDrawBoxColor(Textdraw2[playerid], 170);
TextDrawSetOutline(Textdraw2[playerid], 0);
TextDrawBackgroundColor(Textdraw2[playerid], -1);
TextDrawFont(Textdraw2[playerid], 1);
TextDrawSetProportional(Textdraw2[playerid], 1);

velo[playerid] = TextDrawCreate(230, 350,"~r~Velocidade:0Km/h");
//TextDrawLetterSize(velo[playerid], 0, 0);
TextDrawTextSize(velo[playerid], 450, 500);
//TextDrawAlignment(velo[playerid], 0);
TextDrawColor(velo[playerid], -1);
TextDrawUseBox(velo[playerid], 1);
TextDrawSetShadow(velo[playerid], 2);
TextDrawBoxColor(velo[playerid], 70);
TextDrawSetOutline(velo[playerid], 0);
TextDrawBackgroundColor(velo[playerid], 170);
TextDrawFont(velo[playerid], 1);
TextDrawSetProportional(velo[playerid], 1);
TextDrawHideForPlayer(playerid, velo[playerid]);


PlayerPlaySound(playerid, 1134, 0, 0, 0);
SetTimerEx("World", 2000, 0, "d", playerid);
SetPlayerCameraPos(playerid, 2544.6035,-289.9136,21.3428);
SetPlayerCameraLookAt(playerid, 2550.6909,-281.9835,19.4998);

SetPlayerFacingAngle(playerid, 27.3939);

new antibot[128];
GetPlayerName(playerid, antibot, sizeof(antibot));
if(strcmp(antibot, "aux", true) == 0) {Ban(playerid);}
if(dini_Int("proibidos.ini", antibot) == 1)
{
new string[128];
format(string, sizeof(string), "*Admin-BoT* Vocк foi kickado por estar usando um nick proibido! (%s)", antibot);
SendClientMessage(playerid, 0xFF0000AA, string);
SendDeathMessage(INVALID_PLAYER_ID, playerid, 0);
kick[playerid] = 1;
SetPlayerColor(playerid,0xFFFFFFAA);
Kick(playerid);
return 1;
}
blockpm[playerid] = 0;
morar[playerid] = 0;
moradia[playerid] = 0;
convitede[playerid] = 0;
PlayerInfo[playerid][LoginsFalsos] = 0;
pAdmin[playerid] = 0;
emcasa[playerid] = 0;
ResetPlayerGrana(playerid);
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if(dini_Int(file, "Casa") == 1){
Create3DTextLabel(aname,Amarelo,dini_Int(file, "CasaX"),dini_Int(file, "CasaY"),dini_Int(file, "CasaZ"),80.0,0);
}
dini_IntSet(file, "DM", 0);
//settimers
SetTimerEx("semporte", 1000, 1,"e",playerid);
//variavels
CPSERVICE_actualcp[playerid] = 0;
AFK[playerid]=0;
multar[playerid]= 0;
autoescola[playerid] = 0;
autoaerea[playerid] = 0;
autonautica[playerid] = 0;
Trocarn[playerid] = 0;
Trocara[playerid] = 0;
nogame[playerid] = 0;
noevento[playerid] = 0;
PlayerInfo[playerid][Logged] = 0;
vip[playerid] = 0;
GPS_Spawned[playerid] = 0;
DMLiberado[playerid] = 0;
Mute[playerid] = 0;
convitepc[playerid] = 0;
convitetb[playerid] = 0;
convitecor[playerid] = 0;
algemado[playerid] = 0;
algemou[playerid] = 0;
desalgemou[playerid] = 0;
procurou[playerid] = 0;
desprocurou[playerid] = 0;
prendeu[playerid] = 0;
soltou[playerid] = 0;
multou[playerid]=0;
pProcurado[playerid] = 0;
//news

new sstring[256];



//============================================================================================================
dini_IntSet(file,"aAdmin",0);
if(dini_Int("nickban.ini",PlayerName(playerid)) == 1){
SendClientMessage(playerid, 0x11B1FFAA, "*Admin-BoT* Vocк estб banido!");
format(sstring, sizeof(sstring), "*Admin-BoT* O jogador %s (%d) foi banido, motivo:( Conta Banida/Nick Banido ).", aname,playerid);
SendClientMessageToAll(0xC10000AA, sstring);
SendDeathMessage(INVALID_PLAYER_ID, playerid, 0);
kick[playerid] = 1;
SetPlayerColor(playerid,0xFFFFFFAA);
Kick(playerid);
return 1;
}

new nomepl[MAX_PLAYER_NAME];
GetPlayerName(playerid, nomepl, MAX_PLAYER_NAME);
if(dini_Int(filena(playerid),"Banido") == 1){
new string[256];
new Ip[30];
GetPlayerIp(playerid, Ip, sizeof(Ip));
SendClientMessage(playerid,verdel,"~> Log Ban <~");
format(string, sizeof(string),"Nick:%s", nomepl);
SendClientMessage(playerid,Branco,string);
format(string, sizeof(string),"Banido Por:%s", dini_Get(filene(nomepl),"BanPor"));
SendClientMessage(playerid,Branco,string);
format(string, sizeof(string),"Motivo:%s", dini_Get(filene(nomepl),"BanMotivo"));
SendClientMessage(playerid,Branco,string);
format(string, sizeof(string),"Data:%s", dini_Get(filene(nomepl),"Login"));
SendClientMessage(playerid,Branco,string);
if(dini_Int(filene(nomepl),"TBan") == 1){
format(string, sizeof(string),"Banido Atй:%d/%d/%d as %d:%d", dini_Int(filene(nomepl),"BanAteD"), dini_Int(filene(nomepl),"BanAteME"), dini_Int(filene(nomepl),"BanAteY"), dini_Int(filene(nomepl),"BanAteH"), dini_Int(filene(nomepl),"BanAteMI"));
SendClientMessage(playerid,Branco,string);
new year, month,day;
getdate(year, month, day);
new h, m, s;
gettime(h, m, s);
if(year > dini_Int(filene(nomepl),"BanAteY")){
SendClientMessage(playerid,Branco,"Seu tempo de banimento acabou, pode voltar a jogar!");
dini_IntSet(filene(nomepl), "Banido", 0);
dini_IntSet(filene(nomepl),"TBan", 0);
return 1;
}
if(year == dini_Int(filene(nomepl),"BanAteY")){
if(month > dini_Int(filene(nomepl),"BanAteME")){
SendClientMessage(playerid,Branco,"Seu tempo de banimento acabou, pode voltar a jogar!");
dini_IntSet(filene(nomepl), "Banido", 0);
dini_IntSet(filene(nomepl),"TBan", 0);
return 1;
}
if(month == dini_Int(filene(nomepl),"BanAteME")){
if(day > dini_Int(filene(nomepl),"BanAteD")){
SendClientMessage(playerid,Branco,"Seu tempo de banimento acabou, pode voltar a jogar!");
dini_IntSet(filene(nomepl), "Banido", 0);
dini_IntSet(filene(nomepl),"TBan", 0);
return 1;
}
if(day == dini_Int(filene(nomepl),"BanAteD")){
if(h > dini_Int(filene(nomepl),"BanAteH")){
SendClientMessage(playerid,Branco,"Seu tempo de banimento acabou, pode voltar a jogar!");
dini_IntSet(filene(nomepl), "Banido", 0);
dini_IntSet(filene(nomepl),"TBan", 0);
return 1;
}
if(h == dini_Int(filene(nomepl),"BanAteH")){
if(m >= dini_Int(filene(nomepl),"BanAteMI")){
SendClientMessage(playerid,Branco,"Seu tempo de banimento acabou, pode voltar a jogar!");
dini_IntSet(filene(nomepl), "Banido", 0);
dini_IntSet(filene(nomepl),"TBan", 0);
return 1;
}
}
}
}
}
}
E as Boas Vindas:

pawn Код:
public tuto2(playerid){
TextDrawHideForPlayer(playerid, tutorial);
SetTimerEx("tuto3", 7000, 0, "d", playerid);
}
forward World(playerid);
public World(playerid){
TextDrawShowForPlayer(playerid, WORLD);
SetTimerEx("RPGG", 2000, 0, "d", playerid);
PlayerPlaySound(playerid, 1134, 0, 0, 0);
}
forward RPGG(playerid);
public RPGG(playerid){
TextDrawShowForPlayer(playerid, RPG);
SetTimerEx("v10", 2000, 0, "d", playerid);
PlayerPlaySound(playerid, 1134, 0, 0, 0);
}
forward v10(playerid);
public v10(playerid){
TextDrawShowForPlayer(playerid, V100);
PlayerPlaySound(playerid, 1133, 0, 0, 0);
SetTimerEx("Login", 2000, 0, "d", playerid);
}
forward Login(playerid);
public Login(playerid){
PlayerPlaySound(playerid, 1076, 0.0, 0.0, 0.0);
TextDrawHideForPlayer(playerid, mote);
TextDrawHideForPlayer(playerid, NEW);
TextDrawHideForPlayer(playerid, WORLD);
TextDrawHideForPlayer(playerid, RPG);
TextDrawHideForPlayer(playerid, V100);
new Pname[MAX_PLAYER_NAME];
new string[256];

SendClientMessage(playerid, 0xFF0000AA,"~•~•~•~•~•~•~•~•~•~•~•~•~•~•~•~•~•~•~•~•~•~•~•~•~•~•");
format(string, sizeof(string), "• Seja bem-vindo(a) %s ao servidor ", Pname);
SendClientMessage(playerid,COLOR_WHITE, string);
SendClientMessage(playerid, 0xD50000AA,"• Para ver os crйditos: /creditos");
SendClientMessage(playerid, Branco,"• Para obter ajuda e informaзгo: /ajuda ");
SendClientMessage(playerid, 0xD50000AA,"• Para ler o tutorial: /tutorial ");
SendClientMessage(playerid, Branco,"• Para ver a lista de comandos: /comandos ");
SendClientMessage(playerid, 0xFF0000AA,"~•~•~•~•~•~•~•~•~•~•~•~•~•~•~•~•~•~•~•~•~•~•~•~•~•~•");
GameTextForPlayer(playerid,"~b~B~y~r~w~a~b~s~y~i~g~l ~b~R~w~e~g~a~p~l ~w~G~y~a~p~m~w~e ~g~R~w~p~b~g", 5000, 6);

new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
SetPlayerSkin(playerid,dini_Int(file, "Skin"));
format(file, sizeof(file), PASTA_CONTAS, aname);
if(PlayerInfo[playerid][Logged] == 0){
if(!dini_Exists(file))
{
format(STRX, sizeof(STRX), "\nDigite uma senha e clique em \"Registrar\".");
ShowPlayerDialog(playerid, REGISTRO, DIALOG_STYLE_INPUT, "REGISTRO", STRX, "Registrar", "Sair");
SendClientMessage(playerid, 0x43CD80AA, "* Vocк ainda nгo й registrado, registre-se para continuar!");
}
if(dini_Exists(file))
{
format(STRX, sizeof(STRX), "Bem-vindo(a) novamente, %s! Logue-se em sua conta.\n\nDigite sua senha e clique em \"Logar\".", aname);
ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "CONTA", STRX, "Logar", "Sair");
SendClientMessage(playerid, 0x43CD80AA, "* Vocк jб й registrado em nosso server, logue em sua conta para continuar!");
}
}
}


public tuto3(playerid){
TextDrawHideForPlayer(playerid, tutorial5);
TextDrawHideForPlayer(playerid, topblack);
TextDrawHideForPlayer(playerid, bottomblack);
dini_IntSet(file, "novato", 2);
}
Se estiver faltando algo postem que irei por!


Re: Com meu Registro - .FuneraL. - 08.07.2012

Verificou se todas as pastas citadas no sistema de registro estгo criadas na pasta Scriptfiles?


Respuesta: Com meu Registro - .:LucasxD:. - 08.07.2012

Cara Ate Agora nao achei nada que esteja faltando! Verifique voce mesmo




Respuesta: Com meu Registro - .:LucasxD:. - 08.07.2012

Mais Algem?


Re: Com meu Registro - ShutDown_ - 08.07.2012

Seu gm e o Brasil Expert RPG e de padrгo existem as pastas

Carros
Casas
Clans
Contas
Interiores
properties
Props
Servidor
vehicles

Nгo vejo nada de errado reveja alguma Filescript ou modificaзгo de alguma coisa que falta uma pasta ou tente deixar apenas as pastas padrхes


Respuesta: Com meu Registro - .:LucasxD:. - 09.07.2012

E isso que eu queria dizer por que meu sistema de registro.e ainda tem muinto problema


Respuesta: Com meu Registro - .:LucasxD:. - 09.07.2012

Poxa Veio ningem?