Započeo ᴘᴇᴋɪ
•31. Mar. 2018.Wanted Level
697
pregleda
7
postova
Underboss
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
240 / 250 XP
Početnik(0)
678
Postovi:
84
Teme:
Pridružio se:Feb. 2016
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:
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): /
Slika/video ingame problema(obavezno ako je ingame problem): /
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): /
Enforcer
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
90 / 100 XP
Početnik(0)
313
Postovi:
27
Teme:
Pridružio se:Jan. 2018
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;
} Godfather
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
240 / 250 XP
Početnik(0)
1,998
Postovi:
135
Teme:
Pridružio se:Maj 2016
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
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;
}Enforcer
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
90 / 100 XP
Početnik(0)
313
Postovi:
27
Teme:
Pridružio se:Jan. 2018
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
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
Underboss
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
240 / 250 XP
Početnik(0)
678
Postovi:
84
Teme:
Pridružio se:Feb. 2016
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
Morate biti prijavljeni da biste odgovorili na ovu temu.
Prijava