Advertisement
Guest User

Untitled

a guest
Aug 28th, 2013
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3.  
  4. public OnFilterScriptInit(){
  5.  
  6. new tick = tickcount();
  7. for(new i;i<500;i++){
  8. CheckNumberAndLetter("MlodyMaKota");
  9. CheckNumberAndLetter("696969");
  10. CheckNumberAndLetter("MlodyMaKota696969");
  11. }
  12. printf("time -> %d ms", (tickcount()-tick));
  13. }
  14.  
  15. stock CheckNumberAndLetter(const str[])
  16. {
  17. new bool:z[1],i = 0;
  18.  
  19. while(EOS != str[i])
  20. {
  21. switch(str[i]) {
  22. case 'a'..'z', 'A'..'Z': {
  23. z{0} = true;
  24. }
  25. case '0'..'9': {
  26. z{1} = true;
  27. }
  28. }
  29.  
  30. if(z{0} && z{1}) return true;
  31. ++i;
  32. }
  33. return false;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement