Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. CMD:login(playerid, params[])
  2. {
  3. new PlayerName[MAX_PLAYER_NAME];
  4. GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);
  5. if(IsLogged[playerid] != 0) return SendClientMessage(playerid, 0xFF0000FF, "[WARNING] You are already logged in!");
  6. if(sscanf(params,"s",passwords)) return SendClientMessage(playerid,0xFFF000FF,"[LOGIN-USAGE] /login [PLAYERID]");
  7.  
  8. format(file,sizeof(file),"../CSAdmin/Users/%s.ini",PlayerName);
  9. if(dini_Exists(file))
  10. {
  11. if(strmatch(udb_hash(passwords),dini_Get(file, "Password"))) // this is the error, its somehting with udb_hash and its this: : error 035: argument type mismatch (argument 1)
  12. {
  13. GivePlayerMoney(playerid, dini_Int(file, "Money"));
  14. SetPlayerScore(playerid, dini_Int(file, "Score"));
  15. SetPlayerSkin(playerid, dini_Int(file, "Skin"));
  16. IsLogged[playerid] = 1;
  17. }
  18. }
  19. return 1;
  20. }
  21.  
  22. stock strmatch(const String1[], const String2[])//
  23. {
  24. if ((strcmp(String1, String2, true, strlen(String2)) == 0) && (strlen(String2) == strlen(String1)))
  25. {
  26. return true;
  27. }
  28. else
  29. {
  30. return false;
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement