04.11.2017, 18:24
I dont know why this code didnt work.
First, i make a statement about textdraw will change based on weather.
Example : If weather rainy, the textdraw will show Rainy.
My code.
Anyone know why this code didnt work?
First, i make a statement about textdraw will change based on weather.
Example : If weather rainy, the textdraw will show Rainy.
My code.
PHP код:
new Text:Weather, Weathers;
//OnGameModeInit
Weather = TextDrawCreate(556.000000, 126.000000, "");
TextDrawAlignment(Weather, 2);
TextDrawBackgroundColor(Weather, 255);
TextDrawFont(Weather, 2);
TextDrawLetterSize(Weather, 0.420000, 1.600000);
TextDrawColor(Weather, -1);
TextDrawSetOutline(Weather, 1);
TextDrawSetProportional(Weather, 1);
TextDrawSetSelectable(Weather, 0);
SetTimer("RandomWeathers", 60000*3, true);
//Function
forward RandomWeathers();
public RandomWeathers()
{
Weathers = random(20);
SetWeather(Weathers);
switch(Weathers)
{
case 0:
{
new string[50];
format(string, sizeof string, "Sunny");
TextDrawSetString(Weather, string);
}
case 1:
{
new string[50];
format(string, sizeof string, "Sunny");
TextDrawSetString(Weather, string);
}