Započeo noddy_
•5. Nov. 2021.• Zaključano[ FCNPC ] - On Disconnect
455
pregleda
3
postova
Crime Lord
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosAktivan Član
56 / 250 XP
Početnik(1)
990
Postovi:
76
Teme:
Pridružio se:Sep. 2020
5. Nov. 2021.
Problem(error/warning): Nema errora pa ni warninga, vec kad ubijem FCNPC-a izbaci "Ime_ID" je napustio server, pusteni ste, mod koji koristim Miami Street by V01D
Deo skripte:
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log):
Hvala koji mogu pomoci 😄
Deo skripte:
if( DragedPlayerID[ playerid ] != -1 ) {
format( globalstring, sizeof( globalstring ), "%s je napustio server, pusteni ste.", ImeIgraca( playerid ) );
SCM( DragedPlayerID[ playerid ], -1, globalstring );
TogglePlayerControllable( DragedPlayerID[ playerid ], 1 );
Draged[ DragedPlayerID[ playerid ] ] = -1;
}Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log):
Run time error 4: "Array index out of bounds"
Attempted to read/write array element at negative index -2
AMX backtrace:
#0 00490bc8 in public ppb_OnPlayerDisconnect (playerid=0, reason=1) at C:\Users\Hp\Desktop\D I N O\DEV\PAWNO\Miami House - OGC\gamemodes\main.pwn:25151
#1 0005123c in public CB_OnPlayerDisconnect (playerid=0, reason=1) at C:\Users\Hp\Desktop\D I N O\DEV\PAWNO\Miami House - OGC\LeksaCompiler\include\progress2.inc:336
#2 00043efc in public Itter_OnPlayerDisconnect (playerid=0, reason=1) at C:\Users\Hp\Desktop\D I N O\DEV\PAWNO\Miami House - OGC\LeksaCompiler\include\newsamp.inc:422
#3 native CallLocalFunction () from samp-server.exe
#4 000404f4 in ?? (... <2 arguments>) at C:\Users\Hp\Desktop\D I N O\DEV\PAWNO\Miami House - OGC\LeksaCompiler\include\foreach.inc:787
#5 00032004 in public SSCANF_OnPlayerDisconnect (playerid=0, reason=1) at C:\Users\Hp\Desktop\D I N O\DEV\PAWNO\Miami House - OGC\LeksaCompiler\include\YSI\y_hooks/impl.inc:682
#6 00023cf0 in public WC_OnPlayerDisconnect (playerid=0, reason=1) at C:\Users\Hp\Desktop\D I N O\DEV\PAWNO\Miami House - OGC\LeksaCompiler\include\sscanf2.inc:229
#7 00007ec0 in public OnPlayerDisconnect (playerid=0, reason=1) at C:\Users\Hp\Desktop\D I N O\DEV\PAWNO\Miami House - OGC\LeksaCompiler\include\weapon-config.inc:2164
Dino has left the server (0:1)Hvala koji mogu pomoci 😄
Godfather
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosAktivan Član
17 / 250 XP
Početnik(1)
2,272
Postovi:
76
Teme:
Pridružio se:Maj 2014
5. Nov. 2021.
public OnPlayerDisconnect(playerid, reason) {
if(IsPlayerNPC(playerid)) return 1;
return 1;
}Dodaj na sami pocetak callback-a OnPlayerDisconnect, takodje ces morati na neke klasicne stvari, OnPlayerDeath, OnPlayerSpawn, OnPlayerRequestSpawn, OnPlayerRequestClass, OnPlayerConnect i takodje na pocetku svakog ptask timera ( ako koristis y_timers )
Morate biti prijavljeni da biste odgovorili na ovu temu.
Prijava

