Dio skripte:
if( CreatingGZone[ playerid ] == 1 ) {
new Float:Pos[ 3 ];
GetPlayerPos( playerid, Pos[ 0 ], Pos[ 1 ], Pos[ 2 ] );
CreatingPos[ playerid ][ 0 ] = Pos[ 0 ];
CreatingPos[ playerid ][ 1 ] = Pos[ 1 ];
SendInfoMessage( playerid, "Koristi "col_server"LMB"col_white" da postavis pozicije. {0072FF}))" );
SendInfoMessage( playerid, "Sada sacuvaj poziciju desnog gornjeg ugla polja. {0072FF}))" );
CreatingGZone[ playerid ]++;
}
else if( CreatingGZone[ playerid ] == 2 ) {
new Float:Pos[ 4 ];
new id = CreatingGZoneID[ playerid ];
if( id == -1 ) return SendErrorMessage( playerid, "Vec ima maksimalni broj gang zona. {FF0000}))" );
GetPlayerPos( playerid, Pos[ 0 ], Pos[ 1 ], Pos[ 2 ] );
GetPlayerFacingAngle( playerid, Pos[ 3 ] );
CreatingPos[ playerid ][ 2 ] = Pos[ 0 ];
CreatingPos[ playerid ][ 3 ] = Pos[ 1 ];
CreatingGZone[ playerid ]++;
GZone_Reset( id );
if( CreatingPos[ playerid ][ 0 ] > CreatingPos[ playerid ][ 2 ] ) {
gZoneInfo[ id ][ gZoneMaxX ] = CreatingPos[ playerid ][ 0 ];
gZoneInfo[ id ][ gZoneMinX ] = CreatingPos[ playerid ][ 2 ];
}
else if( CreatingPos[ playerid ][ 2 ] > CreatingPos[ playerid ][ 0 ] ) {
gZoneInfo[ id ][ gZoneMaxX ] = CreatingPos[ playerid ][ 2 ];
gZoneInfo[ id ][ gZoneMinX ] = CreatingPos[ playerid ][ 0 ];
}
if( CreatingPos[ playerid ][ 1 ] > CreatingPos[ playerid ][ 3 ] ) {
gZoneInfo[ id ][ gZoneMaxY ] = CreatingPos[ playerid ][ 1 ];
gZoneInfo[ id ][ gZoneMinY ] = CreatingPos[ playerid ][ 3 ];
}
else if( CreatingPos[ playerid ][ 3 ] > CreatingPos[ playerid ][ 1 ] ) {
gZoneInfo[ id ][ gZoneMaxY ] = CreatingPos[ playerid ][ 3 ];
gZoneInfo[ id ][ gZoneMinY ] = CreatingPos[ playerid ][ 1 ];
}
gZoneInfo[ id ][ gZoneID ] = GangZoneCreate( gZoneInfo[ id ][ gZoneMinX ], gZoneInfo[ id ][ gZoneMinY ], gZoneInfo[ id ][ gZoneMaxX ], gZoneInfo[ id ][ gZoneMaxY ] );
gZoneInfo[ id ][ gZoneRectAngle ] = CreateDynamicRectangle( gZoneInfo[ id ][ gZoneMinX ], gZoneInfo[ id ][ gZoneMinY ], gZoneInfo[ id ][ gZoneMaxX ], gZoneInfo[ id ][ gZoneMaxY ], -1, -1, -1 );
SendInfoMessage( playerid, "Koristi "col_server"LMB"col_white" da postavis pozicije. {0072FF}))" );
SendInfoMessage( playerid, "Sada sacuvaj poziciju za pickup i text. {0072FF}))" );
}
else if( CreatingGZone[ playerid ] == 3 ) {
new Float:Pos[ 3 ];
GetPlayerPos( playerid, Pos[ 0 ], Pos[ 1 ], Pos[ 2 ] );
CreatingGZone[ playerid ]++;
new id = IsCordsInGZone( CreatingGZoneID[ playerid ], Pos[ 0 ], Pos[ 1 ] );
if( id != CreatingGZoneID[ playerid ] ) return SendErrorMessage( playerid, "Moras sacuvati u zoni koju kreiras. {FF0000}))" );
gZoneInfo[ id ][ gZonePickupPos ][ 0 ] = Pos[ 0 ];
gZoneInfo[ id ][ gZonePickupPos ][ 1 ] = Pos[ 1 ];
gZoneInfo[ id ][ gZonePickupPos ][ 2 ] = Pos[ 2 ];
SPD( playerid, dialog_AKTOR_SKIN, DSI, "Aktori", "Unesite ID-ove skinova koje ce nositi aktori:\nMorate unijeti 3 ID-a.", "Unesi", "" );
}
else if( CreatingGZone[ playerid ] == 4 ) {
new id = CreatingGZoneID[ playerid ];
if( id == -1 ) return SendErrorMessage( playerid, "Vec ima maksimalni broj gang zona. {FF0000}))" );
new Float:Pos[ 4 ];
GetPlayerPos( playerid, Pos[ 0 ], Pos[ 1 ], Pos[ 2 ] );
GetPlayerFacingAngle( playerid, Pos[ 3 ] );
if(!IsValidActor(gZoneInfo[ id ][ gZoneActor ][ 0 ]) || ActorPos[ id ][ 0 ][ 0 ] == 0.00) {
GetPlayerPos(
playerid,
ActorPos[ id ][ 0 ][ 0 ],
ActorPos[ id ][ 0 ][ 1 ],
ActorPos[ id ][ 0 ][ 2 ]
);
GetPlayerFacingAngle( playerid, ActorPos[ id ][ 0 ][ 3 ] );
gZoneInfo[ id ][ gZoneActor ][ 0 ] = CreateActor( gZoneInfo[ id ][ gZoneActorSkins ][ 0 ],
ActorPos[ id ][ 0 ][ 0 ],
ActorPos[ id ][ 0 ][ 1 ],
ActorPos[ id ][ 0 ][ 2 ],
ActorPos[ id ][ 0 ][ 3 ]
);
gZoneInfo[ id ][ ActorAlive ][ 0 ] = true;
SendInfoMessage( playerid, "Kreiran prvi aktor, preostala jos: 2. {0072FF}))" );
}
else if(!IsValidActor(gZoneInfo[ id ][ gZoneActor ][ 1 ]) || ActorPos[ id ][ 1 ][ 0 ] == 0.00) {
GetPlayerPos(
playerid,
ActorPos[ id ][ 1 ][ 0 ],
ActorPos[ id ][ 1 ][ 1 ],
ActorPos[ id ][ 1 ][ 2 ]
);
GetPlayerFacingAngle( playerid, ActorPos[ id ][ 1 ][ 3 ] );
gZoneInfo[ id ][ gZoneActor ][ 1 ] = CreateActor( gZoneInfo[ id ][ gZoneActorSkins ][ 1 ],
ActorPos[ id ][ 1 ][ 0 ],
ActorPos[ id ][ 1 ][ 1 ],
ActorPos[ id ][ 1 ][ 2 ],
ActorPos[ id ][ 1 ][ 3 ]
);
gZoneInfo[ id ][ ActorAlive ][ 1 ] = true;
SendInfoMessage( playerid, "Kreiran drugi aktor, preostalo: 1. {0072FF}))" );
}
else if(!IsValidActor(gZoneInfo[ id ][ gZoneActor ][ 2 ]) || ActorPos[ id ][ 2 ][ 0 ] == 0.00) {
GetPlayerPos(
playerid,
ActorPos[ id ][ 2 ][ 0 ],
ActorPos[ id ][ 2 ][ 1 ],
ActorPos[ id ][ 2 ][ 2 ]
);
GetPlayerFacingAngle( playerid, ActorPos[ id ][ 2 ][ 3 ] );
gZoneInfo[ id ][ gZoneActor ][ 2 ] = CreateActor( gZoneInfo[ id ][ gZoneActorSkins ][ 2 ],
ActorPos[ id ][ 2 ][ 0 ],
ActorPos[ id ][ 2 ][ 1 ],
ActorPos[ id ][ 2 ][ 2 ],
ActorPos[ id ][ 2 ][ 3 ]
);
gZoneInfo[ id ][ ActorAlive ][ 2 ] = true;
gZoneInfo[ id ][ gZoneTaken ] = false;
gZoneInfo[ id ][ gZoneTakeable ] = true;
gZoneInfo[ id ][ gZoneTime ] = 0;
gZoneInfo[ id ][ gZonePickup ] = CreateDynamicPickup( 1313, 1, gZoneInfo[ id ][ gZonePickupPos ][ 0 ], gZoneInfo[ id ][ gZonePickupPos ][ 1 ], gZoneInfo[ id ][ gZonePickupPos ][ 2 ], 0, 0 );
gZoneInfo[ id ][ gZone3D ] = CreateDynamic3DTextLabel( ""col_white"[ TERITORIJA ]\nTeritorija je "col_server"slobodna"col_green"\nMozete"col_white" pokrenuti zauzimanje teritorije", BELA, gZoneInfo[ id ][ gZonePickupPos ][ 0 ], gZoneInfo[ id ][ gZonePickupPos ][ 1 ], gZoneInfo[ id ][ gZonePickupPos ][ 2 ], 15.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, 0, 0 );
new stringic[ 24 ];
format( stringic, sizeof( stringic ), "0x%s66", gZoneInfo[ id ][ gZoneColor ] );
GangZoneShowForAll( gZoneInfo[ id ][ gZoneID ], HexToInt( stringic ) );
sql_create_gangzone( id );
CreatingGZone[ playerid ] = -1;
CreatingGZoneID[ playerid ] = -1;
SendInfoMessage( playerid, "Svi aktori kreirani. {0072FF}))" );
SendInfoMessage( playerid, "Uspjesno ste kreirali Gang Zonu. {0072FF}))" );
}
}
//TU JE DIALOG ZA SETANJE SKINOVA AKTORIMA
else if( dialogid == dialog_AKTOR_SKIN ) {
new skin[ 3 ];
if( sscanf( inputtext, "iii", skin,skin,skin ) ) return SPD( playerid, dialog_AKTOR_SKIN, DSI, "Aktori", "Unesite ID-ove skinova koje ce nositi aktori:\nMorate unijeti 3 ID-a.", "Unesi", "" );
new id = CreatingGZoneID[ playerid ];
if( id == -1 ) return SendErrorMessage( playerid, "Vec ima maksimalni broj gang zona. {FF0000}))" );
CreatingGZone[ playerid ]++;
gZoneInfo[ id ][ gZoneActorSkins ] = skin;
gZoneInfo[ id ][ gZoneActorSkins ] = skin;
gZoneInfo[ id ][ gZoneActorSkins ] = skin;
SendInfoMessage( playerid, "Sada koristite "col_server"LMB"col_white" da postavite poziciju aktora. {0072FF}))" );
SendInfoMessage( playerid, "Postoje 3 aktora, njima se seta vasa pozicija. {0072FF}))" );
}Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log):
//Slika/video ingame problema(obavezno ako je ingame problem): KLIK
