[HELP] Problem with dialog - 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: [HELP] Problem with dialog (
/showthread.php?tid=254612)
[HELP] Problem with dialog -
Type-R - 11.05.2011
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.
Re: [HELP] Problem with dialog -
MadeMan - 11.05.2011
Change udb_hash to strval.
Re: [HELP] Problem with dialog -
Seven_of_Nine - 11.05.2011
udb_hash(inputtext)? Use "playerid" instead.
@above me: yes, I don't really understand this code, but I found out it needs IDs *-*
Re: [HELP] Problem with dialog -
Type-R - 11.05.2011
Thank you guys.