#1

I can't understand why npc log out when server gets on?

Quote:

[22:18:36] Number of vehicle models: 10
[22:18:36] Incoming connection: 127.0.0.1:4128
[22:18:36] [npc:join] Serifas has joined the server (0:127.0.0.1)
[22:18:36] Incoming connection: 127.0.0.1:4131
[22:18:36] [npc:join] Mokytojas has joined the server (1:127.0.0.1)
[22:18:36] Incoming connection: 127.0.0.1:4130
[22:18:36] [npc:join] AutobusoVairuotojas has joined the server (2:127.0.0.1)
[22:18:36] Incoming connection: 127.0.0.1:4129
[22:18:36] [npc:join] Sekretore has joined the server (3:127.0.0.1)
[22:18:36] Incoming connection: 127.0.0.1:4132
[22:18:36] [npc:join] Barmenas has joined the server (4:127.0.0.1)
[22:18:47] [npcart] Serifas has left the server (0:0)
[22:18:47] [npcart] Mokytojas has left the server (1:0)
[22:18:47] [npcart] Sekretore has left the server (3:0)
[22:18:47] [npcart] Barmenas has left the server (4:0)
[22:18:48] [npcart] AutobusoVairuotojas has left the server (2:0)

maxnpc 5

all .rec, .pwn added - yes.

OnGameModeInit

pawn Код:
ConnectNPC( "AutobusoVairuotojas", "Autobusas" );
    ConnectNPC( "Sekretore", "Vyriausybe" );
    ConnectNPC( "Serifas", "Policija" );
    ConnectNPC( "Mokytojas", "Mokykla" );
    ConnectNPC( "Barmenas", "Baras" );
OnPlayerSpawn

pawn Код:
if( IsPlayerNPC( playerid ) )
    {
        if( !strcmp( ZaidejoVardas( playerid ), "AutobusoVairuotojas", true ) )
        {
            Attach3DTextLabelToPlayer( NPCTekstas, playerid, 0.0, 0.0, 0.0 );
            PutPlayerInVehicle( playerid, Autobusas, 0 );
        }
        if( !strcmp( ZaidejoVardas( playerid ), "Serifas", true ) ) SetPlayerInterior( playerid, 6 ), Attach3DTextLabelToPlayer( NPCTekstas, playerid, 0.0, 0.0, 0.0 );
        if( !strcmp( ZaidejoVardas( playerid ), "Mokytojas", true ) ) SetPlayerInterior( playerid, 3 ), Attach3DTextLabelToPlayer( NPCTekstas, playerid, 0.0, 0.0, 0.0 );
        if( !strcmp( ZaidejoVardas( playerid ), "Barmenas", true ) ) SetPlayerInterior( playerid, 18 ), Attach3DTextLabelToPlayer( NPCTekstas, playerid, 0.0, 0.0, 0.0 );
        if( !strcmp( ZaidejoVardas( playerid ), "Sekretore", true ) ) SetPlayerInterior( playerid, 3 ), Attach3DTextLabelToPlayer( NPCTekstas, playerid, 0.0, 0.0, 0.0 );
    }
And yes, I added isplayernpc checking at: OnPlayerRequestSpawn, OnPlayerConnect, At all anticheats/timers, OnPlayerRequestClass.
Reply
#2

Paziurek ar npc skriptas tvarkingas, gal ten ka nors privelei. Logai rodo, kad npc atsijunge del kazkokios klaidos
Reply
#3

nemanau, ar tai gali būti problema, kad į npcrecords dėjau tik .amx, o .rec dėjau į records, ar koks ten folderis
Reply
#4

This is an English section, please talk English, go to the Language board if you want to talk in... ehhhh Ligthuanian Language
Reply
#5

dont cry, please.
Reply
#6

If you don't want to get punished,stop flaming and using incorrect sections
Reply
#7

flaming? r Im blind or w?
Reply
#8

bump. ;>
Reply
#9

bumcik.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)