Detaljan opis problema: Na paydayu, znaci kad je pun sat na serveru tj. //:00 ako me razumijete, i kad je payday na par sekundi "pukne" server, ja sam nesto gledao timere i bio sa nesto napravio i "pukne" samo na 1-2sek i nastavi sa normalnim radom i tako je radio par dana.. Sada mi opet puca na 5-10 sekundi, tako je i sa nekim stvarima kad kreiram ingame pukne na par sekundi i nastavi dalje, to se uglavnom desava oko dialoga
Dio skripte:
task GlobalTimer()
{
new id = -1;
new tmphour,
tmpminute,
tmpsecond,
year,
month,
day,
stringicc[ 30 ];
getdate( year, month, day );
gettimeEx( tmphour, tmpminute, tmpsecond );
FixHour( tmphour );
tmphour = shifthour;
format( stringicc, sizeof( stringicc ), "%s%d:%s%d:%s%d~n~~w~%d/%d/%d", (tmphour < 10) ? ("0") : (""), tmphour, (tmpminute < 10) ? ("0") : (""), tmpminute, (tmpsecond < 10) ? ("0") : (""), tmpsecond, day, month, year );
TextDrawSetString( IGGLAVNI[ 28 ], stringicc );
if( cseconds ) {
format( cstring, 6, "~w~%d", cseconds-1 );
GameTextForAll( cstring, 1100, 4 );
SoundForAll( 1056 );
cseconds --;
if( !cseconds )
{
GameTextForAll( "~r~GO GO GO!!!", 2000, 4 );
SoundForAll( 1057 );
}
}
foreach( Player, i ) {
if( GetPlayerInterior( i ) == 0 && GetPlayerVirtualWorld( i ) == 0 ) {
new stringzone[ MAX_ZONE_NAME ];
format( stringzone, sizeof( stringzone ), "%s", GetPlayerLocation( i ) );
PlayerTextDrawSetString( i, IGIgracevaZona[ i ], stringzone );
PlayerTextDrawShow( i, IGIgracevaZona[ i ] );
}
else {
PlayerTextDrawHide( i, IGIgracevaZona[ i ] );
}
if( SearchNadji[ i ] != -1 ) {
if( IsPlayerConnected( SearchNadji[ i ] ) ) {
new Float:X, Float:Y, Float:Z;
GetPlayerPos( SearchNadji[ i ], X, Y, Z );
Muma_SetPlayerCheckpoint( i, X, Y, Z, 6 );
}
else if( !IsPlayerConnected( SearchNadji[ i ] ) ) SearchNadji[ i ] = -1;
}
if( BlowJobCount[ i ] != 0 ) {
BlowJobCount[ i ]--;
new stringic[ 10 ];
format( stringic, sizeof( stringic ), "%d", BlowJobCount[ i ] );
PlayerTextDrawSetString( i, BLOWJOBCOVER[ i ][ 4 ], stringic );
}
if( NaDmEventu[ i ] == false && WARPInfo[ i ][ WARIgrac ] == -1 ) {
if( PlayerInfo[ i ][ xSkriptaRank ] == 1 ) {
SetPlayerChatBubble( i, "[ DEVELOPER ]", GLAVNA, 40.0, 10000);
}
else if( PlayerInfo[ i ][ xSkriptaRank ] == 2 ) {
SetPlayerChatBubble( i, "[ P|DEVELOPER ]", GLAVNA, 40.0, 10000);
}
else if( PlayerInfo[ i ][ xSkriptaRank ] == 3 ) {
SetPlayerChatBubble( i, "[ MAPER ]", GLAVNA, 40.0, 10000);
}
else if( PlayerInfo[ i ][ xSkriptaRank ] == 6 ) {
SetPlayerChatBubble( i, "[ SUVLASNIK ]", GLAVNA, 40.0, 10000);
}
else if( PlayerInfo[ i ][ xSkriptaRank ] == 7 ) {
SetPlayerChatBubble( i, "[ SARADNIK ]", GLAVNA, 40.0, 10000);
}
else if( PlayerInfo[ i ][ xSkriptaRank ] == 8 ) {
SetPlayerChatBubble( i, "[ VLASNICA ]", GLAVNA, 40.0, 10000);
}
else if( PlayerInfo[ i ][ xSkriptaRank ] == 9 ) {
SetPlayerChatBubble( i, "[ DIREKTORKA ]", GLAVNA, 40.0, 10000);
}
else if( PlayerInfo[ i ][ xSkriptaRank ] == 10 ) {
SetPlayerChatBubble( i, "[ ADMINKA ]", GLAVNA, 40.0, 10000);
}
else if( PlayerInfo[ i ][ xSkriptaRank ] == 11 ) {
SetPlayerChatBubble( i, "[ DEVELOPER & MAPER ]", GLAVNA, 40.0, 10000);
}
else if( PlayerInfo[ i ][ xAdmin ] == 7 ) {
SetPlayerChatBubble( i, "[ VLASNIK ]", GLAVNA, 40.0, 10000);
}
else if( PlayerInfo[ i ][ xAdmin ] == 6 ) {
SetPlayerChatBubble( i, "[ DIREKTOR ]", GLAVNA, 40.0, 10000);
}
else if( PlayerInfo[ i ][ xAdmin ] == 5 ) {
SetPlayerChatBubble( i, "[ HEAD ADMIN ]", GLAVNA, 40.0, 10000);
}
else if( PlayerInfo[ i ][ xAdmin ] <= 4 && PlayerInfo[ i ][ xAdmin ] >= 1 ) {
SetPlayerChatBubble( i, "[ ADMIN ]", GLAVNA, 40.0, 10000);
}
else if( PlayerInfo[ i ][ xSupp ] == 3 ) {
SetPlayerChatBubble( i, "[ S-MENAGER ]", SUPPBOJA, 40.0, 10000);
}
else if( PlayerInfo[ i ][ xSupp ] == 2 ) {
SetPlayerChatBubble( i, "[ Z/S-MENAGER ]", SUPPBOJA, 40.0, 10000);
}
else if( PlayerInfo[ i ][ xSupp ] == 1 ) {
SetPlayerChatBubble( i, "[ SUPPORTER ]", SUPPBOJA, 40.0, 10000);
}
else if( PlayerInfo[ i ][ xVIPLevel ] >= 1 && PlayerInfo[ i ][ xWanted ] == 0 ) {
SetPlayerChatBubble( i, "[ VIP ]", 0x00FF00FF, 40.0, 10000);
if( PlayerInfo[ i ][ xVIPLevel ] >= 5 && !PlayerInfo[ i ][ xDBO ] ) {
SetPlayerColor( i, 0x00FF0000 );
}
}
else if( PlayerInfo[ i ][ xPromoter ] == 1 ) {
SetPlayerChatBubble( i, "[ PROMOTER ]", GLAVNA, 40.0, 10000);
}
else if( PlayerInfo[ i ][ xLevel ] == 1 ) {
SetPlayerChatBubble( i, "[ NOVAJLIJA ]", GLAVNA, 40.0, 10000);
}
}
if( PlayerInfo[ i ][ xMute ] != 0 ) {
PlayerInfo[ i ][ xMute ]--;
if( PlayerInfo[ i ][ xMute ] <= 0 ) {
PlayerInfo[ i ][ xMute ] = 0;
}
}
if( VremeZaNovac[ i ] != 0 ) {
VremeZaNovac[ i ]--;
if( VremeZaNovac[ i ] == 0 ) {
SendClientMessageEx( i, NARACRVENA, "Preziveli ste 2 minuta i dobili %d$.", PljackaNovac[ i ] );
DajIgracuNovac( i, PljackaNovac[ i ] );
PljackaNovac[ i ] = 0;
}
}
if( VremeZaZlato[ i ] != 0 ) {
VremeZaZlato[ i ]--;
if( VremeZaZlato[ i ] == 0 ) {
SendClientMessageEx( i, NARACRVENA, "Preziveli ste 2 minuta i dobili %dg zlata.", PljackaZlato[ i ] );
PlayerInfo[ i ][ xZlato ] += PljackaZlato[ i ];
SavePlayer( i );
PljackaZlato[ i ] = 0;
UpdateZlatoTD( i );
}
}
if( Polaganje[ i ] >= 1 ) {
if( IsPlayerInAnyVehicle( i ) ) {
if( GetSpeed( i ) > 100 ) {
GreskaVoznja[ i ]++;
SCM( i, -1, ""col_orange": "col_white"Prekoracili ste brzinu od 100km/h na gradskoj voznji i dobili gresku!");
if( GreskaVoznja[ i ] == 3 ) {
Polaganje[ i ] = 0;
GreskaVoznja[ i ] = 0;
Muma_DisablePlayerCheckpoint( i );
Muma_RemovePlayerFromVehicle( i );
SCM( i, -1, ""col_orange": "col_white"Pali ste na vozackom ispitu jer ste prekoracili brzinu od 100km/h 3 puta!");
SetVehicleToRespawn( GetPlayerVehicleID( i ) );
}
}
}
}
if( IsPlayerInAnyVehicle( i ) && GetPlayerState( i ) == PLAYER_STATE_DRIVER && GetSpeed( i ) > 10 ) {
new autoid = ScriptIDVozila[ GetPlayerVehicleID( i ) ];
if( autoid != -1 ) {
VehicleInfo[ autoid ][ vMetri ] += ( GetSpeed( i )*10 )/36;
if( VehicleInfo[ autoid ][ vMetri ] > 999 ) {
VehicleInfo[ autoid ][ vKilometri ]++;
VehicleInfo[ autoid ][ vMetri ] = 0;
}
}
}
if( ReportGlobal[ i ] > 0 ) ReportGlobal[ i ]--;
if( VIPPort[ i ] > 0 ) VIPPort[ i ]--;
if( PromoterPort[ i ] > 0 ) PromoterPort[ i ]--;
if( PomocGlobal[ i ] > 0 ) PomocGlobal[ i ]--;
if( NewGlobal[ i ] > 0 ) NewGlobal[ i ]--;
if( antiCheatCS[ i ][ SpamChat ] > 0 ) antiCheatCS[ i ][ SpamChat ]--;
if( antiCheatCS[ i ][ SpamCommand ] > 0 ) antiCheatCS[ i ][ SpamCommand ]--;
if( DropedGun[ i ] > 0 ) DropedGun[ i ]--;
CarDamageTimer( i );
CheckWeapons( i );
CheckTeleports( i );
DrugCheck( i );
AntiCheat( i );
CellphoneCheck( i );
if( TrashLimit[ i ] != 0 ) {
TrashLimit[ i ]--;
}
if( Odbrojavanje[ i ] != 0 ) {
format( globalstring, sizeof( globalstring ), "~w~Pricekajte, Vreme: ~r~%d", Odbrojavanje[ i ] );
PlayerTextDrawSetString( i, PVreme[ i ], globalstring );
Odbrojavanje[ i ]--;
}
if( ( id = Boombox_Nearest(i)) != INVALID_PLAYER_ID && Boombox[ i ] != id && strlen (BoomboxInfo[ id ][ boomboxURL ] ) && !IsPlayerInAnyVehicle( i ) ) {
new str[ 128 ];
strunpack(str, BoomboxInfo[ id ][ boomboxURL ] );
Boombox[ i ] = id;
StopAudioStreamForPlayer( i );
PlayAudioStreamForPlayer( i, str, BoomboxInfo[ id ][ boomboxPos ][ 0 ], BoomboxInfo[ id ][ boomboxPos ][ 1 ], BoomboxInfo[ id ][ boomboxPos ][ 2 ], 30.0, 1);
}
else if( Boombox[ i ] != INVALID_PLAYER_ID && !IsPlayerInRangeOfPoint( i, 30.0, BoomboxInfo[ Boombox[ i ] ][ boomboxPos ][ 0 ], BoomboxInfo[ Boombox[ i ] ][ boomboxPos ][ 1 ], BoomboxInfo[ Boombox[ i ] ][ 2 ] ) ) {
Boombox[ i ] = INVALID_PLAYER_ID;
StopAudioStreamForPlayer(i);
}
if( PlayerInfo[ i ][ xLevel ] < 3 ){
for( new g = 0; g < 13; g++) {
new sweapon, sammo;
GetPlayerWeaponData( i, g, sweapon, sammo );
if( sweapon != 0 && sammo != 0 ) {
ResetAllWeapons( i );
GameTextForPlayer( i, "~w~Ti si Level 1-2 ne mozes~n~~b~posedovati oruzje!", 5000, 3 );
format( globalstring, sizeof( globalstring ), "IG-AC // Oruzje || %s[ID: %d] | Level manji od 3 !", ImeIgraca( i ), i );
AdminPoruka( ANTICHEAT, globalstring );
}
}
}
if( IsPlayerInRangeOfPoint( i, 3.0, 1314.77600, -896.79431, 40.31615 ) ) {
if( RodaDoor == false ) {
MoveDynamicObject( rodavrata1, 1311.9136, -896.79431, 40.31615, 2.00 );
MoveDynamicObject( rodavrata2, 1319.3617, -896.77997, 40.31615, 2.00 );
SetTimer( "RodaDoorClose", 3000, 0 );
RodaDoor = true;
}
}
if( GetPlayerSurfingVehicleID( i ) != INVALID_VEHICLE_ID &&
!AdminDuty[ i ] &&
GetSpeed( i ) > 50 &&
!IsVehicleBrod( GetPlayerSurfingVehicleID( i ) ) &&
GetVehicleModel( GetPlayerSurfingVehicleID( i ) ) != 406 &&
GetVehicleModel( GetPlayerSurfingVehicleID( i ) ) != 422 &&
GetVehicleModel( GetPlayerSurfingVehicleID( i ) ) != 433 ) {
new Float:slx, Float:sly, Float:slz;
GetPlayerPos( i, slx, sly, slz );
SetPlayerPos( i, slx, sly, slz+5 );
SCM( i, SVETLOCRVENA, "IG-AC // Slapovan si jer je zabranjeno voziti se na autu!");
}
}
return 1;
}task SyncTime()
{
new tmphour,
tmpminute,
tmpsecond,
year,
month,
day,
stringicc[ 30 ];
getdate( year, month, day );
gettimeEx( tmphour, tmpminute, tmpsecond );
FixHour( tmphour );
tmphour = shifthour;
format( stringicc, sizeof( stringicc ), "%s%d:%s%d:%s%d~n~~w~%d/%d/%d", (tmphour < 10) ? ("0") : (""), tmphour, (tmpminute < 10) ? ("0") : (""), tmpminute, (tmpsecond < 10) ? ("0") : (""), tmpsecond, day, month, year );
TextDrawSetString( IGGLAVNI[ 28 ], stringicc );
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( VremeZatvaranjaCelija > -1 ) {
VremeZatvaranjaCelija--;
if( VremeZatvaranjaCelija == 0 ) {
UpravljanjeCelijama( false );
}
}
if( tmpminute == 60 || tmpminute == 0 ) {
SetTimer( "RespawnCallGlobal", 60000, false );
SCMA( 0x86C6DBAA, " Server je automatski aktivirao respawn svih vozila!" );
SCMA( 0x86C6DBAA, " Vozila ce biti respawnovana za 60 sekundi." );
}
if( ( tmphour > ghour ) || ( tmphour == 0 && ghour == 23 ) ) {
format( globalstring, sizeof( globalstring ), ""col_white"Hvala vam sto igrate na "col_server"Insanity Gaming "col_white"serveru, trenutno je "col_server"%d:00 "col_white"sati.", tmphour );
OOCNews( BELA, globalstring );
ghour = tmphour;
if( tmphour == 21 ) {
SetWeather( 10 );
}
if( realtime ) {
SetWorldTime( tmphour );
ServerInfo[ VremeInGame ] = tmphour;
}
DinamicWeather( );
for( new i = 1; i < MAX_GZONE; i++ ) {
if( gZoneInfo[ i ][ gZoneGangID ] != -1 ) {
OI[ gZoneInfo[ i ][ gZoneGangID ] ][ oSafeMoney ] += 200;
SaveOrganization( gZoneInfo[ i ][ gZoneGangID ] );
}
}
UpravljanjeCelijama( true );
VremeZatvaranjaCelija = 10;
SetTimerEx( "IzvlacenjeKuglica", 3000, false, "d", 1 );
for( new f = 0; f < MAX_GOBJ; f++ ) {
if( IsValidDynamicObject( dGunData[ f ][ gObjID ] ) )
DestroyDynamicObject( dGunData[ f ][ gObjID ] );
dGunData[ f ][ ObjPos ][ 0 ] = 0.0;
dGunData[ f ][ ObjPos ][ 1 ] = 0.0;
dGunData[ f ][ ObjPos ][ 2 ] = 0.0;
dGunData[ f ][ gObjID ] = -1;
dGunData[ f ][ ObjData ][ 0 ] = 0;
dGunData[ f ][ ObjData ][ 1 ] = 0;
}
IzvuciRezultateKladionica( );
foreach( Player, playerid ) {
new bool:tiket = false;
if( KladionicaListic[ playerid ][ Uplaceno ] && !KladionicaListic[ playerid ][ Zavrseno ] ) {
for( new i = 0; i < 10; i++ ) {
if( KladionicaListic[ playerid ][ keciksdva ][ i ] != -1 ) {
if( Parovi[ KladionicaListic[ playerid ][ parID ][ i ] ][ Rezultat ][ 2 ] == KladionicaListic[ playerid ][ keciksdva ][ i ] ) {
tiket = true;
}
else if( Parovi[ KladionicaListic[ playerid ][ parID ][ i ] ][ Rezultat ][ 2 ] != KladionicaListic[ playerid ][ keciksdva ][ i ] ) {
tiket = false;
break;
}
}
}
}
if( tiket == true ) {
KladionicaListic[ playerid ][ Status ] = true;
KladionicaListic[ playerid ][ Zavrseno ] = true;
KladionicaListic[ playerid ][ Uplaceno ] = true;
SaveKladionica( playerid );
}
else if( tiket == false ) {
KladionicaListic[ playerid ][ Status ] = false;
KladionicaListic[ playerid ][ Uplaceno ] = true;
KladionicaListic[ playerid ][ Zavrseno ] = true;
SaveKladionica( playerid );
}
}
PostaviParoveKladionica( );
}
foreach( Player, i ) {
AFKCheck( i );
PayCheck( i );
CheckGas( i );
OtherCheck( i );
if( PlayerInfo[ i ][ xWanted ] != 0 && GetPlayerInterior( i ) == 0 && GetPlayerVirtualWorld( i ) == 0 ) {
MinutiIgraca[ i ]++;
if( MinutiIgraca[ i ] == 6 ) {
MinutiIgraca[ i ] = 0;
PlayerInfo[ i ][ xWanted ]--;
Muma_SetPlayerWantedLevel( i, PlayerInfo[ i ][ xWanted ] );
if( PlayerInfo[ i ][ xWanted ] == 0 ) {
strmid( ZlocinInfo[ i ][ zPrijavio ], "Nema", 0, strlen("Nema"), 255 );
strmid( ZlocinInfo[ i ][ zPocinio ], "Nema", 0, strlen("Nema"), 255 );
strmid( ZlocinInfo[ i ][ zZlocin ], "Nema", 0, strlen("Nema"), 255 );
}
}
}
if( PlayerInfo[ i ][ xPljackaVreme ] != 0 ) {
PlayerInfo[ i ][ xPljackaVreme ]--;
}
if( PlayerInfo[ i ][ xHangarTime ] != 0 ) {
PlayerInfo[ i ][ xHangarTime ]--;
}
if( PlayerInfo[ i ][ xZauzimanjeVreme ] != 0 ) {
PlayerInfo[ i ][ xZauzimanjeVreme ]--;
}
if( PlayerInfo[ i ][ xSvercer ] != 0 ) {
PlayerInfo[ i ][ xSvercer ]--;
}
if( PlayerInfo[ i ][ xZatvor ] == OBICAN_ZATVOR ) {
if( VremeZatvaranjaCelija == 2 && OtvoreneCelije == true ) {
SCM( i, SVETLOCRVENA, "ZATVOR | Celije se zatvaraju za 2 minuta, udjite u celije ili cete biti kaznjeni!");
}
else if( VremeZatvaranjaCelija == 1 && OtvoreneCelije == true ) {
SCM( i, SVETLOCRVENA, "ZATVOR | Celije se zatvaraju za 1 minut, udjite u celije ili cete biti kaznjeni!");
}
else if( VremeZatvaranjaCelija == 0 && OtvoreneCelije == false ) {
if( IsPlayerInCell( i ) ) {
SCM( i, SVETLOCRVENA, "ZATVOR | Celije su se zatvorile!");
}
else if( !IsPlayerInCell( i ) ) {
SCM( i, SVETLOCRVENA, "ZATVOR | Celije su se zatvorile, ostali ste van celija i dobili 10 minuta dodatne kazne!");
PlayerInfo[ i ][ xZatvorVreme ] += 10;
new rand = random( sizeof( RandomZatvor ) );
Muma_SetPlayerPos( i, RandomZatvor[ rand ][ 0 ], RandomZatvor[ rand ][ 1 ],RandomZatvor[ rand ][ 2 ] );
SetTimerEx( "SlobodnoSada", 4000, false, "i", i );
GameTextForPlayer( i, "Ucitavanje ...", 1000, 4 );
TogglePlayerControllable( i, false );
SetCameraBehindPlayer( i );
SetPlayerInterior( i, 0 );
SetPlayerVirtualWorld( i, 0 );
}
}
}
}
return 1;
}Neke slike/video za lakse dobivanje pomoci(neobavezno): Ako vam jos nesto treba, napisite 🙂


