FCNPC ~ MW

Započeo noddy_, Oktobar 18, 2021, 16:28:55 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Problem(error/warning): No errors no warnings, vec pljacka vojnog broda na MW modu ne radi, tj ja koliko god puta puco vojnike ne krecu se pa tako ni aimaju na mene ni pucaju...
Deo skripte:
[pawn]
forward npcNapadni( playerid, id );
public npcNapadni( playerid, id )
{
   if( NPC_ENUM[ id ][ npcNapada ] != INVALID_PLAYER_ID || NPC_ENUM[ id ][ npcMrtav ] != 0 || IsPlayerNPC( playerid ) || GetFactionType( playerid ) == ORG_TIP_PD ) return 1;
   switch( id )
   {
      case 0: {
         NPC_ENUM[ 0 ][ npcNapada ] = playerid;
         npcPuca[ playerid ] = 0;
         FCNPC_StopPlayingPlayback( NPC_ENUM[ 0 ][ npcID ] );
         FCNPC_ClearAnimations( NPC_ENUM[ 0 ][ npcID ] );
         FCNPC_AimAtPlayer( NPC_ENUM[ 0 ][ npcID ], playerid, true, -1, true, 0.0, 0.0, 0.0 );
      }
      case 1,2,3,4,6,7: {
         NPC_ENUM[ id ][ npcNapada ] = playerid;
         npcPuca[ playerid ] = id;
         FCNPC_ClearAnimations( NPC_ENUM[ id ][ npcID ] );
         FCNPC_AimAtPlayer( NPC_ENUM[ id ][ npcID ], playerid, true, -1, true, 0.0, 0.0, 0.0 );
      }
   }
   return 1;
}

public FCNPC_OnTakeDamage( npcid, issuerid, Float:amount, weaponid, bodypart )
{
   if( npcid == TrainDriverNPC ) return 0;
   if( IsPlayerNPC( issuerid ) ) return 0;
   
   if( npcid == NPC_ENUM[ 0 ][ npcID ] ) {
      if( !IsPlayerInDynamicArea( issuerid, brodrob ) ) return 0;
      if( PlayerInfo[ issuerid ][ xClan ] != brodorg ) return 0;
      if( NPC_ENUM[ 0 ][ npcNapada ] == INVALID_PLAYER_ID ) npcNapadni( issuerid, 0 );
   }
   else if( npcid == NPC_ENUM[ 1 ][ npcID ] ) {
      if( !IsPlayerInDynamicArea( issuerid, brodrob ) ) return 0;
      if( PlayerInfo[ issuerid ][ xClan ] != brodorg ) return 0;
      if( NPC_ENUM[ 1 ][ npcNapada ] == INVALID_PLAYER_ID ) npcNapadni( issuerid, 1 );
   }
   else if( npcid == NPC_ENUM[ 2 ][ npcID ] ) {
      if( !IsPlayerInDynamicArea( issuerid, brodrob ) ) return 0;
      if( PlayerInfo[ issuerid ][ xClan ] != brodorg ) return 0;
      if( NPC_ENUM[ 2 ][ npcNapada ] == INVALID_PLAYER_ID ) npcNapadni( issuerid, 2 );
   }
   else if( npcid == NPC_ENUM[ 3 ][ npcID ] ) {
      if( !IsPlayerInDynamicArea( issuerid, brodrob ) ) return 0;
      if( PlayerInfo[ issuerid ][ xClan ] != brodorg ) return 0;
      if( NPC_ENUM[ 3 ][ npcNapada ] == INVALID_PLAYER_ID ) npcNapadni( issuerid, 3 );
   }
   else if( npcid == NPC_ENUM[ 4 ][ npcID ] ) {
      if( !IsPlayerInDynamicArea( issuerid, brodrob ) ) return 0;
      if( PlayerInfo[ issuerid ][ xClan ] != brodorg ) return 0;
      if( NPC_ENUM[ 4 ][ npcNapada ] == INVALID_PLAYER_ID ) npcNapadni( issuerid, 4 );
   }
   else if( npcid == NPC_ENUM[ 5 ][ npcID] && PlayerInfo[ issuerid ][ xClan ] != brodorg ) {
   
      if( !IsPlayerInDynamicArea( issuerid, brodrob ) ) return 0;
      return 0;
   }
   else if( npcid == NPC_ENUM[ 6 ][ npcID ] ) {
      if( !IsPlayerInDynamicArea( issuerid, vhangar ) ) return 0;
      if( GetFactionType( issuerid ) != ORG_TIP_BANDA ) return 0;
      if( NPC_ENUM[ 6 ][ npcNapada ] == INVALID_PLAYER_ID ) npcNapadni( issuerid, 6 );
   }
   else if( npcid == NPC_ENUM[ 7 ][ npcID ] ) {
      if( !IsPlayerInDynamicArea( issuerid, vhangar ) ) return 0;
      if( GetFactionType( issuerid ) != ORG_TIP_BANDA ) return 0;
      if( NPC_ENUM[ 7 ][ npcNapada ] == INVALID_PLAYER_ID ) npcNapadni( issuerid, 7 );
   }

   return 1;
}

[/pawn]
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): HVALA LIPA
Poslednja Izmena: Oktobar 20, 2021, 23:56:31 POSLE PODNE od M Ө M Σ N Z I
SPEED HACK (C++) https://github.com/nouddy/samp-speed-hack
Reliant GameMode (open.mp) https://github.com/nouddy/reliant-omp
SA:MP Landing Page https://github.com/nouddy/samp-landing-page


Kolko drama ima u 7 grama

Nisam siguran, ali mislim da bi od oka ovo trebalo da ide npcPuca[ playerid ] = 0; npcPuca[ playerid ] = id;

ili mora tako da ide za ID 0 NPC.  ::)
You'll be always in my heart, the end and thanks for amazing times. #WeAreLords

Citat: Hydra. poslato Oktobar 18, 2021, 17:06:28 POSLE PODNE
Nisam siguran, ali mislim da bi od oka ovo trebalo da ide npcPuca[ playerid ] = 0; npcPuca[ playerid ] = id;

ili mora tako da ide za ID 0 NPC.  ::)
Isto izbaci, evo ti sta meni ispise u logu
[pawn]
17:03:18] [FCNPC] Error: Incorrect parameter count for function 'FCNPC_AimAtPlayer'. 12 != 13.
[/pawn]
SPEED HACK (C++) https://github.com/nouddy/samp-speed-hack
Reliant GameMode (open.mp) https://github.com/nouddy/reliant-omp
SA:MP Landing Page https://github.com/nouddy/samp-landing-page


Kolko drama ima u 7 grama

Citat: ᴅ ɪ ɴ ᴏ poslato Oktobar 18, 2021, 17:08:12 POSLE PODNE
Isto izbaci, evo ti sta meni ispise u logu
[pawn]
17:03:18] [FCNPC] Error: Incorrect parameter count for function 'FCNPC_AimAtPlayer'. 12 != 13.
[/pawn]

Moras imati sve parametre tocne.

native FCNPC_AimAtPlayer(npcid, playerid, bool:shoot = false, shoot_delay = -1, bool:set_angle = true, Float:offset_x = 0.0, Float:offset_y = 0.0, Float:offset_z = 0.0, Float:offset_from_x = 0.0, Float:offset_from_y = 0.0, Float:offset_from_z = 0.0, between_check_mode = FCNPC_ENTITY_MODE_AUTO, between_check_flags = FCNPC_ENTITY_CHECK_ALL);
You'll be always in my heart, the end and thanks for amazing times. #WeAreLords

Citat: Hydra. poslato Oktobar 18, 2021, 17:13:33 POSLE PODNE
Moras imati sve parametre tocne.

native FCNPC_AimAtPlayer(npcid, playerid, bool:shoot = false, shoot_delay = -1, bool:set_angle = true, Float:offset_x = 0.0, Float:offset_y = 0.0, Float:offset_z = 0.0, Float:offset_from_x = 0.0, Float:offset_from_y = 0.0, Float:offset_from_z = 0.0, between_check_mode = FCNPC_ENTITY_MODE_AUTO, between_check_flags = FCNPC_ENTITY_CHECK_ALL);
Plugin verzija je bila problem, ali zato resetaju ko ludi a health ne opada, ali to samo smanjim u FCNPC opcijama.A tebi hvala na odvojenom vremenu!
SPEED HACK (C++) https://github.com/nouddy/samp-speed-hack
Reliant GameMode (open.mp) https://github.com/nouddy/reliant-omp
SA:MP Landing Page https://github.com/nouddy/samp-landing-page


Kolko drama ima u 7 grama