Jump to content
  • 0

pomoc Registracia.


Lor3nZo

Dotaz

cf all,

Mam mod a v mode mam registraciu. Vsetko funguje az na to ze ked sa pripojim vipise /register [......] dam register a vipise /login [......] ked dam login nestane sa nic a nejde sa spawnut stale vipisuje to ze logni sa..

P.S mod nevipisuje error ani warning....

Poradte pls... :think:

Link to comment
Share on other sites

16 odpovědí na tuto otázku

Recommended Posts

  • 0

 

if (strcmp(cmd, "/login", true) == 0)

{

if (logged[playerid] != 1 && udb_Exists(PlayerName(playerid)))

{

new dir[256];

dir = strtok(cmdtext, idx);

if (strlen(dir) && strcmp(dir, dUser(PlayerName(playerid)).("password"), true) == 0)

{

logged[playerid] = 1;

GivePlayerMoney(playerid, dUserINT(PlayerName(playerid)).("money"));

}

}

return 1;

}

 

if (strcmp(cmd, "/register", true) == 0)

{

if (logged[playerid] != 1 && !udb_Exists(PlayerName(playerid)))

{

new dir[256];

dir = strtok(cmdtext, idx);

if (strlen(dir))

{

new fname[MAX_STRING];

format(fname,sizeof(fname),"%s.dudb.sav",udb_encode(PlayerName(playerid)));

dini_Create(fname);

dUserSet(PlayerName(playerid)).("password", dir);

SendClientMessage(playerid,COLOR_CERVENA,"[*Drift Mod*] - Bol si zaregistrovany! Pouzi: /login [heslo]");

}

}

return 1;

}

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...