How To ?
#1

Hello! I have a problem ...
I used this in a gamemod:

ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Team","Type : \n1 - for blue team \n2 - for red team","Ok","Cancel");

How do ... when a player wirte 1 in that box give to him a skin and when write 2 give them other skins ?

I tried this:

if(dialogid==1)
{
if(!response)
{
if(inputtext[1] == 1)
{
SetPlayerSkin(playerid,122);
}
if(inputtext[1] == 2)
{
SetPlayerSkin(playerid,124);
}
}
}


To public OnDialogRespo......

But it not worked ...

So how do that when I write 1 to give me a skin and 2, other skins?

Sorry for my English, I'm from romania
Reply
#2

pawn Код:
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Team", "1 - for blue team \n2 - for red team", "Select", "Cancel");
pawn Код:
public OnDialogResponse(blablabla)
{
  if(response)
  {
    if(dialogid == 1)
    {
      SetPlayerSkin(playerid, strval(inputtext));
    }
  }
  return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)