SA-MP Forums Archive
/login does nothing - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /login does nothing (/showthread.php?tid=141594)



/login does nothing - Alonso Sanchez - 14.04.2010

You can /register <password> fine but then when you do /login <password> nothing happens as if you didnt type anything. And no, I dont have auto-login. Please could anyone help. Server I.P: 188.72.225.172:3000 if you want to have a look, it's weird.


Re: /login does nothing - Jay_ - 14.04.2010

You need to show us the code.


Re: /login does nothing - Thrarod - 14.04.2010

Why noone gives code? We cant see code by entering your server! Just get the code from OnPlayerCommandText (Or sumtin like that)


Re: /login does nothing - Alonso Sanchez - 14.04.2010

this is what i got from the OnPlayerCommandText from the script:

//---------------------------<[ OnPlayerCommandText ]>--------------------------------------------------------

public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(specplayer, 10, cmdtext);
dcmd(specoff, 7, cmdtext);
dcmd(xgoto, 9, cmdtext);
new string[256];
new playermoney;
new sendername[MAX_PLAYER_NAME];
new giveplayer[MAX_PLAYER_NAME];
new playername[MAX_PLAYER_NAME];
new cmd[128];
new tmp[256];
new dancestyle;
new giveplayerid, moneys, idx;
new idcar = GetPlayerVehicleID(playerid);
new pveh = GetVehicleModel(GetPlayerVehicleID(playerid));
cmd = strtok(cmdtext, idx);
GetPlayerName(playerid, sendername, sizeof(sendername));
new y5, m5, d5;
new h5,mi5,s5;
getdate(y5,m5,d5);
gettime(h5,mi5,s5);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> %s",d5,m5,y5,h5,mi5,s5,sendername,cmdtext);
AllCommandLog(string);

Also may i add that this server works absoloutely fine when run in local mode but when hosted on the internet (from serverffs) it has that login bug/



Re: /login does nothing - Torran - 14.04.2010

Show us the login command


Re: /login does nothing - Alonso Sanchez - 14.04.2010

/login <password>

Also something else, even when i do /login and nothing happens, i can still do /help and all that comes up fine. Admin commands work and stuff. And even if i type the wrong password, it doesnt say i typed wrong password like it does in local mode. It is almost like there is no /login script but there is cos it works in local.


Re: /login does nothing - Alonso Sanchez - 14.04.2010

anyone?


Re: /login does nothing - Torran - 14.04.2010

Not the usage of the login command

The code for the login command! The one in your script


Re: /login does nothing - Alonso Sanchez - 14.04.2010

oh lol sorry it's this:

//-------------------------------[Login]--------------------------------------------------------------------------
if (strcmp(cmd, "/login", true) == 0)
{
if(!IsPlayerNPC(playerid))
{
if(IsPlayerConnected(playerid))
{
new tmppass[64];
if(gPlayerLogged[playerid] == 1)
{
SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "SERVER: You are already logged in.");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "USAGE: /login [password]");
return 1;
}
strmid(tmppass, tmp, 0, strlen(cmdtext), 255);
//Encrypt(tmppass);
OnPlayerLogin(playerid,tmppass);
GetPlayerName(playerid,sendername,sizeof(sendernam e));
new playersip[256];
GetPlayerIp(playerid,playersip,sizeof(playersip));
new d,m,y;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string),"(%d/%d/%d)[%d:%d:%d] %s Has Logged In [IP: %s]",d,m,y,h,mi,s,sendername, playersip);
LoginLog(string);
}
}
return 1;
}



Re: /login does nothing - Alonso Sanchez - 14.04.2010

BUMP - This bug is affecting alot of people using raven's rp GM, we really need help getting it sorted.