Advertisement
Guest User

Untitled

a guest
Oct 20th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. // CVARINFO START
  2. user string pro_authkey = "none";
  3. // CVARINFO END
  4.  
  5. bool playerLoggedIn[64];
  6. str playerAuthKey[64];
  7.  
  8. // ACS START
  9. SCRIPT "Player Enter Auth" ENTER
  10. {
  11. str authKey = GetUserCVarString(PlayerNumber(), "pro_authkey");
  12.  
  13. if(!StrIcmp(authKey, "none"))
  14. {
  15. // Generate Auth Key and register player
  16. str generatedAuthKey;
  17.  
  18. SetUserCVarString(PlayerNumber(), "pro_authkey", generatedAuthKey);
  19. authKey = generatedAuthKey;
  20. }
  21.  
  22. // Log player in here checking if the auth key matches, if it does store it
  23. playerLoggedIn[64] = true;
  24. playerAuthKey[PlayerNumber()] = authKey;
  25.  
  26. // Use those arrays from now on to query stuff to prevent players from modifying pro_authkey CVar and fucking shit up
  27. }
  28. // ACS END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement