[HELP] Problem with dialog
#1

Hi, i wanted to make a dialog, with input, and in the dialog you have to put the players id. I put to check, if the player is online, that you put into the dialog, but it always shows that player with that id doesn't exist, so i cant change his color. Here's the script:

Код:
if(dialogid == 52)
    {
        if(response)
        {
            if(!strlen(inputtext)) return ShowPlayerDialog(playerid,52,DIALOG_STYLE_INPUT,"{A3E4FF}Vardo Spalva","Jus neivedete jokio ID,\nPrasome ivesti zaidejo ID.","Ivesti","Iseiti");
            if(!IsPlayerConnected(udb_hash(inputtext))) return ShowPlayerDialog(playerid,52,DIALOG_STYLE_INPUT,"{A3E4FF}Vardo Spalva","Zaidejas tokiu ID neprisijunges,\nPrasome ivesti zaidejo ID.","Ivesti","Iseiti");
        	if(spalva[playerid] == 0)
			{
			    SetPlayerColor(udb_hash(inputtext), raudona);
			}
			else if(spalva[playerid] == 1)
			{
			    SetPlayerColor(udb_hash(inputtext), COLOR_GREEN);
			}
        }
    }
Please help me.
Reply
#2

Change udb_hash to strval.
Reply
#3

udb_hash(inputtext)? Use "playerid" instead.

@above me: yes, I don't really understand this code, but I found out it needs IDs *-*
Reply
#4

Thank you guys.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)