[FilterScript] [FS]wheather system
#3

add this if you want a Dialog too.

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if(!strcmp(cmdtext, "/weather", true))
	{
	  if(IsPlayerAdmin(playerid))//remove this if you dont want it admin only.
	  {
	  	ShowPlayerDialog(playerid, 3634, DIALOG_STYLE_LIST, "choose your wheater style", "sunny\ncloudy\nstormy\nfoggy\nrainy", "Select", "Cancel");
		}
		else
		{
		  SendClientMessage(playerid, 0xff000000, "You are not a admin!");
		}
		return 1;
	}
	return 0;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
  switch(dialogid)
  {
		case 3634:
		{
    	switch(temp)
			{
	  		case 1:
	  		{
	  		  PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
	  		  SetWeather(1);
	  		}
	  		case 2:
	  		{
	  		  PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
	  		  SetWeather(4);
	  		}
	  		case 3:
	  		{
	  		  PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
	  		  SetWeather(8);
	  		}
	  		case 4:
	  		{
	  			PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
	  		  SetWeather(9);
	  		}
	  		case 5:
	  		{
	  		  PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
	    		SetWeather(16);
	  		}
			}
    }
  }
  return 1;
}
Reply


Messages In This Thread
[FS]wheather system - by legodude - 16.05.2010, 12:07
Re: [FS]wheather system - by ^Woozie^ - 16.05.2010, 12:27
Re: [FS]wheather system - by legodude - 16.05.2010, 12:28
Re: [FS]wheather system - by legodude - 16.05.2010, 12:29
Re: [FS]wheather system - by W00Z - 04.06.2010, 11:40
Re: [FS]wheather system - by Shadow_ - 04.06.2010, 15:54
Re: [FS]wheather system - by legodude - 10.06.2010, 14:15
Re: [FS]wheather system - by Jofi - 11.06.2010, 09:28
Re: [FS]wheather system - by Thrarod - 11.06.2010, 10:19
Re: [FS]wheather system - by Hiddos - 11.06.2010, 13:17

Forum Jump:


Users browsing this thread: 1 Guest(s)