Bots zombies inteligentes
#1

Hola queridos amigos, tengo un proyecto de supervivencia, pero consigo una parte estoy teniendo problemas son el zombi.
He creado un solo zombi para tratar, sin embargo pasar el zombi dentro de las paredes y volar, me gustarнa un poco de ayuda de usted, he estado investigando y descubrir que hay que fijarla con ColAndreas, pero no puedo hacer esto me volverнa a alojar el mismo este vнdeo (Haga clic aquн para ver el video) Si alguien tiene pornto y le gustarнa compartir serнa agradecido y dar rap ++


Esto y el cуdigo que crea y el zombi estб volando y va dentro de las paredes.

Код:
#define MAX_ZOMBIES 1

new Float:ZombieSpawns[1][4] =
{
     {1211.4139,208.9426,19.5547}
};

stock CriarZumbis()
{
    new str[30];
    for(new i = 0; i < MAX_ZOMBIES; i++)
    {
        format(str, sizeof(str), "Zombie_%i", i);
        FCNPC_Create(str);
    }
    return 1;
}

public RespawnZumbis()
{
    for(new i = 0; i < MAX_ZOMBIES; i++)
    {
        if(FCNPC_IsDead(i))
        {
            FCNPC_Respawn(i);
        }
    }
    return 1;
}

public FCNPC_OnDeath(npcid, killerid, weaponid)
{
    if(killerid != INVALID_PLAYER_ID && IsPlayerConnected(killerid))
    {
        GameTextForPlayer(killerid, "~w~(Zombie Kill)~n~+5 EXP", 2500, 3);
    }
    return 1;
}

public FCNPC_OnCreate(npcid)
{
    new rand = random(sizeof(ZombieSpawns));
    FCNPC_Spawn(npcid, 162, ZombieSpawns[rand][0],ZombieSpawns[rand][1], ZombieSpawns[rand][2]);
    FCNPC_SetInvulnerable(npcid, false);
    return 1;
}

public FCNPC_OnSpawn(npcid)
{
    SetPlayerAttachedObject(npcid, 0, 2908, 2, 0.0800, 0.0690, 0.0000, 180.0000, 0.0999, 88.9000, 1.2860, 1.1280, 1.1540, 0xFFFFFFFF, 0xFFFFFFFF);
    SetPlayerAttachedObject(npcid, 1, 2907, 1, 0.1060, 0.0359, 0.0259, -88.9999, 0.9000, 88.6999, 1.0000, 0.6489, 1.1440, 0xFFFFFFFF, 0xFFFFFFFF);
    return 1;
}


public FCNPC_OnUpdate(npcid)
{
    foreach(new i : Player)
    {
        if(!IsPlayerNPC(i) && IsPlayerConnected(i))
        {
            new Float:zP[3], Float:pP[3];
            GetPlayerPos(npcid, zP[0], zP[1], zP[2]); 
            GetPlayerPos(i, pP[0], pP[1], pP[2]); 
            if(IsPlayerInRangeOfPoint(i, 15.0, zP[0], zP[1], zP[2])) FCNPC_GoTo(npcid, pP[0], pP[1], pP[2], MOVE_TYPE_RUN, 0.5, false, 0.0, true); 
            if(IsPlayerInRangeOfPoint(i, 1.0, zP[0], zP[1], zP[2])) 
            {
                FCNPC_Stop(npcid); 
                FCNPC_MeleeAttack(npcid, -1, true); 
            }
            else FCNPC_StopAttack(npcid); 

        }
    }
    return 1;
}
Reply


Messages In This Thread
Bots zombies inteligentes - by Corin - 31.01.2017, 04:26
Re: Respuesta: Bots zombies inteligentes - by tostad0r - 31.01.2017, 12:53
Respuesta: Bots zombies inteligentes - by Zume - 31.01.2017, 13:30
Respuesta: Bots zombies inteligentes - by Whillyrez - 31.01.2017, 15:29
Respuesta: Bots zombies inteligentes - by Eloy - 31.01.2017, 16:14
Re: Respuesta: Bots zombies inteligentes - by Corin - 31.01.2017, 18:16

Forum Jump:


Users browsing this thread: 2 Guest(s)