NPC Help (Basic)
#1

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?
Reply
#2

Anyone?
Reply
#3

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.
Reply
#4

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

ReDownload the npc file ! or try another !
Reply
#6

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


Forum Jump:


Users browsing this thread: 1 Guest(s)