27.03.2009, 18:18
Well, i'll start a new tread once again because no1 aswered this at a few days ago.
I've a bug that OnPlayerConnect(playerid), doesn't show the "SendClientMessage", this is really annoying because i can't tell anyone how to register or login.
Here is my OnPlayerConnect(playerid):
for some reason that the compile doesn't say me this SendClientMessage doesn't appear for players.
Already asked help to maany scripters and they didn't told me how to fix it, so i'll ask to anyone who see the bug tell me, i'll realy appreciate.
I've a bug that OnPlayerConnect(playerid), doesn't show the "SendClientMessage", this is really annoying because i can't tell anyone how to register or login.
Here is my OnPlayerConnect(playerid):
pawn Code:
public OnPlayerConnect(playerid)
{
SetPlayerMapIcon(playerid, 0, 2367.3176, -49.1214, 28.1535, 61, 0); //Johnson's Boys
SetPlayerMapIcon(playerid, 1, 2269.6711, -74.1612, 26.7724, 30, 0); //PD
SetPlayerMapIcon(playerid, 2, 2303.8250, -16.1863, 26.4844, 52, 0); // Bank
SetPlayerMapIcon(playerid, 3, 2273.5002, 82.0424, 26.4844, 31, 0); //Hotel
SetPlayerMapIcon(playerid, 4, 1380.4132, 462.1008, 20.0872, 55, 0); //GasStaion
SetPlayerMapIcon(playerid, 5, 1374.0546, 404.8277, 19.9555, 56, 0); //Mayor's Office
SetPlayerMapIcon(playerid, 6, 1288.6687, 271.1644, 19.5547, 54, 0); //Local Gym
SetPlayerMapIcon(playerid, 7, 1303.8917, 172.7794, 20.4609, 60, 0); //Vagoz
SetPlayerMapIcon(playerid, 8, 1324.3851, 286.0792, 20.0452, 51, 0); //Factory
//==================[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, "You are already registered, type your password to login.");
fclose(hFile);
}
else
{
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "You aren't registered yet, you need to register to play, type your password to do it.");
}
SendClientMessage(playerid,COLOR_YELLOW,"_________________________________________________________");
}
else
{
KickPlayer(playerid,"System","Invalid name, you should have Name_Surname.");
}
return 1;
}
Already asked help to maany scripters and they didn't told me how to fix it, so i'll ask to anyone who see the bug tell me, i'll realy appreciate.