11.07.2016, 19:44
Hello, can someone answer me? why i don't see my NPC Zombie Bots after compile the script without any warning/error ? i'm using FCNPC ? can someone answer me?
stock ZombieInit() { FCNPC_SetUpdateRate(100); for(new i = 0; i < MAX_ZOMBIES; i++) { new name[24]; format(name, 24, "Zombie_%d", i + 1); new npcid = FCNPC_Create(name); new Random = random(sizeof(RandomZombieSpawns)); FCNPC_Spawn(npcid,162,RandomZombieSpawns[Random][0],RandomZombieSpawns[Random][1],RandomZombieSpawns[Random][2]); FCNPC_SetHealth(npcid, 100); SetTimerEx("ZMOVE",100,1,"i",npcid); SetPlayerColor(npcid,COLOR_RED); } return 1; } stock FCNPC_GoToPlayerEx(npcid, playerid, Float:dist, Float:rangle, movetype = MOVE_TYPE_WALK, UseZMap = 0) { new Float:x, Float:y, Float:z, Float:fa; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, fa); rangle += fa; x = (x + dist * floatsin(-rangle,degrees)); y = (y + dist * floatcos(-rangle,degrees)); FCNPC_GoTo(npcid, x, y, z,movetype,10,UseZMap); } stock FCNPC_Punch(npcid, Float:x, Float:y, Float:z, PunchResetDelay = 125) { FCNPC_AimAt(npcid, x, y, z, 0); FCNPC_StopAim(npcid); FCNPC_SetKeys(npcid, 0x80 + 4); SetTimerEx("ResetNPCKeys", PunchResetDelay, false, "i", npcid); return 1; }]