21.05.2011, 15:46
Weather Dialog
-This is one of my other simplest work i did well in this Fliterscript there are 10 Different weathers to select from the dialog the script can tell you what it looks like there is no need for a picture or a video
Script:
-This is one of my other simplest work i did well in this Fliterscript there are 10 Different weathers to select from the dialog the script can tell you what it looks like there is no need for a picture or a video
Script:
pawn Код:
#include <a_samp>
#define WeatherDialog 10235
public OnFilterScriptInit() {
print ( " Weather Dialog FS Loaded ") ;
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[]) {
if (!strcmp ( cmdtext , "/weather" , true)) {
ShowPlayerDialog ( playerid , WeatherDialog , DIALOG_STYLE_LIST , "Pick your weather", "Normal\nStorm\nFog\nSandStorm\nGreenFog\nRainy\nDullBrown\nBright\n2009\n2012\nCloudy" , "Pick" , "Cancel" ) ;
return 1;
}
return 0;
}
public OnDialogResponse ( playerid , dialogid , response , listitem , inputtext[]) {
if(dialogid == WeatherDialog) {
switch(listitem)
{
case 0 : {
SetPlayerWeather ( playerid , 0 ) ;
}
case 1 : {
SetPlayerWeather ( playerid , 8 ) ; // storm
}
case 2 : {
SetPlayerWeather ( playerid , 9 ) ; // fog
}
case 3 : {
SetPlayerWeather ( playerid , 19 ) ; // sandstorm
}
case 4 : {
SetPlayerWeather ( playerid , 20 ) ; // Green fog
}
case 5 : {
SetPlayerWeather ( playerid , 16 ) ;
}
case 6 : {
SetPlayerWeather ( playerid , 39 ) ;
}
case 7 : {
SetPlayerWeather ( playerid , 2009 ) ;
}
case 8 : {
SetPlayerWeather ( playerid , 2012 ) ;
}
case 9 : {
SetPlayerWeather ( playerid , 32 ) ; //cloudy
}
}
}
return 1;
}