percent symol crash server - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: percent symol crash server (
/showthread.php?tid=264117)
percent symol crash server -
PawnNewCommer - 24.06.2011
del pls
Re: percent symol crash server -
linuxthefish - 24.06.2011
String hax!
EDIT: They are trying to get the server to say something to you my trying to do something else in the format thingy. SA-MP should block that!
Re: percent symol crash server -
PawnNewCommer - 24.06.2011
maybe bag in /sms? and really fix it?
Re: percent symol crash server -
Calgon - 24.06.2011
What SA-MP version are you using? The placeholder was fixed a release back if I recall correctly.
Re: percent symol crash server -
PawnNewCommer - 25.06.2011
Quote:
Originally Posted by Calg00ne
What SA-MP version are you using? The placeholder was fixed a release back if I recall correctly.
|
The latest version. 0.3c R2
Re: percent symol crash server -
PawnNewCommer - 25.06.2011
oh we find problem...
The problem was not in command, and dialog boxes. If press tab and click to player Send sms. In dialog write %skript - server crash
Re: percent symol crash server -
PawnNewCommer - 25.06.2011
Hmm.
How i can check all inputtext ?
Now i check:
[code]if(inputtext[0]=='%') inputtext[0]=' ';[code]
but it check only the beginning of the text.
Re: percent symol crash server -
Calgon - 25.06.2011
pawn Код:
for(new iCh; iCh < strlen(cmdtext); iCh++) {
if(cmdtext[iCh] == '%')
cmdtext[iCh] = ' ';
}
Place this at the top of OnPlayerCommandText.
Re: percent symol crash server -
PawnNewCommer - 25.06.2011
with this work incorrectly.
this full my code of dialog:
Код:
if(dialogid==17) //send sms dialog
{
if(response)
{
new string[128];
new targetid=PhoneTargetID[playerid];
if(!strlen(inputtext))
{
GetPlayerName(targetid, string, sizeof(string));
format(string, sizeof(string), " Name: %s (phone.: %d)\n\n\nWrite message:\n\n", string, PlayerInfo[targetid][pPnumber]);
ShowPlayerDialog(playerid, 17, DIALOG_STYLE_INPUT, "Sending", string, "Send", "Cancel");
return 1;
}
if(inputtext[0]=='%') inputtext[0]=' ';
{
SendClientMessage(playerid,COLOR_ALLDEPT," error");
}
format(string, sizeof(string), "/sms %d %s", PlayerInfo[targetid][pPnumber], inputtext);
OnPlayerCommandText(playerid, string);
}
return 1;
}
need check all inputtext
Re: percent symol crash server -
Calgon - 25.06.2011
No, you need to check more than just the FIRST cell.
To filter the placeholder (%) from dialogs too, add this code at the top of OnDialogResponse:
pawn Код:
for(new iCh; iCh < strlen(inputtext); iCh++) {
if(inputtext[iCh] == '%')
inputtext[iCh] = ' ';
}