Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: PLAYER on Apr 07, 2025, 10:36 AM

Title: Bot/Npc Error or Bug
Post by: PLAYER on Apr 07, 2025, 10:36 AM
Hello everyone Today i was trying to add bot in my server So i used Habi npc04rel64 Plugin Then I added The Bot in my server The Bot Sucessfully Joined Server But When I tried to make it Attack Players it Doesn't attacked any player I used This Script
function OnNPCScriptLoad( params )
{
SetTimerEx("Check", 200, 0);
}

function Check()
{
if(GetTarget()!=-1)
return;

for(local i=0;i<100;i++)
{
if(IsPlayerConnected(i)&&IsPlayerStreamedIn(i))
{
if(GetPlayerState(i)==PLAYER_STATE_AIM)
{
if(GetDistanceFromMeToPoint(GetPlayerPos(i))<40)
{
if( GetTarget()== -1 )
ShootPlayer(i);
}
}
}
}
}

Its Working on Blank Server Windows But when I Try to add in it my Real server Linux Its not show any error on Console Just Bot Stand at one Place and Don't shoot
In Blank Server SHooting
but in Linux Server not shooting even with same script and also there is no error on Console

Title: Re: Bot/Npc Error or Bug
Post by: PLAYER on Apr 07, 2025, 11:54 AM
Linux Server ( Not Attacking )
https://i.imgur.com/HWs2uqw.png
Blank Server ( Attacking )
https://i.imgur.com/asJh5fC.png
Title: Re: Bot/Npc Error or Bug
Post by: ℛḝξ☂ on Apr 07, 2025, 04:15 PM
Are your plugins and starter in correct version?
Title: Re: Bot/Npc Error or Bug
Post by: PLAYER on Apr 08, 2025, 09:04 AM
Its latest for 0.4.7.1
Title: Re: Bot/Npc Error or Bug
Post by: PLAYER on Apr 09, 2025, 01:44 PM
anyone know how to fix ?
Title: Re: Bot/Npc Error or Bug
Post by: MEGAMIND on Apr 09, 2025, 01:46 PM
Quote from: PLAYER on Apr 09, 2025, 01:44 PManyone know how to fix ?
use linux binaries (https://npc-for-vcmp.sourceforge.io/wikiw/index.php/V1_7_beta3_release_notes) from habi's repo