ShowPlayerDialog And OnDialogResponse not recognized? -
gemadon - 11.10.2009
I have the latest pawno . . And for some reason its not recognizing what ShowPlayerDialog and OnDialogResponse is =|
Re: ShowPlayerDialog And OnDialogResponse not recognized? -
Sergei - 11.10.2009
Make sure to use 0.3 includes.
Re: ShowPlayerDialog And OnDialogResponse not recognized? -
eminich - 11.10.2009
get new include files aswell
Re: ShowPlayerDialog And OnDialogResponse not recognized? -
gemadon - 11.10.2009
Okay, and one more question . . I've seen in some other servers that when a player is IG, and he/she has a roleplay name like "Kevin_Gordon" . . Then it takes away the "_" and makes it just "Kevin Gordon" How can I do that?
Re: ShowPlayerDialog And OnDialogResponse not recognized? -
Sergei - 11.10.2009
pawn Code:
stock GetPlayerNameEx(playerid)
{
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid,pname,sizeof(pname));
new i = strfind(pname,"_",true);
if(i != (-1)) pname[i] = ' ';
return pname;
}
Re: ShowPlayerDialog And OnDialogResponse not recognized? -
gemadon - 11.10.2009
K I put the stock at the end of the script, and put GetPlayerNameEx(playerid); under OnPlayerConnect, but its still not working =|
Re: ShowPlayerDialog And OnDialogResponse not recognized? -
Littl3j0hNy - 11.10.2009
I have a problem with that too.
If i can't open a Dialog if i click on a Player.
In RC7 it works for me.
Re: ShowPlayerDialog And OnDialogResponse not recognized? -
Klid - 11.10.2009
100% Works for me.
I use to have the problem where I did :
Then wherever :
Code:
ShowPlayerDialog(playerid, test1, DIALOG_STYLE_LIST, "Test 1",
"Yes\nNo\n", "Select", "Exit");
Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == test1)
{
if(!response)
{
SendClientMessage(playerid, 0xAFAFAFAA, "You pressed Exit");
}
if(response)
{
if(listitem == 0)
{
SendClientMessage(playerid, 0xAFAFAFAA, "You pressed Yes");
}
if(listitem == 1)
{
SendClientMessage(playerid, 0xAFAFAFAA, "You pressed No");
}
}
}
}
This never worked.
I had to do this :
Code:
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Test 1",
"Yes\nNo\n", "Select", "Exit");
Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1)
{
if(!response)
{
SendClientMessage(playerid, 0xAFAFAFAA, "You pressed Exit");
}
if(response)
{
if(listitem == 0)
{
SendClientMessage(playerid, 0xAFAFAFAA, "You pressed Yes");
}
if(listitem == 1)
{
SendClientMessage(playerid, 0xAFAFAFAA, "You pressed No");
}
}
}
}
I had to use numbers 1,2,3,4,5,6 etc etc
I couldn't use custom variable names.
Just pitching in, making sure your not naming them with Variables
Hope This helps...
Kaleem
Re: ShowPlayerDialog And OnDialogResponse not recognized? -
Littl3j0hNy - 12.10.2009
Hi, i have no variables. I have only Numbers since RC7.
But in RC9 it doesn't work
- LJ
Re: ShowPlayerDialog And OnDialogResponse not recognized? -
Joe Staff - 12.10.2009
Quote:
Originally Posted by Seif_
Quote:
Originally Posted by $ЂЯĢ
pawn Code:
stock GetPlayerNameEx(playerid) { new pname[MAX_PLAYER_NAME]; GetPlayerName(playerid,pname,sizeof(pname)); new i = strfind(pname,"_",true); if(i != (-1)) pname[i] = ' '; return pname; }
|
What if a player has multiple _?
|
Then he has a weird name.
pawn Code:
stock GetPlayerNameEx(playerid)
{
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid,pname,sizeof(pname));
new i;
GPNXLABEL:
i = strfind(pname,"_",true);
if(i != (-1)) pname[i] = ' ';
if(strfind(pname,"_",true)>-1)goto GPNXLABEL;
return pname;
}
John_Stanky_Gofopple = John Stanky Gofopple