Zeca Posted April 8, 2018 Report Share Posted April 8, 2018 Dami si mie anti-injections pentru clan tag! Quote Link to comment Share on other sites More sharing options...
0 Reset Posted April 8, 2018 Report Share Posted April 8, 2018 %S? Quote mai tare e bigzone Link to comment Share on other sites More sharing options...
0 Zeca Posted April 8, 2018 Author Report Share Posted April 8, 2018 da Quote Link to comment Share on other sites More sharing options...
0 AlexxAdv Posted April 8, 2018 Report Share Posted April 8, 2018 Adauga la inceputul gm-ului static const antisqlinjection[][] = { "'", "#", "`", "%s", "%d", "%f", "%h", "h%" }; adauga la public OnDialogResponse if(strfind(inputtext, "%", true) != -1) { SendClientMessage(playerid, COLOR_GENANNOUNCE, "SERVER: Invalid dialog input. You can't use %%."); ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE_INPUT, "Invalid dialog input", "Invalid dialog input", "OK", "Exit"); return 1; } for(new i; i < sizeof(antisqlinjection); i++) { if(strfind(inputtext, antisqlinjection, true) != -1) { SCM(playerid, -1, "Nu sunt permise asemenea caractere."); return 1; } } iar ca public si forward forward CheckCharacters(string[]); public CheckCharacters(string[]) { for(new i; i < sizeof(antisqlinjection); i++) { if(strfind(string, antisqlinjection, true) != -1) { return 1; } } return 0; } 1 Quote Link to comment Share on other sites More sharing options...
0 Lunoxx Posted April 8, 2018 Report Share Posted April 8, 2018 Sau poti pur si simplu sa cauti caracterul `%` in inputtext la OnDialogResponse si sa-l elimini daca e gasit sau sa returnezi un mesaj.. Quote Servicii scripting calitative: https://www.sa-mp.ro/forums/topic/26143-l-ofer-servicii-scripting-de-calitate/ Contact: Skype: alin.m99 Discord: Lunoxx#1155 Email: [email protected] Facebook: facebook.com/pawnscripts Link to comment Share on other sites More sharing options...
Question
Zeca
Dami si mie anti-injections pentru clan tag!
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.