Jump to content

Question

Posted

Unde aţi întâmpinat problema: pe serverul meu de samp
Descriere problemă: Cand cineva intra pe server si tasteaza comanda /reports, /changepass , iar acolo scrie %s, imi cade serveru si trebuie sa dau restart, cum pot sa evit aceasta problema.

Poze/Video : nu e nevoie

5 answers to this question

Recommended Posts

  • 0
Posted

Pica servarul pica servarul ...

Pica daca nu dai admin :))))) 

 

Cred ca problema asta apare si la alt topic da ma rog :D 

    if(strfind(inputtext, "%", true) != -1)
    {
        new flooder[MAX_PLAYER_NAME];
        new string10[100];
        GetPlayerName(playerid, flooder, sizeof(flooder));
        format(string10, sizeof(string10), "{f03337}Warning: %s(%d) tryes to flood server with dialog method.", flooder, playerid);
        SendClientMessageToAll(0, string10);
        SendClientMessage(playerid, COLOR_WHITE, "You have been kicked because you tried to flood server.");
        Ban(playerid);
        return 1;
    }

 

2c4AJX1.png

  • 0
Posted
On 8/25/2016 at 10:58 PM, Uzzi25 said:

    if(strfind(inputtext, "%", true) != -1)
    {
        new flooder[MAX_PLAYER_NAME];
        new string10[100];
        GetPlayerName(playerid, flooder, sizeof(flooder));
        format(string10, sizeof(string10), "{f03337}Warning: %s(%d) tryes to flood server with dialog method.", flooder, playerid);
        SendClientMessageToAll(0, string10);
        SendClientMessage(playerid, COLOR_WHITE, "You have been kicked because you tried to flood server.");
        Ban(playerid);
        return 1;
    }

 

 

  • 0
Posted (edited)

Instaleaza anti sql injection si nu o sa mai ai probleme.

Cum il instalezi?

Adaugi undeva la inceputul gamemode-ului asta; 

static const antisqlinjection[][] = {
"'",
"#",
"`",
"%"
};

Iar publicul cu dialoguri in general OnDialogResponse adaugi asta:

for(new i; i < sizeof(antisqlinjection); i++)
{
if(strfind(inputtext, antisqlinjection[i], true) != -1)
{
SCM(playerid, COLOR_GREEN, " Nu poti folosi aceste caractere.");
return 1;
}
}

Mult succes daca mai intampini probleme poti sa postezi aici.

Edited by eltAndrei

SKINS SYSTEM BY ELTANDREI >> CLICK <<

DMV SYSTEM BY ELTANDREI >> CLICK <<

(!)SERVER DISCORD: https://discord.gg/8Hwd8EF

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.