SA-MP Forums Archive
NPC Help (Basic) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: NPC Help (Basic) (/showthread.php?tid=270815)



NPC Help (Basic) - Alex_Obando - 21.07.2011

What is wrong in here:


pawn Код:
#include <a_samp>
#define COLOR_GREEN 0x33AA33AA
//so Far there are 68 NPC's



new mynpc;

public OnFilterScriptInit()
{
//--this lets the NPC's connect to your server
    ConnectNPC("Alex","mynpc");


//---This makes the Npc's spawn--
    mynpc = AddStaticVehicle(470,301.57, 1798.19, 17.26,125.6300,1,1); // limo1
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------

    print(" NPC mega pack.. Loaded!");

    return 1;
}

public OnPlayerSpawn(playerid)
{
    if(!IsPlayerNPC(playerid)) return 0;
    new npcname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, npcname, sizeof(npcname));
    new playername[64];
    GetPlayerName(playerid,playername,64);

    if(!strcmp(playername,"mynpc",true)) {
        PutPlayerInVehicle(playerid, mynpc, 0);
        SetSpawnInfo(playerid,0,255,1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0 );
        new Text3D:boat = Create3DTextLabel("NPC_BoatDriver(ID:0)",0x33AA33AA,30.0,40.0,50.0,40.0,0);
        Attach3DTextLabelToPlayer(boat, playerid, 0.0, 0.0, 0.5);
        }
    return 1;
}
The NPC its on npcmodes/recordings I just have that file and this file that I currently, When the is with no mistakes i need to go to server.cfg and add NPC 1 then do you think It'll work?


Respuesta: NPC Help (Basic) - Alex_Obando - 22.07.2011

Anyone?


Re: NPC Help (Basic) - =WoR=Varth - 22.07.2011

Quote:

b) Do not bump
Some people apparently think they are important enough to bump their own topic after 10 minutes.
You can bump topics when the last reply is at least 48 hours old, and it needs to have useful information about your problem.

I don't quite understand what's your prblem with that code.


Respuesta: NPC Help (Basic) - Alex_Obando - 22.07.2011

Do you think that with that script plus the record will my NPC work?


Re: NPC Help (Basic) - greenstyle - 22.07.2011

ReDownload the npc file ! or try another !


Re: NPC Help (Basic) - Adil - 22.07.2011

I don't really get what your problem is, but, change the maxnpc in your server.cfg to something higher.