21.06.2020, 12:16
Hi everyone, title says it all. I switched to FCNPC a few days ago becuase it seems a lot better than rnpc when properly used.
Allthough, I'm running into some problems now. Yesterday, the clients of everyone would just crash whenever they joined the test server. It just happened a few secs after connecting.
If you were fast enough to type your password, it would not crash when it spawned you.
Further investigation to this matter had me discovering that it is caused by my NPC's.
I have considered the steps I have done.
1. Switched to FCNPC
2. Converted all normal NPC's (E.g traders, safezone NPC's and questgivers) to FCNPC.
3. Changed the location for all NPC's to match the new map.
4. Converted all Zombie NPC's.
And part 4 is where the crashes start happening.
And I really can't wrap my head around it. Could it be the fact they use custom skins? Or is it related to my coding?
Here are some entries from where I load my NPC's:
So when I only add ID 1 2 and 3, it's fine. But when I add some zombies, it freaks out.
I wonder now, could it be related to the custom skins? Or my code?
Here is my code:
https://pastebin.com/9weVWXfL
Note: Server log doesn't show anything whatsoever, this is purely a client crash caused by the server.
Here is some more information about the crash:
Allthough, I'm running into some problems now. Yesterday, the clients of everyone would just crash whenever they joined the test server. It just happened a few secs after connecting.
If you were fast enough to type your password, it would not crash when it spawned you.
Further investigation to this matter had me discovering that it is caused by my NPC's.
I have considered the steps I have done.
1. Switched to FCNPC
2. Converted all normal NPC's (E.g traders, safezone NPC's and questgivers) to FCNPC.
3. Changed the location for all NPC's to match the new map.
4. Converted all Zombie NPC's.
And part 4 is where the crashes start happening.
And I really can't wrap my head around it. Could it be the fact they use custom skins? Or is it related to my coding?
Here are some entries from where I load my NPC's:
pawn Code:
INSERT INTO "NPCS" ("ID","POSX","POSY","POSZ","ANGLE","WORLD","INTERIOR","SKIN","NAME","PATHID","ANIMLIB","ANIM") VALUES ('1','1697.5272','1027.8324','307.9102','320.3279','0','0','3','John_Greybrook','1','NONE','NONE');
INSERT INTO "NPCS" ("ID","POSX","POSY","POSZ","ANGLE","WORLD","INTERIOR","SKIN","NAME","PATHID","ANIMLIB","ANIM") VALUES ('2','1702.4653','1017.1572','308.2149','22.2238','0','0','133','Paul_Brooks','1','BAR','BARMAN_IDLE');
INSERT INTO "NPCS" ("ID","POSX","POSY","POSZ","ANGLE","WORLD","INTERIOR","SKIN","NAME","PATHID","ANIMLIB","ANIM") VALUES ('3','1682.7429','1072.3427','312.035','4.0504','0','0','128','Jason_Greybrook','1','PED','Gun_2_IDLE');
INSERT INTO "NPCS" ("ID","POSX","POSY","POSZ","ANGLE","WORLD","INTERIOR","SKIN","NAME","PATHID","ANIMLIB","ANIM") VALUES ('50','1652.779785','1441.734985','308.113342','228.991134','0','0','20108','Zombie2','2','PED','cower');
INSERT INTO "NPCS" ("ID","POSX","POSY","POSZ","ANGLE","WORLD","INTERIOR","SKIN","NAME","PATHID","ANIMLIB","ANIM") VALUES ('51','1658.249633','1425.884277','308.135375','251.792144','0','0','20112','Zombie3','2','SWAT','gnstwall_injurd');
INSERT INTO "NPCS" ("ID","POSX","POSY","POSZ","ANGLE","WORLD","INTERIOR","SKIN","NAME","PATHID","ANIMLIB","ANIM") VALUES ('52','1669.096679','1469.63269','308.122283','279.472595','0','0','20116','Zombie4','2','SWAT','gnstwall_injurd');
I wonder now, could it be related to the custom skins? Or my code?
Here is my code:
https://pastebin.com/9weVWXfL
Note: Server log doesn't show anything whatsoever, this is purely a client crash caused by the server.
Here is some more information about the crash:
Code:
SA-MP 0.3.DL-R1 Exception At Address: 0x0048C3A9 Base: 0x03A80000 Registers: EAX: 0x00000000 EBX: 0x0000FFFF ECX: 0x0177EDFC EDX: 0x00000000 ESI: 0x104AA860 EDI: 0x000004EE EBP: 0x0177EEAC ESP: 0x0177ED80 EFLAGS: 0x00010246 Stack: +0000: 0x0177EDFC 0x00000000 0x000004EE 0x0177EEAC +0010: 0x00000000 0x00000000 0x00000000 0x00000000 +0020: 0x00000000 0x00000000 0x00000000 0x00000000 +0030: 0x00000000 0x00000000 0x00000000 0x00000000 +0040: 0x00000000 0x00000000 0x00000000 0x00000000 +0050: 0x0000FFFF 0x0000FFFF 0x00000000 0x00000000 +0060: 0x00000000 0x00000000 0x00000000 0x00000000 +0070: 0x00000000 0x00000000 0x14C46040 0x454E4F4E +0080: 0x00000000 0x00000000 0x00000000 0x094ED000 +0090: 0x14C46000 0x0177EEF8 0x52959B11 0x14C46040 +00A0: 0x0FEB0980 0x14C4C6A0 0x00000000 0x00000000 +00B0: 0x094ED000 0x00000000 0x053E6200 0x00000000 +00C0: 0x7725216C 0x751FF60F 0x00000000 0x0177EE9C +00D0: 0x008384FA 0xFFFFFFFF 0x00469EF7 0x000004EE +00E0: 0x0177EEB4 0x03B31EEE 0x03B320A4 0x755E9010 +00F0: 0x00000009 0x0177F028 0x00000000 0x0177EEB4 +0100: 0x00000004 0xFFFFD8F0 0x00000000 0x03B9E7F7 +0110: 0x00000000 0x0177EE6C 0x0177E744 0x0177F22C +0120: 0x03B793A4 0x03B9F428 0x00000000 0x16977408 +0130: 0x03B20ABF 0x03B9E7F4 0x0177F028 0x03B2CED9 +0140: 0x0177F028 0x0177F228 0xFFFFFF01 0x0177F244 +0150: 0x0177F238 0x03A9A65C 0x0177F128 0x0177F028 +0160: 0x40833333 0x00000001 0x00000001 0x00000001 +0170: 0x00000000 0x00000000 0x16863AD0 0x0404A53D +0180: 0x01000101 0x181A0254 0x00000000 0x40833333 +0190: 0x000000A8 0x000000A8 0x000000A4 0x0177F244 +01A0: 0x00000000 0x094ED000 0x00001214 0x181A3230 +01B0: 0x0177EF48 0x5295A27D 0x00000000 0x181A3200 +01C0: 0x181A3230 0x181A3200 0x0177EF64 0x5296512E +01D0: 0x00000014 0x0EACA150 0x00000000 0x0177EFF8 +01E0: 0x0EACA180 0x0177EF9C 0x0177EF9C 0x52AB373D +01F0: 0x094F2C80 0x0177F088 0x0EBABE80 0x00000000 +0200: 0x52A374D3 0x094B8000 0x0F7A8220 0x0F7A9A98 +0210: 0x053DE430 0x52A37310 0x053E6248 0x0177F038 +0220: 0x52A374D3 0x094B8000 0x0EACA150 0x0FF251A8 +0230: 0x053DE430 0x52A37310 0x0EC1E2E0 0x52A38390 +0240: 0x0EA93A80 0x0177F400 0x00000000 0x00000000 +0250: 0x00000000 0x00000000 0x0F9B6150 0x00000000 +0260: 0x00000005 0x0001C6A0 0x00000520 0x00000000 +0270: 0x00000000 0x00000000 0x0F9B6260 0x00000000 SCM Op: 0x4EE, lDbg: 1 LastRendObj: 59830 Game Version: EU 1.0 State Information: Ped Context: 0 P593 (0,0) P594 (0,0) P595 (0,0) P596 (17,0) P597 (0,0) P598 (0,0) P599 (0,0)