daily pastebin goal
81%
SHARE
TWEET

Untitled

a guest May 16th, 2016 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <a_samp>
  2.  
  3. public OnFilterScriptInit()
  4. {
  5.     printf("strMix(Pawno.pl) = %s", strMix("Pawno.pl"));
  6.     printf("strMix(Pawno.pl) = %s", strMix("Pawno.pl"));
  7.     printf("strMix(Pawno.pl) = %s", strMix("Pawno.pl"));
  8.     return 1;
  9. }
  10.  
  11.  
  12. #define MAX_MIX_STRING 128
  13. stock strMix(string[])
  14. {
  15.     new str2[MAX_MIX_STRING];
  16.     if(strlen(string) < MAX_MIX_STRING)
  17.     {
  18.         new i = strlen(string) - 1;
  19.         new str3[MAX_MIX_STRING];
  20.         new rand;
  21.  
  22.         strcat(str3, string);
  23.         while(i >= 0)
  24.         {
  25.             rand = random(strlen(str3));
  26.             str2[i] = str3[rand];
  27.             strdel(str3, rand, rand + 1);
  28.             i--;
  29.         }
  30.     }
  31.     return str2;
  32. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top