public OnPlayerConnect(playerid)
{
PlayerInfo[playerid][pTentativa] = 0;
PlayerInfo[playerid][Logado] = false;
new file[20];
format(file, sizeof(file),LocalSalve, NomePlayer(playerid));
if(DOF2_FileExists(file))
{
ShowPlayerDialog(playerid, DIALOG_LOGAR, DIALOG_STYLE_PASSWORD, "Logar", "Voce tem conta . Coloque a senha abaixo:", "Confirma", "Cancelar");
}
else
{
ShowPlayerDialog(playerid, DIALOG_REGISTRO, DIALOG_STYLE_PASSWORD, "Registro", "Voce nao tem conta . Coloque sua senha abaixo:", "Confirma", "Cancelar");
}
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new file[20];
if(dialogid == DIALOG_REGISTRO)
{
if(!response) return Kick(playerid);
format(file, sizeof(file), LocalSalve, NomePlayer(playerid));
if(!DOF2_FileExists(file))DOF2_CreateFile(file);
DOF2_SetString(file, "Senha", inputtext);
DOF2_SetInt(file, "Admin", 0);
DOF2_SetInt(file, "Score", 0);
DOF2_SetInt(file, "Grana", 0);
DOF2_SetInt(file, "Multa", 0);
DOF2_SetBool(file, "Regras", false);
DOF2_SaveFile();
ShowPlayerDialog(playerid, DIALOG_LOGAR, DIALOG_STYLE_PASSWORD, "Logar", "Vocк se cadastrou, agora й sу logar com sua senha registrada!", "Confirma", "Cancelar");
}
if(dialogid == DIALOG_LOGAR)
{
if(!response)return Kick(playerid);
format(file, sizeof(file), LocalSalve, NomePlayer(playerid));
if(!strcmp(inputtext, DOF2_GetString(file, "Senha"), true))
{
PlayerInfo[playerid][Logado] = true;
Carregar(playerid);
}
else
{
PlayerInfo[playerid][pTentativa]++;
ShowPlayerDialog(playerid, DIALOG_LOGAR, DIALOG_STYLE_PASSWORD, "Logar", "Voce errou a senha! Coloque a correta agora:", "Confirma", "Cancelar");
if(PlayerInfo[playerid][pTentativa] == 3)
{
Kick(playerid);
}
}
}
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new file[64];
if(dialogid == DIALOG_REGISTRO)
{
if(!response) return Kick(playerid);
GetPlayerName(playerid,file,sizeof(file));
format(file, sizeof(file), "Contas/%s.ini", file);
DOF2_CreateFile(file);
DOF2_SetString(file, "Senha", inputtext);
DOF2_SetInt(file, "Admin", 0);
DOF2_SetInt(file, "Score", 0);
DOF2_SetInt(file, "Grana", 0);
DOF2_SetInt(file, "Multa", 0);
DOF2_SetBool(file, "Regras", false);
DOF2_SaveFile();
ShowPlayerDialog(playerid, DIALOG_LOGAR, DIALOG_STYLE_PASSWORD, "Logar", "Vocк se cadastrou, agora й sу logar com sua senha registrada!", "Confirma", "Cancelar");
}
if(dialogid == DIALOG_LOGAR)
{
if(!response)return Kick(playerid);
new file[64];
GetPlayerName(playerid,file,sizeof(file));
format(file, sizeof(file), "Contas/%s.ini", file);
if(DOF2_FileExists(file))
if(!strcmp(inputtext, DOF2_GetString(file, "Senha"), true))
{
PlayerInfo[playerid][Logado] = true;
Carregar(playerid);
}
else
{
PlayerInfo[playerid][pTentativa]++;
ShowPlayerDialog(playerid, DIALOG_LOGAR, DIALOG_STYLE_PASSWORD, "Logar", "Voce errou a senha! Coloque a correta agora:", "Confirma", "Cancelar");
if(PlayerInfo[playerid][pTentativa] == 3)
{
Kick(playerid);
}
}
}
return 1;
}
C:\Documents and Settings\Administrador\Desktop\prontobt\gamemodes\testesdegm.pwn(29) : error 017: undefined symbol "MAX_PLAYERS"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
new PlayerInfo[MAX_PLAYERS][pInfo];
aproveitando alguem pode me ajudar ?
erro PHP код:
PHP код:
|
#include <a_samp>