ShowPlayerDialog And OnDialogResponse not recognized?
#1

I have the latest pawno . . And for some reason its not recognizing what ShowPlayerDialog and OnDialogResponse is =|
Reply
#2

Make sure to use 0.3 includes.
Reply
#3

get new include files aswell
Reply
#4

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?
Reply
#5

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;
}
Reply
#6

K I put the stock at the end of the script, and put GetPlayerNameEx(playerid); under OnPlayerConnect, but its still not working =|
Reply
#7

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.
Reply
#8

100% Works for me.

I use to have the problem where I did :

Code:
new test1;
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
Reply
#9

Hi, i have no variables. I have only Numbers since RC7.
But in RC9 it doesn't work

- LJ
Reply
#10

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)