SA-MP Forums Archive
NPC donґt spawn - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: NPC donґt spawn (/showthread.php?tid=230013)



NPC donґt spawn - DartakousLien - 22.02.2011

well ... the NPC is uploaded, the file ".rec" is loaded, but what I use on "OnPlayerSpawn" does not work ...
can someone help me?
Thanks already!


Re: NPC donґt spawn - Sasino97 - 22.02.2011

Try to open server.cfg and set maxnpc to the amount of NPC.


Re: NPC donґt spawn - DartakousLien - 22.02.2011

I've done that, put up twice ...

pawn Код:
public OnPlayerSpawn(playerid)
{
    if(IsPlayerNPC(playerid))
    {
        new nomenpc[MAX_PLAYER_NAME];
        GetPlayerName(playerid,nomenpc,sizeof(nomenpc));
        if(!strcmp(nomenpc,"Motorista_Manuel",true))
        {
            PutPlayerInVehicle(playerid, NPC_Tram, 0);
            SetSpawnInfo( playerid, 0, 43, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0 );
        }
    }
    return 1;
}
the server is not detecting it, I think, because they are not performing these functions ...