Problem with OnPlayerConnect
#1

So.. this iss the deal.
In my RP Gm, wich it isnґt a GF edit ^^ the chat that tells you to type your password/to register is not appearing.
Anyone knows why?

This is the OnPlayerConnect:

Quote:

public OnPlayerConnect(playerid)
{
//==================[Join Counter]=========================
JoinCounter = JoinCounter + 1;
dini_IntSet("CRP_Scriptfiles/Other/JoinCounter.cfg", "Connections", JoinCounter);
//================================================== =======

ResetStats(playerid);//Setting variables to 0.
ClearScreen(playerid);//Clearing the users screen from SA-MP messages.
ShowScriptStats(playerid);//Showing the script information.
new first[MAX_PLAYER_NAME], last[MAX_PLAYER_NAME];
if(RPName(PlayerName(playerid),first,last))
{
SendClientMessage(playerid,COLOR_YELLOW,"_________ _________________________________________________" );
SendClientMessage(playerid,COLOR_LIGHTYELLOW2," LOGIN ");
new sendername[MAX_PLAYER_NAME];
new accstring[128];
GetPlayerName(playerid, sendername, sizeof(sendername));
format(accstring, sizeof(accstring), "CRP_Scriptfiles/Accounts/%s.ini", sendername);
new File: hFile = fopen(accstring, io_read);
if (hFile)
{
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "Jб estбs registado, escreve a tua password para fazeres o login");
fclose(hFile);
}
else
{
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "Ainda nгo estбs registado, escreve a tua password em baixo para o fazeres.");
}
SendClientMessage(playerid,COLOR_YELLOW,"_________ ________________________________________________") ;
}
else
{
KickPlayer(playerid," o Merdas","Nome Invбlido, Formato Correcto: Nome_Apelido.");
}
return 1;
}

thank you
Reply
#2

anyone?
Reply
#3

sorry but i made this yesterday and it is already at the 4rd page..
anyone?
Reply
#4

Check if the player exists.
Reply
#5

he existe, because it doesent appear the message to login, but if i type my password he will login..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)