pLogged problem -
[$A$]W33D$P33D - 26.07.2014
I hope u guys can help me my server has pLogged and now if someone comes on the server say under an admins name then the login dialog comes up but you don't even have to put in a password you just press login and you in the admin account and the players account there is no protection PLEASE HELP!!! Here is the code please have a look.
public OnPlayerRequestSpawn(playerid) //7:1
{
if(pInfo[playerid][pLogged] == 0 && pInfo[playerid][pAdminLevel] >= 1)
{
SendClientMessage(playerid,COLOR_RED,"You must be logged in.");
}
if(pInfo[playerid][pLogged] == 0)
{
new string[128];
GameTextForPlayer(playerid,"~r~YOU MUST LOGIN TO PLAY",1000,4);
if(fexist(UserPath(playerid)))
{
format(string,sizeof(string),""chat" Welcome back %s",PlayerName(playerid));
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,string,""chat" Our system have detected your username registered please login","Login","Quit");
}
else
{
format(string,sizeof(string),""chat" Hello %s to "NAME"",PlayerName(playerid));
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD,string,""chat" Welcome to "NAME" you'll be forced to register please click register!","Register","Quit");
}
}
return 1;
}
public OnPlayerConnect(playerid)
{
if(pInfo[playerid][pAdminDuty] == 1)
{
pInfo[playerid][pAdminDuty] = 0;
}
PlayerPressedJump[playerid] = 0;
playerOnline++;
ResetVars(playerid);
ConnectVars(playerid);
new string[128];
if(fexist(UserPath(playerid)))
{
format(string,sizeof(string),""chat" Welcome back %s",PlayerName(playerid));
}
else
{
format(string,sizeof(string),""chat" Hello %s",PlayerName(playerid));
}
new c2string[128], playerip[16];
GetPlayerIp(playerid, playerip, sizeof(playerip));
format(c2string, sizeof(c2string), ""chat" Player %s[%d] has joined the server "COL_RED"(IP: %s)", PlayerName(playerid), playerid, playerip);
SendMessageToAllAdmins(c2string, -1);
if(pInfo[playerid][pAdminLevel] <= 0)
{
new c2string2[128];
format(c2string2, sizeof(c2string2), ""chat"Player %s[%d] has joined the server", PlayerName(playerid), playerid);
SendClientMessageToAll(COLOR_WHITE, c2string2);
}
if(pInfo[playerid][pBanned] >= 1)
{
new constring[128];
GetPlayerIp(playerid, playerip, sizeof(playerip));
format(constring, sizeof(constring), ""chat" %s You are banned from the server, please make an unban appeal to
www.SA-mp.com", PlayerName(playerid));
SendClientMessage(playerid,-1,constring);
Kick(playerid);
}
return 1;
}
Re: pLogged problem -
GeekSiMo - 26.07.2014
WTF use [ PAWN] [/PAWN] !!!
Re: pLogged problem -
[$A$]W33D$P33D - 26.07.2014
if I take it out of my script nothing will compile its all connected to the...... pInfo.....
Re: pLogged problem -
[$A$]W33D$P33D - 26.07.2014
its the zombie apocalypse script so its scripted like that but there is something missing that makes anyone able to log into any players account it doesn't work. if I put
Re: pLogged problem -
[$A$]W33D$P33D - 26.07.2014
Quote:
Originally Posted by GeekSiMo
WTF use [ PAWN] [/PAWN] !!!
|
HUH Please give me a decent answer man.
Re: pLogged problem -
[$A$]W33D$P33D - 27.07.2014
please someone help