Giving a bot a weapon?
#1

How do I give a bot a weapon/make him hold one?

This is my code, and no weapon shows up in-game:

pawn Код:
public OnPlayerSpawn(playerid)
{
    if(IsPlayerNPC(playerid))
    {
        new botname[128];
        GetPlayerName(playerid,botname,sizeof(botname));
        if(!strcmp(botname, "Sergeant_Wyatt", false))
        {
            SetPlayerSkin(playerid, 287);
            GivePlayerWeapon(playerid, 31, 500);
            SetPlayerArmedWeapon(playerid, 31);
            NPCNameLabel[playerid] = Create3DTextLabel("Sergeant Wyatt", COLOR_FAKEWHITE, 0.0, 0.0, 0.0, 15.0, 0, 1);
            Attach3DTextLabelToPlayer(NPCNameLabel[playerid], playerid, 0.0, 0.0, 0.0);
            return 1;
        }
Help is appreciated.
Reply


Messages In This Thread
Giving a bot a weapon? - by CrucixTM - 11.10.2010, 12:08
Re: Giving a bot a weapon? - by Mauzen - 11.10.2010, 14:53
Re: Giving a bot a weapon? - by CrucixTM - 11.10.2010, 15:25

Forum Jump:


Users browsing this thread: 3 Guest(s)