Also jetzt zielt er schon etwas besser, aber wenn ich zum Beispiel still stehe, schießt er immernoch leicht daneben
Mein Code sieht so auf, für seine "Aktion"
forward AttackerBot(npcid, targetid);
public AttackerBot(npcid, targetid)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(targetid, x, y, z);
MoveRNPC(npcid, x, y, z, 0.006);
if(IsPlayerInRangeOfPoint(npc, 5, x, y, z))
{
SetPlayerFacingAngleToPoint(npcid, x, y);
RNPC_SetWeaponID(30);
RNPC_SetKeys(128 + 4);
}
return 1;
}