Bot not in correct virtual world
#1

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;
}
Reply
#2

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

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.
Reply
#4

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.
Reply
#5

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
Reply
#6

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)