Advertisement
Guest User

Untitled

a guest
Aug 16th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.56 KB | None | 0 0
  1. new invalidChars[] = {"'", "\"", "#", "%"};
  2. forward checkInvalidChars(text[]);
  3. public checkInvalidChars(text[]) {
  4.     new size = sizeof(invalidChars), found = false;
  5.     for(new i = 0; i < size; i++) {
  6.         if(strfind(text, invalidChars[i], true) != -1) {
  7.             found = true;
  8.             break;
  9.         }
  10.     }
  11.     if(found)
  12.         return 1;
  13.     return 0;
  14. }
  15. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  16. {
  17.     if(checkInvalidChars(inputtext)) {
  18.         // Actiune, spre exemplu trimite un mesaj, afiseaza un mesaj pe ecran
  19.         return 1;
  20.     }
  21.     return 1;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement