Jump to content
  • 0

Problema dialog imput %s


Pitbul97

Question

Problema intalnita (descriere): am o problema am la o comanda dialog imput iar cand cineva scrie %s pica serverul
Ero(area / rile) / warning-(ul / urile):-
Liniile de cod / sursa / script-ul(obligatoriu): -
Imagini / Video (optional): -
Ati incercat sa rezolvati singur?: am incercat sa caut solutii dar in zadar.

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Poate te ajuta asta e setat cand foloseste gen pe /report %s sa ii dea kick automat !

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);
        ABroadCast(COLOR_RED,string10,1);
        SendClientMessage(playerid, COLOR_WHITE, "You have been kicked because you tried to flood server.");
        KickEx(playerid);
        return 1;
    }

2c4AJX1.png

Link to comment
Share on other sites

  • 0
	new named[30],string[120];
    GetPlayerName(playerid,named,sizeof(named));

	if(    strfind(inputtext, "%", true) != -1  ||
           strfind(inputtext, "'", true) != -1 ||
           strfind(inputtext, "`", true) != -1 ||
           strfind(inputtext, ";", true) != -1 )
  	{
		format(string,sizeof(string),"* %s (%d) type inccorect character", named, playerid);
	    SendClientMessage(playerid,COLOR_RED,"don't use this characters!");
 		SendClientMessageToall(-1,string);
        return 0;
	}

 

Asta pui la inceputul ondialogresponse, toate acele caractere se considera flod sau sql injection

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
Link to comment
Share on other sites

  • 0
51 minutes ago, Pitbul97 said:

C:\Users\User\Desktop\(39224) : error 017: undefined symbol "SendClientMessageToall"

SendClientMessageToall(-1,string);

 

Asta chiar e culmea chiar atat de greu e? nu vezi ca cu litera mica un cuvant din comanda, cauta in gm sa vezi cum e

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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.