Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- public OnFilterScriptInit(){
- printf("result -> %d", CheckNumberAndLetter("MlodyMaKota"));
- printf("result -> %d", CheckNumberAndLetter("696969"));
- printf("result -> %d", CheckNumberAndLetter("MlodyMaKota696969"));
- }
- stock CheckNumberAndLetter(const str[])
- {
- static
- bool:z[2 char],
- i = 0;
- while(EOS != str[i])
- {
- switch(str[i]) {
- case 'a'..'z', 'A'..'Z': {
- z{0} = true;
- }
- case '0'..'9': {
- z{1} = true;
- }
- }
- if(z{0} && z{1}) return true;
- ++i;
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement