06.11.2016, 18:28
PHP Code:
public UpdateIphone()
{
new Hour, Minute;
gettime(Hour, Minute);
new str[64];
format(str,sizeof(str),"4G________________%02d:%02d",Hour,Minute);
TextDrawSetString(TD_iPhone[18], str);
format(str,sizeof(str),"%02d:%02d",Hour,Minute);
TextDrawSetString(TD_iPhone_Clock[0], str);
TextDrawSetString(TD_iPhone[19], str);
new Year, Month, Day;
getdate(Year, Month, Day);
format(str,sizeof(str),"%s, %02d %d",GetMonth(Month), Day, Year);
TextDrawSetString(TD_iPhone[20], str);
TextDrawSetString(TD_iPhone_Clock[1], str);
ActualizarTiempo();
return 1;
}
stock ActualizarTiempo()
{
new weather[64],idwea;
GetServerVarAsString("weather", weather, sizeof(weather));
idwea = strval(weather);
if(idwea >= 0 && idwea <= 7) TextDrawSetString(TD_iPhone_Time[0],"Sunny");
else if(idwea == 8) TextDrawSetString(TD_iPhone_Time[0],"Stormy");
else if(idwea == 9) TextDrawSetString(TD_iPhone_Time[0],"Fog");
else if(idwea == 10) TextDrawSetString(TD_iPhone_Time[0],"Sunny");
else if(idwea == 11) TextDrawSetString(TD_iPhone_Time[0],"Hot");
else if(idwea >= 12 && idwea <= 15) TextDrawSetString(TD_iPhone_Time[0],"Aburro");
else if(idwea == 16) TextDrawSetString(TD_iPhone_Time[0],"Rain");
else if(idwea >= 17 && idwea <= 18) TextDrawSetString(TD_iPhone_Time[0],"Hot");
else if(idwea == 19) TextDrawSetString(TD_iPhone_Time[0],"Sand");
else if(idwea == 20) TextDrawSetString(TD_iPhone_Time[0],"Fog");
else if(idwea == 21) TextDrawSetString(TD_iPhone_Time[0],"Very dark");
else if(idwea == 22) TextDrawSetString(TD_iPhone_Time[0],"Very dark");
else if(idwea >= 23 && idwea <= 26) TextDrawSetString(TD_iPhone_Time[0],"Orange");
else if(idwea >= 27 && idwea <= 29) TextDrawSetString(TD_iPhone_Time[0],"Sunny");
else if(idwea >= 30 && idwea <= 32) TextDrawSetString(TD_iPhone_Time[0],"Dark");
else if(idwea == 33) TextDrawSetString(TD_iPhone_Time[0],"Dark");
else if(idwea == 34) TextDrawSetString(TD_iPhone_Time[0],"Blue");
else if(idwea == 35) TextDrawSetString(TD_iPhone_Time[0],"Marron");
else if(idwea >= 36 && idwea <= 38) TextDrawSetString(TD_iPhone_Time[0],"Brillant");
else if(idwea == 39) TextDrawSetString(TD_iPhone_Time[0],"Very brillant");
else if(idwea >= 40 && idwea <= 42) TextDrawSetString(TD_iPhone_Time[0],"Blue/Purple");
else if(idwea == 43) TextDrawSetString(TD_iPhone_Time[0],"Toxic");
else if(idwea == 44) TextDrawSetString(TD_iPhone_Time[0],"Black");
else if(idwea == 45) TextDrawSetString(TD_iPhone_Time[0],"Black");
return 1;
}