Skripta koju koristim:moja neka
Detaljan opis problema:ovako ovo dole je kod vremena na serveru ali bio dan ili noc na serveru je mrak
Dio skripte:Dole
Neke slike/video za lakse dobivanje pomoci(neobavezno):
[pawn]//------------------------------------------------------------------------------
task SyncTime[60000]()
{
new tmphour,
tmpminute,
tmpsecond,
year,
month,
day,
stringicc[ 60 ];
getdate( year, month, day );
gettimeEx( tmphour, tmpminute, tmpsecond );
FixHour( tmphour );
tmphour = shifthour;
format( stringicc, sizeof( stringicc ), "~g~%d/%d/%d", day, month, year );
format( stringicc, sizeof( stringicc ), "%s%d:%s%d:%s%d", (tmphour < 10) ? ("0") : (""), tmphour, (tmpminute < 10) ? ("0") : (""), tmpminute, (tmpsecond < 10) ? ("0") : (""), tmpsecond);
for( new i = 1; i < MAX_ATM; i++ ) {
if( atmInfo[ i ][ atmExists ] == true ) {
if( atmInfo[ i ][ atmVremeDoRoba ] != 0 ) {
atmInfo[ i ][ atmVremeDoRoba ]--;
if( atmInfo[ i ][ atmVremeDoRoba ] == 0 ) {
atmInfo[ i ][ atmPreseceneZice ] = false;
atmInfo[ i ][ atmProbijenBios ] = false;
}
}
}
}
for( new i = 1; i < MAX_GZONE; i++ ) {
if( gZoneInfo[ i ][ gZoneTime ] != 0 ) {
gZoneInfo[ i ][ gZoneTime ]--;
}
}
if(tmpminute == 14 || tmpminute == 29 || tmpminute == 44 || tmpminute == 59)
{
LoadMK();
}
if( VremeZatvaranjaCelija > -1 ) {
VremeZatvaranjaCelija--;
if( VremeZatvaranjaCelija == 0 ) {
UpravljanjeCelijama( false );
}
}
if( ( tmphour > ghour ) || ( tmphour == 0 && ghour == 0 ) ) {
format( globalstring, sizeof( globalstring ), "Hvala Vam sto igrate na RevolucionGaming HP, trenutno je "col_yelow"%d:00 sati", tmphour+1 );
OOCNews( BELA, globalstring );
ghour = tmphour;
if( tmphour == 1 ) {
SetWeather( 1 );
}
if( realtime ) {
SetWorldTime( 13 );
ServerInfo[ VremeInGame ] = 13;[/pawn]
Uzmi iz drugog moda. xD
Citat: Eldin Pawno poslato Septembar 01, 2017, 23:28:05 POSLE PODNE
Uzmi iz drugog moda. xD
Ne skluoljaj tako postove, ako ne znaÅ¡ onda i ne piÅ¡i nije fora da se kopira, treba da se nauÄi.
@T ako niko ne odgovori do sutra kad sednem za laštop poslaću ti objašnjenje celo, preko telefona pišem
task SyncTime[60000]()
{
new tmphour,
tmpminute,
tmpsecond,
year,
month,
day,
stringicc[ 60 ];
getdate( year, month, day );
gettimeEx( tmphour, tmpminute, tmpsecond );
FixHour( tmphour );
tmphour = shifthour;
format( stringicc, sizeof( stringicc ), "~g~%d/%d/%d", day, month, year );
format( stringicc, sizeof( stringicc ), "%s%d:%s%d:%s%d", (tmphour < 10) ? ("0") : (""), tmphour, (tmpminute < 10) ? ("0") : (""), tmpminute, (tmpsecond < 10) ? ("0") : (""), tmpsecond);
for( new i = 1; i < MAX_ATM; i++ ) {
if( atmInfo[ i ][ atmExists ] == true ) {
if( atmInfo[ i ][ atmVremeDoRoba ] != 0 ) {
atmInfo[ i ][ atmVremeDoRoba ]--;
if( atmInfo[ i ][ atmVremeDoRoba ] == 0 ) {
atmInfo[ i ][ atmPreseceneZice ] = false;
atmInfo[ i ][ atmProbijenBios ] = false;
}
}
}
}
for( new i = 1; i < MAX_GZONE; i++ ) {
if( gZoneInfo[ i ][ gZoneTime ] != 0 ) {
gZoneInfo[ i ][ gZoneTime ]--;
}
}
if(tmpminute == 14 || tmpminute == 29 || tmpminute == 44 || tmpminute == 59)
{
LoadMK();
}
if( VremeZatvaranjaCelija > -1 ) {
VremeZatvaranjaCelija--;
if( VremeZatvaranjaCelija == 0 ) {
UpravljanjeCelijama( false );
}
}
//=======
if( ( tmphour > ghour ) || ( tmphour == 0 && ghour == 23 ) ) {
format( globalstring, sizeof( globalstring ), "Hvala Vam sto igrate na RevolucionGaming HP, trenutno je "col_yelow"%d:00 sati",
tmphour+1 );
OOCNews( BELA, globalstring );
ghour = tmphour;
if( tmphour == 21 ) {
SetWeather( 10 );
}
if( realtime ) {
SetWorldTime( tmphour );
ServerInfo[ VremeInGame ] = tmphour;
}
DinamicWeather( );