Wanted Level

Započeo ᴘᴇᴋɪ
31. Mar. 2018.
672
pregleda
7
postova
Pikac
5
Underboss
31. Mar. 2018.
Problem(error/warning): Problem je to da kada igrac puca igraca dobija 3 wla, ali kad ubije igraca trebalo bi da dobije jos dodatna 3wla a ono mu ustvari da nekih 500wla.. Jel zna neko kako resiti?
Dio skripte:
stock PostaviWanted( playerid, zlocin[], prijavio[], kolicina = 1 ) {
if( IsPlayerConnected( playerid ) ) {

new string[ 256 ];
    Tosic_SetPlayerWantedLevel( playerid, PlayerInfo[ playerid ][ xWanted ]+kolicina );
PlayerInfo[ playerid ][ xWanted ] += kolicina;

if( PlayerInfo[ playerid ][ xWanted ] > 1000 ) {
Tosic_SetPlayerWantedLevel( playerid, 1000 );
PlayerInfo[ playerid ][ xWanted ] = 1000;
}

strmid( ZlocinInfo[ playerid ][ zPrijavio ], prijavio, 0, strlen(prijavio), 255);
strmid( ZlocinInfo[ playerid ][ zPocinio ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), 255);
strmid( ZlocinInfo[ playerid ][ zZlocin ], zlocin, 0, strlen(zlocin), 255);

        format( string, sizeof( string ), ""col_fg"- Pocinili ste zlocin: "col_white"%s "col_fg"| Prijava od: "col_white"%s!", zlocin, prijavio );
SCM( playerid, -1, string);
format( string, sizeof( string ), ""col_fg"- Trenutni Wanted Level: "col_white"%d!", PlayerInfo[ playerid ][ xWanted ] );
SCM( playerid, -1, string);

for( new id = 1; id < MAX_ORG; id++) {
    if( OI[ id ][ oTip ] == ORG_TIP_PD ) {
format( string, sizeof( string ), ""col_fg"- Imamo novi prijavljen zlocin od: "col_white"%s!", prijavio);
OrgPoruka( id, -1, string);
format( string, sizeof( string ), ""col_fg"- Pocinio: "col_white"%s "col_fg"| Zlocin: "col_white"%s "col_fg"| Wanted Level Pocinioca: %d!", ImeIgraca( playerid ), zlocin, PlayerInfo[ playerid ][ xWanted ] );
OrgPoruka( id, -1, string);
}
}
}
return 1;
}

Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): /
Slika/video ingame problema(obavezno ako je ingame problem): /
Rax_King
5
Godfather
31. Mar. 2018.
Daj funkciju

Tosic_SetPlayerWantedLevel
takodje vidi zadnji parametar PostaiWanted (kolicina) i vidi koliko daje na killerid u onplayerdeath
Belegija
4
Enforcer
31. Mar. 2018.
 stock PostaviWanted( playerid, zlocin[], prijavio[], kolicina = 1 ) {
if( IsPlayerConnected( playerid ) ) {

new string[ 256 ];
    Tosic_SetPlayerWantedLevel( playerid, PlayerInfo[ playerid ][ xWanted ]+ 3 );
PlayerInfo[ playerid ][ xWanted ] += 3;

if( PlayerInfo[ playerid ][ xWanted ] > 1000 ) {
Tosic_SetPlayerWantedLevel( playerid, 1000 );
PlayerInfo[ playerid ][ xWanted ] = 1000;
}

strmid( ZlocinInfo[ playerid ][ zPrijavio ], prijavio, 0, strlen(prijavio), 255);
strmid( ZlocinInfo[ playerid ][ zPocinio ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), 255);
strmid( ZlocinInfo[ playerid ][ zZlocin ], zlocin, 0, strlen(zlocin), 255);

        format( string, sizeof( string ), ""col_fg"- Pocinili ste zlocin: "col_white"%s "col_fg"| Prijava od: "col_white"%s!", zlocin, prijavio );
SCM( playerid, -1, string);
format( string, sizeof( string ), ""col_fg"- Trenutni Wanted Level: "col_white"%d!", PlayerInfo[ playerid ][ xWanted ] );
SCM( playerid, -1, string);

for( new id = 1; id < MAX_ORG; id++) {
    if( OI[ id ][ oTip ] == ORG_TIP_PD ) {
format( string, sizeof( string ), ""col_fg"- Imamo novi prijavljen zlocin od: "col_white"%s!", prijavio);
OrgPoruka( id, -1, string);
format( string, sizeof( string ), ""col_fg"- Pocinio: "col_white"%s "col_fg"| Zlocin: "col_white"%s "col_fg"| Wanted Level Pocinioca: %d!", ImeIgraca( playerid ), zlocin, PlayerInfo[ playerid ][ xWanted ] );
OrgPoruka( id, -1, string);
}
}
}
return 1;
}
Herarhije
5
Godfather
31. Mar. 2018.
.ксундер wrote on March 31, 2018, 12:47 pm:
Daj funkciju

Tosic_SetPlayerWantedLevel
takodje vidi zadnji parametar PostaiWanted (kolicina) i vidi koliko daje na killerid u onplayerdeath
stock Tosic_SetPlayerWantedLevel( playerid, broj ) {
switch( broj ) {
    case 0: {
        PlayerTextDrawHide( playerid, WantedIgraca[ playerid ] );
        SetPlayerColor( playerid, 0xFFFFFF00 );
    }
    case 1: {
        PlayerTextDrawSetString( playerid, WantedIgraca[ playerid ] , "]" );
        PlayerTextDrawShow( playerid, WantedIgraca[ playerid ] );
        SetPlayerColor( playerid, 0xAA333300 );
    }
    case 2: {
        PlayerTextDrawSetString( playerid, WantedIgraca[ playerid ] , "] ]" );
        PlayerTextDrawShow( playerid, WantedIgraca[ playerid ] );
        SetPlayerColor( playerid, 0xAA333300 );
    }
    case 3: {
        PlayerTextDrawSetString( playerid, WantedIgraca[ playerid ] , "] ] ]" );
        PlayerTextDrawShow( playerid, WantedIgraca[ playerid ] );
        SetPlayerColor( playerid, 0xAA333300 );
    }
    case 4: {
        PlayerTextDrawSetString( playerid, WantedIgraca[ playerid ] , "] ] ] ]" );
        PlayerTextDrawShow( playerid, WantedIgraca[ playerid ] );
        SetPlayerColor( playerid, 0xAA333300 );
    }
    case 5: {
        PlayerTextDrawSetString( playerid, WantedIgraca[ playerid ] , "] ] ] ] ]" );
        PlayerTextDrawShow( playerid, WantedIgraca[ playerid ] );
        SetPlayerColor( playerid, 0xAA333300 );
    }
    case 6: {
        PlayerTextDrawSetString( playerid, WantedIgraca[ playerid ] , "] ] ] ] ] ]" );
        PlayerTextDrawShow( playerid, WantedIgraca[ playerid ] );
        SetPlayerColor( playerid, 0xAA333300 );
    }
    case 7: {
        PlayerTextDrawSetString( playerid, WantedIgraca[ playerid ] , "] ] ] ] ] ] ]" );
        PlayerTextDrawShow( playerid, WantedIgraca[ playerid ] );
        SetPlayerColor( playerid, 0xAA333300 );
    }
    case 8: {
        PlayerTextDrawSetString( playerid, WantedIgraca[ playerid ] , "] ] ] ] ] ] ] ]" );
        PlayerTextDrawShow( playerid, WantedIgraca[ playerid ] );
        SetPlayerColor( playerid, 0xAA333300 );
    }
    case 9: {
        PlayerTextDrawSetString( playerid, WantedIgraca[ playerid ] , "] ] ] ] ] ] ] ] ]" );
        PlayerTextDrawShow( playerid, WantedIgraca[ playerid ] );
        SetPlayerColor( playerid, 0xAA333300 );
    }
    case 10: {
        PlayerTextDrawSetString( playerid, WantedIgraca[ playerid ] , "] ] ] ] ] ] ] ] ] ]" );
        PlayerTextDrawShow( playerid, WantedIgraca[ playerid ] );
        SetPlayerColor( playerid, 0xAA333300 );
    }
}
return 1;
}
Belegija
4
Enforcer
31. Mar. 2018.
.ксундер wrote on March 31, 2018, 12:47 pm:
Daj funkciju

Tosic_SetPlayerWantedLevel
takodje vidi zadnji parametar PostaiWanted (kolicina) i vidi koliko daje na killerid u onplayerdeath


Jednostavnije:
Nadji OnPlayerDeath dje mu pise da je dobio WL
Pikac
5
Underboss
31. Mar. 2018.
Belegija wrote on March 31, 2018, 12:48 pm:
 stock PostaviWanted( playerid, zlocin[], prijavio[], kolicina = 1 ) {
if( IsPlayerConnected( playerid ) ) {

new string[ 256 ];
    Tosic_SetPlayerWantedLevel( playerid, PlayerInfo[ playerid ][ xWanted ]+ 3 );
PlayerInfo[ playerid ][ xWanted ] += 3;

if( PlayerInfo[ playerid ][ xWanted ] > 1000 ) {
Tosic_SetPlayerWantedLevel( playerid, 1000 );
PlayerInfo[ playerid ][ xWanted ] = 1000;
}

strmid( ZlocinInfo[ playerid ][ zPrijavio ], prijavio, 0, strlen(prijavio), 255);
strmid( ZlocinInfo[ playerid ][ zPocinio ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), 255);
strmid( ZlocinInfo[ playerid ][ zZlocin ], zlocin, 0, strlen(zlocin), 255);

        format( string, sizeof( string ), ""col_fg"- Pocinili ste zlocin: "col_white"%s "col_fg"| Prijava od: "col_white"%s!", zlocin, prijavio );
SCM( playerid, -1, string);
format( string, sizeof( string ), ""col_fg"- Trenutni Wanted Level: "col_white"%d!", PlayerInfo[ playerid ][ xWanted ] );
SCM( playerid, -1, string);

for( new id = 1; id < MAX_ORG; id++) {
    if( OI[ id ][ oTip ] == ORG_TIP_PD ) {
format( string, sizeof( string ), ""col_fg"- Imamo novi prijavljen zlocin od: "col_white"%s!", prijavio);
OrgPoruka( id, -1, string);
format( string, sizeof( string ), ""col_fg"- Pocinio: "col_white"%s "col_fg"| Zlocin: "col_white"%s "col_fg"| Wanted Level Pocinioca: %d!", ImeIgraca( playerid ), zlocin, PlayerInfo[ playerid ][ xWanted ] );
OrgPoruka( id, -1, string);
}
}
}
return 1;
}

Sada kad igrac puca drugog igraca dobija wl 3 ali kad ubije igraca seta mu na wl 9 umesto na wl 6
Pikac
5
Underboss
31. Mar. 2018.
Hvala svima na pomoci, reseno je sada, bio je i mali problem na onplayertakedamage pa je i to stvaralo bilo problem prilikom pucnja igraca.

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha