Help with inputtext
#1

I made if player enter true code to show another dialog: http://prntscr.com/58nwy9
My pKod is 34834 here is image from scriptfiles: http://prntscr.com/58nxhm

When I enter 34834 ingame, server don't show me another dialog, but if I enter without enter code(only click enter) server show me the dialog How to fix this? I tried with false code, server again don't show me dialog only if enter without code show me dialog (Sry For My Bad English )

Код:
 	if(dialogid == DIALOG_ZPASS2)
	{
	new imenaigrac[MAX_PLAYER_NAME];
	GetPlayerName(playerid, imenaigrac, sizeof(imenaigrac));
	if(response)
	{
		if(!strcmp(inputtext, PlayerInfo[playerid][pEmail], false))
  		{
			new regstring[1000];
			format(regstring, sizeof(regstring), "{FFFFFF}Gospodine %s\n{0563FE}>{FFFFFF}Uspesno go pominavte celiot proces za vrakanje na lozinka.", imenaigrac);
			format(regstring, sizeof(regstring), "%s\n\n{0563FE}>{FFFFFF}Vasata lozinka e: %s.",regstring, PlayerInfo[playerid][pPass]);
			format(regstring, sizeof(regstring), "%s\n{0563FE}>{FFFFFF}Dokolku imate nekoj problem posetete{FFFF00}www.dw-game.info{FFFFFF}",regstring);
			ShowPlayerDialog(playerid,DIALOG_ZPASS3, DIALOG_STYLE_INPUT, "{FF2828}Vrakanje na lozinka{FFFFFF}", regstring, "Premini na login", "");
		}
	}
	}
Reply
#2

Quote:
Originally Posted by ilepopivanov
Посмотреть сообщение
if I enter without enter code(only click enter) server show me the dialog How to fix this?
It's because this function also returns 0 if either string is empty.

https://sampwiki.blast.hk/wiki/Strcmp

Check if the inputtext is empty.

pawn Код:
if(strlen(inputtext) < 1) return SomeError.
Is pKod being loaded?
Reply
#3

Yes..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)