/weater
#1

Hi! I have a code on the command / weather? Then show me a dialog box in which I enter ID weather.
Reply
#2

Use ShowPlayerDialog with style 1.
Reply
#3

I'll create one real fast.

Код:
if(strcmp(cmd, "/weather", true) == 0)
{
if(IsPlayerAdmin(playerid))
{
ShowPlayerDialog(playerid, DIALOG_STYLE_INPUT, "Change Weather", "Type the weather ID below!", "Change", "Cancel");
}
}
I'm still a nooby scripter, sorry if I made a mistake :S

Reply
#4

Quote:
Originally Posted by TKZ227
I'll create one real fast.

Код:
if(strcmp(cmd, "/weather", true) == 0)
{
if(IsPlayerAdmin(playerid))
{
ShowPlayerDialog(playerid, DIALOG_STYLE_INPUT, "Change Weather", "Type the weather ID below!", "Change", "Cancel");
}
}
I'm still a nooby scripter, sorry if I made a mistake :S

Should work, you only forgot the dialog id..

pawn Код:
public OnPlayerDialogResponse(blablablablablaspam)//Recommended not to copy this
{
if(dialogid == weatherid)//change that to your own
{
SetWeather(strval(inputtext));
}
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)