SA-MP Forums Archive
Bot not in correct virtual world - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Bot not in correct virtual world (/showthread.php?tid=184677)



Bot not in correct virtual world - morris91 - 21.10.2010

For some reason my bot is not going to its correct virtual world. It stays in 0 where i need it to go to 1

Heres the script im using.

Код:
#include <a_samp>

#define FILTERSCRIPT

#if defined FILTERSCRIPT


public OnFilterScriptInit()
{

	ConnectNPC("[Bot]Simon","AAMAN");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

#else

#endif

public OnPlayerSpawn(playerid)
{
    if(IsPlayerNPC(playerid))
    {
        new npcname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, npcname, sizeof(npcname));
        if(!strcmp(npcname, "[Bot]Simon", true))
        {
            SetPlayerSkin(playerid, 189);
            SetPlayerVirtualWorld(playerid, 1);
        }
        return 1;
    }
	return 1;
}



Re: Bot not in correct virtual world - TouR - 21.10.2010

SetPlayerVirtualWorld(playerid, 1); <----- Virtual world should be 0


Re: Bot not in correct virtual world - iFriSki - 21.10.2010

May I ask why you're trying to place it in VW 1? The default is 0.

Anyhow, even if for some odd reason, does the bots skin change at least?

Quote:
Originally Posted by tour15
Посмотреть сообщение
SetPlayerVirtualWorld(playerid, 1); <----- Virtual world should be 0
He wants it in virtual world ID 1.


Re: Bot not in correct virtual world - morris91 - 21.10.2010

Because i have virtual worlds for diffrent activitys on my server

example, Dming is in vw 0, stunts are in vw 1 & freeroam vw 3 and i want my info bot to be places at a stunt in virtual world 1.
And yes, the bots skin does change.


Re: Bot not in correct virtual world - TouR - 21.10.2010

Quote:
Originally Posted by morris91
Посмотреть сообщение
Because i have virtual worlds for diffrent activitys on my server

example, Dming is in vw 0, stunts are in vw 1 & freeroam vw 3 and i want my info bot to be places at a stunt in virtual world 1.
And yes, the bots skin does change.
Its imposible mate.. The fact that the skin changes means it works. Check your players virtual world maybe you are at 1 too


Re: Bot not in correct virtual world - morris91 - 21.10.2010

Ok mate thank you. i didn't know if you could or not put bots in diffrent VW's but its okay, il just have to change a few things around. thanks anyway.