Bug sa health bar i armorom

Započeo Jeste i Bice
15. Jan. 2019.
1,012
pregleda
11
postova
Jeste i Bice
3
Wheel Man
15. Jan. 2019.
Problem(error/warning):Kada pucam drugog igraca skida mu se i hp i pancir u isto vreme
Dio skripte:Ne znam koji
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): /
Slika/video ingame problema(obavezno ako je ingame problem): https://youtu.be/4koqiZscYHA
RahimPAWNO
5
OG Legend
16. Jan. 2019.
Vjerovatno unutar OnPlayerTakeDamage smanjujes healthe, posalji citav callback
Jeste i Bice
3
Wheel Man
16. Jan. 2019.
Bašovski wrote on January 16, 2019, 1:11 pm:
Vjerovatno unutar OnPlayerTakeDamage smanjujes healthe, posalji citav callback

public OnPlayerTakeDamage( playerid, issuerid, Float:amount, weaponid, bodypart ) {

if( issuerid != INVALID_PLAYER_ID && issuerid != INVALID_PLAYER_ID && amount == 0 && weaponid == 0 && bodypart == 3 ) {
    format( globalstring, sizeof( globalstring ), "- {FFFFFF}Anticheat{FF0000} -"col_white" %s je kickovan sa servera. Razlog: "col_white"Command kill", ImeIgraca( issuerid ) );
AdminPoruka( SVETLOCRVENA, globalstring );
Kickovanje( issuerid, ""col_white"Ti si kickovan sa servera. Razlog: "col_srvboja"Command kill");
      return 0;
}

if( issuerid != INVALID_PLAYER_ID  ) {
if( OI[ PlayerInfo[ issuerid ][ xClan ] ][ oTip ] == ORG_TIP_PD && !IsPlayerInAnyVehicle( issuerid ) && !IsPlayerInAnyVehicle( playerid ) && GetWeapon( issuerid ) == 23 && ImaTazer[ issuerid ] == true && !AdminDuty[ playerid ] ) {
    if( GetFactionType( playerid ) == ORG_TIP_PD ) return SCM( issuerid, CRVENA, "Ne mozes tazovati PD!" );

new Float:Pos[ 3 ];
GetPlayerPos( playerid, Pos[ 0 ], Pos[ 1 ], Pos[ 2 ] );
if( IsPlayerInRangeOfPoint( issuerid, 6.0, Pos[ 0 ], Pos[ 1 ], Pos[ 2 ] ) ) {

format( globalstring, sizeof( globalstring ), "%s puca tazerom na %s-a i pogadja ga.", ImeIgraca( issuerid ), ImeIgraca( playerid ) );
PorukaRadius( 20.0, issuerid, globalstring, SIVA );
TogglePlayerControllable( playerid, false );

PlayerCuffed[ playerid ] = 1;
Traxx_SetPlayerHealth( playerid, 50 );
SetPVarInt( playerid, "CuffTimerCalled", 1 );
TazerTimer[ playerid ] = SetTimerEx("TazovanTajmer", 15000, false, "i", playerid );
OnePlayAnim( playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0 );
return 0;
}
        }
        if( NaDmEventu[ playerid ] == false && WARPInfo[ playerid ][ WARIgrac ] == -1 && !AdminDuty[ playerid ] && PlayerCuffed[ playerid ] == 0 ) {
        if( weaponid <= 42 ) {
        new Float:takeHealth = antiCheatCS[ playerid ][ TrueHealth ] - WeaponDamage[ weaponid ][ bodypart - 3 ];
        Traxx_SetPlayerHealth( playerid, takeHealth );
}
}

printf( "%s je naneo %.0f demidza %s-u, oruzje: %d, deo tela: %d", ImeIgraca( issuerid ), amount, ImeIgraca( playerid ), weaponid, bodypart );
}
return 1;
}

public TazovanTajmer( playerid ) {
if( PlayerCuffed[ playerid ] == 1 ) {

PlayerCuffed[ playerid ] = 0;
SetPVarInt( playerid, "CuffTimerCalled", 0 );
TogglePlayerControllable( playerid, true );
GameTextForPlayer( playerid, "~y~Tazer zavrsen", 5000, 3 );
ClearAnimations( playerid );
        Traxx_KillTimer( TazerTimer[ playerid ] );
}
return 1;
}
RahimPAWNO
5
OG Legend
18. Jan. 2019.
        if( NaDmEventu[ playerid ] == false && WARPInfo[ playerid ][ WARIgrac ] == -1 && !AdminDuty[ playerid ] && PlayerCuffed[ playerid ] == 0 ) {
        if( weaponid <= 42 ) {
        new Float:takeHealth = antiCheatCS[ playerid ][ TrueHealth ] - WeaponDamage[ weaponid ][ bodypart - 3 ];
        Traxx_SetPlayerHealth( playerid, takeHealth );
}
}


izbaci ovo
EnLokos
3
Hustler
18. Jan. 2019.
Bašovski wrote on January 18, 2019, 1:54 pm:
        if( NaDmEventu[ playerid ] == false && WARPInfo[ playerid ][ WARIgrac ] == -1 && !AdminDuty[ playerid ] && PlayerCuffed[ playerid ] == 0 ) {
        if( weaponid <= 42 ) {
        new Float:takeHealth = antiCheatCS[ playerid ][ TrueHealth ] - WeaponDamage[ weaponid ][ bodypart - 3 ];
        Traxx_SetPlayerHealth( playerid, takeHealth );
}
}


izbaci ovo


Nije moja tema , mozes li mi objasniti zasto to pravi problem ? (Nisam mnogo strucan oko toga u skripti)  ☹️
Nikola4
4
Made Man
18. Jan. 2019.
N_loccos wrote on January 18, 2019, 2:12 pm:
Nije moja tema , mozes li mi objasniti zasto to pravi problem ? (Nisam mnogo strucan oko toga u skripti)  ☹️
Traxx_SetPlayerHealth( playerid, takeHealth );
Vidis da mu tu poatavlja health (takeHealth) a gore je
new Float:takeHealth = antiCheatCS[ playerid ][ TrueHealth ] - WeaponDamage[ weaponid ][ bodypart - 3 ];
koje se poziva u tome gore prvom(SetPlayerHealth) i onda mu oduzme toliko i toliko healtha, ne znam kako nisi strucan u tom delu skripte kada je to obicno postavljanje healtha..
EnLokos
3
Hustler
18. Jan. 2019.
.варнинг wrote on January 18, 2019, 2:22 pm:
Traxx_SetPlayerHealth( playerid, takeHealth );
Vidis da mu tu poatavlja health (takeHealth) a gore je
new Float:takeHealth = antiCheatCS[ playerid ][ TrueHealth ] - WeaponDamage[ weaponid ][ bodypart - 3 ];
koje se poziva u tome gore prvom(SetPlayerHealth) i onda mu oduzme toliko i toliko healtha, ne znam kako nisi strucan u tom delu skripte kada je to obicno postavljanje healtha..


Nikad nisam radio taj deo skripte , ja znam da fixam errore , Upozorenja itd , eventualno neki bag , nikad se nisam fokusirao na "Rad na skripti" (da radim skriptu od 0le ili da ja licno skriptam nesto , ako me razumes ). Ja nemam zivaca za skriptanje , jer mi je mrsko da ucim da pisem kod , ali zato sam naucio da fixam mnogo toga xD , nikad nisam nista fixao nesto kao sto je na ovoj temi. Skoro sam poceo da skriptam od 0le , uradio Reg/Log i nisam se snasao bas najbolje , mozes videti temu gde pitam kako da fixam neku glupost. Nadam se da smo se razumeli , jer ja stvarno lose objasnjavam  😎

Hvala ti sto si mi objasnio
Jeste i Bice
3
Wheel Man
18. Jan. 2019.
Sad izbaci ovaj warning:
C:\Users\neman\Desktop\samp\BF MOD\bf - Copy\gamemodes\BFRPG.pwn(81873) : warning 203: symbol is never used: "WeaponDamage"
Pawn compiler 3.10.4 Copyright (c) 1997-2006, ITB CompuPhase

Header size:          30464 bytes
Code size:          9821452 bytes
Data size:        48830560 bytes
Stack/heap size:      16384 bytes; estimated max. usage=4030 cells (16120 bytes)
Total requirements:58698860 bytes

1 Warning.
// Definicija ostecena po oruzju i delu tela

new Float:WeaponDamage[ 43 ][ 7 ] = {
{2.0, 2.0, 2.0, 2.0, 2.0, 3.0, 10.0}, // Unarmed
{10.0, 15.0, 15.0, 22.0, 22.0, 22.0, 30.0},// Brass Knuckles
{15.0, 25.0, 5.0, 5.0, 7.0, 7.0, 35.0},// Golf Club
{25.0, 25.0, 7.0, 7.0, 10.0, 10.0, 30.0},// Night Stick
{40.0, 50.0, 15.0, 15.0, 17.0, 17.0, 60.0},// Knife
{7.0, 7.0, 5.0, 5.0, 7.0, 7.0, 7.0},// Baseball Bat
{15.0, 25.0, 5.0, 5.0, 7.0, 7.0, 35.0},// Shovel
{10.0, 50.0, 5.0, 5.0, 17.0, 17.0, 10.0},// Pool Cue
{50.0, 55.0, 25.0, 25.0, 27.0, 27.0, 100.0},// Katana
{70.0, 75.0, 50.0, 50.0, 60.0, 60.0, 100.0},// Chainsaw
{10.0, 50.0, 5.0, 5.0, 7.0, 7.0, 50.0}, // dildo
{10.0, 50.0, 5.0, 5.0, 7.0, 7.0, 50.0}, // dildo
{10.0, 50.0, 5.0, 5.0, 7.0, 7.0, 50.0}, // dildo
{10.0, 50.0, 5.0, 5.0, 7.0, 7.0, 50.0}, // dildo
{5.0, 5.0, 1.0, 1.0, 5.0, 5.0, 10.0}, // Flowers
{10.0, 50.0, 5.0, 5.0, 7.0, 7.0, 50.0}, // Cane
{100.0, 100.0, 50.0, 50.0, 60.0, 60.0, 100.0},// Grenade
{5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0}, // Tear Gas
{70.0, 80.0, 20.0, 20.0, 30.0, 30.0, 100.0}, // Molotov
{70.0, 80.0, 20.0, 20.0, 30.0, 30.0, 100.0},//"Invalid Weapon",
{70.0, 80.0, 20.0, 20.0, 30.0, 30.0, 100.0},//"Invalid Weapon",
{70.0, 80.0, 20.0, 20.0, 30.0, 30.0, 100.0},//"Invalid Weapon",
{10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 15.0}, // Colt 45
{10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 15.0}, // Silenced Colt 45
{46.0, 46.0, 46.0, 46.0, 46.0, 46.0, 50.0}, // Desert Eagle
{10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0}, // Shotgun
{10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0}, // Sawno-ff Shotgun
{15.0, 15.0, 15.0, 15.0, 15.0, 15.0, 15.0}, // Combat Shotgun
{10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0}, // Micro SMG
{10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0}, // SMG
{15.0, 15.0, 15.0, 15.0, 15.0, 15.0, 20.0}, // AK47
{15.0, 15.0, 15.0, 15.0, 15.0, 15.0, 20.0}, // M4
{10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0}, // Tec9
{80.0, 80.0, 30.0, 30.0, 35.0, 35.0, 100.0}, // Country Rifle
{41.0, 41.0, 41.0, 41.0, 41.0, 41.0, 41.0}, // Sniper Rifle
{100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0}, // Rocket Launcher
{100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0}, // HS Rocket Launcher
{70.0, 80.0, 20.0, 20.0, 30.0, 30.0, 100.0}, // Flamethrower
{70.0, 80.0, 20.0, 20.0, 30.0, 30.0, 100.0}, // Minigun
{100.0, 100.0, 50.0, 50.0, 60.0, 60.0, 100.0},// Satchel Charge
{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},// Detonator
{10.0, 5.0, 5.0, 5.0, 5.0, 5.0, 15.0}, // Spray Can
{10.0, 5.0, 5.0, 5.0, 5.0, 5.0, 15.0} // Fire Extinguisher
};
EnLokos
3
Hustler
18. Jan. 2019.
Jeste i Bice wrote on January 18, 2019, 6:02 pm:
Sad izbaci ovaj warning:
C:\Users\neman\Desktop\samp\BF MOD\bf - Copy\gamemodes\BFRPG.pwn(81873) : warning 203: symbol is never used: "WeaponDamage"
Pawn compiler 3.10.4 Copyright (c) 1997-2006, ITB CompuPhase

Header size:          30464 bytes
Code size:          9821452 bytes
Data size:        48830560 bytes
Stack/heap size:      16384 bytes; estimated max. usage=4030 cells (16120 bytes)
Total requirements:58698860 bytes

1 Warning.
// Definicija ostecena po oruzju i delu tela

new Float:WeaponDamage[ 43 ][ 7 ] = {
{2.0, 2.0, 2.0, 2.0, 2.0, 3.0, 10.0}, // Unarmed
{10.0, 15.0, 15.0, 22.0, 22.0, 22.0, 30.0},// Brass Knuckles
{15.0, 25.0, 5.0, 5.0, 7.0, 7.0, 35.0},// Golf Club
{25.0, 25.0, 7.0, 7.0, 10.0, 10.0, 30.0},// Night Stick
{40.0, 50.0, 15.0, 15.0, 17.0, 17.0, 60.0},// Knife
{7.0, 7.0, 5.0, 5.0, 7.0, 7.0, 7.0},// Baseball Bat
{15.0, 25.0, 5.0, 5.0, 7.0, 7.0, 35.0},// Shovel
{10.0, 50.0, 5.0, 5.0, 17.0, 17.0, 10.0},// Pool Cue
{50.0, 55.0, 25.0, 25.0, 27.0, 27.0, 100.0},// Katana
{70.0, 75.0, 50.0, 50.0, 60.0, 60.0, 100.0},// Chainsaw
{10.0, 50.0, 5.0, 5.0, 7.0, 7.0, 50.0}, // dildo
{10.0, 50.0, 5.0, 5.0, 7.0, 7.0, 50.0}, // dildo
{10.0, 50.0, 5.0, 5.0, 7.0, 7.0, 50.0}, // dildo
{10.0, 50.0, 5.0, 5.0, 7.0, 7.0, 50.0}, // dildo
{5.0, 5.0, 1.0, 1.0, 5.0, 5.0, 10.0}, // Flowers
{10.0, 50.0, 5.0, 5.0, 7.0, 7.0, 50.0}, // Cane
{100.0, 100.0, 50.0, 50.0, 60.0, 60.0, 100.0},// Grenade
{5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0}, // Tear Gas
{70.0, 80.0, 20.0, 20.0, 30.0, 30.0, 100.0}, // Molotov
{70.0, 80.0, 20.0, 20.0, 30.0, 30.0, 100.0},//"Invalid Weapon",
{70.0, 80.0, 20.0, 20.0, 30.0, 30.0, 100.0},//"Invalid Weapon",
{70.0, 80.0, 20.0, 20.0, 30.0, 30.0, 100.0},//"Invalid Weapon",
{10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 15.0}, // Colt 45
{10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 15.0}, // Silenced Colt 45
{46.0, 46.0, 46.0, 46.0, 46.0, 46.0, 50.0}, // Desert Eagle
{10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0}, // Shotgun
{10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0}, // Sawno-ff Shotgun
{15.0, 15.0, 15.0, 15.0, 15.0, 15.0, 15.0}, // Combat Shotgun
{10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0}, // Micro SMG
{10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0}, // SMG
{15.0, 15.0, 15.0, 15.0, 15.0, 15.0, 20.0}, // AK47
{15.0, 15.0, 15.0, 15.0, 15.0, 15.0, 20.0}, // M4
{10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0}, // Tec9
{80.0, 80.0, 30.0, 30.0, 35.0, 35.0, 100.0}, // Country Rifle
{41.0, 41.0, 41.0, 41.0, 41.0, 41.0, 41.0}, // Sniper Rifle
{100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0}, // Rocket Launcher
{100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0}, // HS Rocket Launcher
{70.0, 80.0, 20.0, 20.0, 30.0, 30.0, 100.0}, // Flamethrower
{70.0, 80.0, 20.0, 20.0, 30.0, 30.0, 100.0}, // Minigun
{100.0, 100.0, 50.0, 50.0, 60.0, 60.0, 100.0},// Satchel Charge
{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},// Detonator
{10.0, 5.0, 5.0, 5.0, 5.0, 5.0, 15.0}, // Spray Can
{10.0, 5.0, 5.0, 5.0, 5.0, 5.0, 15.0} // Fire Extinguisher
};


Jel ti radi mod sa tim upozorenjem ?
Adam_Lay
6
Underboss
18. Jan. 2019.
pa samo ti javlja upozorenje da se nigdje ne koristi u skripti.Izbrišeš ili staviš u komentar( /* */-možda ćeš nekad htjeti vratiti,ma što god to bilo)
Jeste i Bice
3
Wheel Man
18. Jan. 2019.
Radi sve normalno i ono sa hp i pancirom isto radi hvala!
🙂

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha