SA-MP Forums Archive
bots bug - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: bots bug (/showthread.php?tid=480791)



bots bug - ancezas - 12.12.2013

hi, i whant to connect bots after my function, they are conected but not in the place, i can't find them
code:
pawn Код:
public:: LSD( playerid )
{
    SetPlayerWeather( playerid, -66 );
    SetPlayerDrunkLevel( playerid, 10000 );
    TogglePlayerControllable( playerid, 0 );
    new
        Float:x,
        Float:y,
        Float:z;
    GetPlayerPos( playerid, x, y, z );
    ConnectNPC( "Klaunas1", "npcidle" );
    ConnectNPC( "Klaunas2", "npcidle" );
    ConnectNPC( "Klaunas3", "npcidle" );
    foreach(new BTT : Bot)
    {
        new npcname[ MAX_PLAYER_NAME ];
        GetPlayerName( playerid, npcname, sizeof( npcname ) );
        if( !strcmp( npcname, "Klaunas1", true ) )
        {
            SetPlayerSkin( BTT, 264 );
            SetPlayerPos( BTT,  x+2, y+4, z );
            SetPlayerColor( BTT, 0x80808000 );
        }
        if( !strcmp( npcname, "Klaunas2", true ) )
        {
            SetPlayerSkin( BTT, 264 );
            SetPlayerPos( BTT,  x+8, y+7, z );
            SetPlayerColor( BTT, 0x80808000 );
        }
        if( !strcmp( npcname, "Klaunas3", true ) )
        {
            SetPlayerSkin( BTT, 264 );
            SetPlayerPos( BTT,  x+15, y+7, z );
            SetPlayerColor( BTT, 0x80808000 );
        }
    }
    SetTimerEx( "NPabaiga", 60000, false, "i", playerid );
    return true;
}



Re: bots bug - chevyseba1 - 12.12.2013

Put the bots in the virtual words that you are in.