Login command - 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 command (
/showthread.php?tid=82454)
Login command -
arnutisz - 18.06.2009
I want to create login command (/register created, thanks for helping), i take a look at some login commands, and i made a part of command, because I understood this part, but other didn't. Here is what i made:
pawn Код:
dcmd_login(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
new string[256], ip[24];
new pname[MAX_PLAYER_NAME];
if(Logged[playerid])
{
SendClientMessage(playerid, COLOR_RED, "Tu jau prisijunges noob, ziurek ka darai");
return 1;
}
if(!strlen(params))
{
SendClientMessage(playerid, COLOR_RED, "Neyvedei passwordo, tu gal durnas?");
return 1;
}
new pass2 = strval(params);
pass2 = pass1;
GetPlayerName(playerid, pname, sizeof (pname));
format(string, sizeof(string), "/Vartotojai/%s.acc", pname);
new File:file = fopen(str, io_write);
if(file)
{
new pass2 = strval(params);
if(pass2 == pass1)
{
while(fread(file, string, sizeof(string))
{
What i should do next?
I am trying to not use other includes, or functions (except dcmd, because its easier and more understandable for me). And sorry for my English, I know, its bad Big smile
Re: Login command -
Grim_ - 18.06.2009
Check this out
http://forum.sa-mp.com/index.php?topic=69810.0