Kreiranje Aktora

Započeo dazer
5. Dec. 2018. Zaključano
860
pregleda
8
postova
Miki11
5
Crime Lord
5. Dec. 2018.
Problem(error/warning): Napravio sam sistem da se IG za zonu prave aktori, i sada kada se klikne LMB( levi klik misa ) na kojem je stavljeno kreiranje ne desi se nista
Dio skripte:
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}))" );
}
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}))" );
}
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}))" );
}
        }

Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log):
//

Slika/video ingame problema(obavezno ako je ingame problem): KLIK( ovdje se vidi kako se koristi LMB,a ne kreira nista )
Miki11
5
Crime Lord
6. Dec. 2018.
*BUMP*

Da li zna netko hitno je..
Miki11
5
Crime Lord
8. Dec. 2018.
*BUMP*
BoZZMapper
3
Wheel Man
8. Dec. 2018.
@Bašovski @Ino42O oni bi znali..
Arsenijevic
2
Wheel Man
8. Dec. 2018.
@muma.  ako znas pomozi coveku 😎 😎
Ivan_Ino
5
Kingpin
8. Dec. 2018.
S mobitela gledam pa mi je nezgodno vidjeti sta je, vidim samo puno ponavljanja istog koda, debugiraj vrijednosti variably

gZoneInfo[ id ][ gZoneActorSkins ][ 1 ],
ActorPos[ id ][ 1 ][ 0 ],
ActorPos[ id ][ 1 ][ 1 ],
ActorPos[ id ][ 1 ][ 2 ],
ActorPos[ id ][ 1 ][ 3 ]
RahimPAWNO
5
OG Legend
9. Dec. 2018.
Moras negdje te varijable oznaciti sa INVALID_ACTOR_ID, OnGameModeInit ili na samoj deklaraciji
Miki11
5
Crime Lord
10. Dec. 2018.
Bašovski wrote on December 9, 2018, 8:32 am:
Moras negdje te varijable oznaciti sa INVALID_ACTOR_ID, OnGameModeInit ili na samoj deklaraciji
Mos malo pojsnit to

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha