18.06.2009, 11:56
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:
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
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))
{
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