SA-MP Forums Archive
NPC BOTS DONT APPEAR - 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 BOTS DONT APPEAR (/showthread.php?tid=251129)



NPC BOTS DONT APPEAR - HondaCBR - 25.04.2011

hello i added this in my map

pawn Код:
#include <a_samp>
// ShowGirls 1.1 by O.K.Style™
public OnFilterScriptInit() //i added this ongamemodein
{
    ConnectNPC("ShowGirl_1","blank");
    ConnectNPC("ShowGirl_2","blank");
    ConnectNPC("ShowGirl_3","blank");
    ConnectNPC("ShowGirl_4","blank");
    return 1;
}
public OnPlayerSpawn(playerid) //i added this onplayerspawn just like it says
{
    if(IsPlayerNPC(playerid))
    {
        new PlayerName[MAX_PLAYER_NAME];
        GetPlayerName(playerid,PlayerName,sizeof(PlayerName));
        if(strcmp(PlayerName, "ShowGirl_1", true) == 0)
        {
            SetPlayerColor(playerid, 0xF900D300);
            SetPlayerInterior(playerid, 3);
            SetPlayerPos(playerid, -2673.3816, 1410.4232, 907.5703);
            SetPlayerFacingAngle(playerid, 270.0);
            SetPlayerSkin(playerid, 178);
        }
        if(!strcmp(PlayerName,"ShowGirl_2",true))
        {
            SetPlayerColor(playerid,0xF900D3FF);
            SetPlayerPos(playerid,-2678.1472,1410.2281,907.5703);
            SetPlayerFacingAngle(playerid,270.0);
            SetPlayerSkin(playerid,256);
            SetPlayerInterior(playerid,3);
        }
        if(!strcmp(PlayerName,"ShowGirl_3",true))
        {
            SetPlayerColor(playerid,0xF900D3FF);
            SetPlayerPos(playerid,-2678.1472,1414.5895,907.5703);
            SetPlayerFacingAngle(playerid,270.0);
            SetPlayerSkin(playerid,246);
            SetPlayerInterior(playerid,3);
        }
        if(!strcmp(PlayerName,"ShowGirl_4",true))
        {
            SetPlayerColor(playerid,0xF900D3FF);
            SetPlayerPos(playerid,-2678.1472,1405.8817,907.5703);
            SetPlayerFacingAngle(playerid,270.0);
            SetPlayerSkin(playerid,244);
            SetPlayerInterior(playerid,3);
        }
    }
    return 1;
}
public OnPlayerUpdate(playerid)//added this at the bottom
{
    if(IsPlayerNPC(playerid))
    {
        new PlayerName[MAX_PLAYER_NAME];
        GetPlayerName(playerid,PlayerName,sizeof(PlayerName));
        if(strcmp(PlayerName, "ShowGirl_1", true) == 0
        || strcmp(PlayerName, "ShowGirl_2", true) == 0
        || strcmp(PlayerName, "ShowGirl_3", true) == 0
        || strcmp(PlayerName, "ShowGirl_4", true) == 0)
        {
            ApplyAnimation(playerid,"STRIP","strip_G",4.1,0,1,1,1,-1,1);
        }
    }
    return 1;
}
public OnFilterScriptExit() //i added this at gamemodeexit
{
    for(new i, j = GetMaxPlayers(); i != j; ++i)
    {
        if(IsPlayerNPC(i))
        {
            new PlayerName[MAX_PLAYER_NAME];
            GetPlayerName(i,PlayerName,sizeof(PlayerName));
            if(strcmp(PlayerName, "ShowGirl_1", true) == 0
            || strcmp(PlayerName, "ShowGirl_2", true) == 0
            || strcmp(PlayerName, "ShowGirl_3", true) == 0
            || strcmp(PlayerName, "ShowGirl_4", true) == 0)
            {
                Kick(i);
            }
        }
    }
    return 1;
}
this is not my code i found it online, i added all of those functions/things above in to my gamemdoe, and the problem is that the bots dont appear


Re: NPC BOTS DONT APPEAR - Admigo - 25.04.2011

You have the recordings correct in npcmodes/recordings and you got a file in npcmodes for the recording?


Re: NPC BOTS DONT APPEAR - [MG]Dimi - 25.04.2011

Have you even recorded bots?


Re: NPC BOTS DONT APPEAR - Admigo - 25.04.2011

Lol there something wrong with the recording i think lol:P


Re: NPC BOTS DONT APPEAR - HondaCBR - 25.04.2011

what do you mean recorder and what do you mean file? i dont get it


Re: NPC BOTS DONT APPEAR - Admigo - 25.04.2011

You have recording folder into npcmodes. There needs to be your recording file. And in npcmodes there needs to be a file that connects with the recording. If you dont know how to get the npc to work look a npc tutorial


Re: NPC BOTS DONT APPEAR - Mean - 25.04.2011

You need to add thoose IsPlayerNPC blocks in your script you register ( most likely Admin FS ) not here!


Re: NPC BOTS DONT APPEAR - Admigo - 25.04.2011

You have into your server config not forgot this: maxnpc number


Re: NPC BOTS DONT APPEAR - HondaCBR - 25.04.2011

i have nothing to do with NCP's so i have that in my map, what else do i need now, in server.cfg, includes bla bla?


Re: NPC BOTS DONT APPEAR - Mean - 25.04.2011

As I said:

Quote:
Originally Posted by Mean
Посмотреть сообщение
You need to add thoose IsPlayerNPC blocks in your script you register ( most likely Admin FS ) not here!