Jochemd

Untitled

May 20th, 2013
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.38 KB | None | 0 0
  1. stock IsAdvertisement(const text[])
  2. {
  3.     new len = strlen(text), chance = 0;
  4.     for(new i = 0; i < len; i ++)
  5.     {
  6.         if(i + 1 != len)
  7.         {
  8.             if(text[i] == '.' && (text[i + 1] >= '0' && text[i + 1] <= '9'))
  9.             {
  10.                 chance ++;
  11.                 continue;
  12.             }
  13.             if(chance == 3)
  14.             {
  15.                 if(text[i] == ':' && (text[i + 1] >= '0' && text[i + 1] <= '9')) return 1;
  16.             }
  17.         }
  18.     }
  19.     return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment