Problem with NPC
#1

Hello !

I have problem with NPC...

Код:
                else if(!strcmp(npcname,"Molly_Nilson",true))
		{
			NPC[2] = playerid;
			SetPlayerPosEx(NPC[2], 359.7139,173.5689,1008.3893);
			SetPlayerColor(NPC[2],TEAM_HIT_COLOR);
			SetSpawnInfo(NPC[2], 0, 76,0.0,0.0,0.0,0,0,0,0,0,0,0);
			SetPlayerFacingAngle(NPC[2], 266.9489);
			SetPlayerSkin(NPC[2], 76);
			return 1;
		}
Here u can see, i set PlayerPos, Color, Spawn, Skin, but... All 20 bots lose coordinates, color's, skin's...

They spawn beyond the world... Maybe everyone can help me ?

Sorry for my bad English.
Reply
#2

Try here!
https://sampwiki.blast.hk/wiki/NPC:Main_Page

_____________________________________________
Just press +rep if i helped you
Reply
#3

That code is supposed to be at OnPlayerSpawn not on OnPlayerConnect.Where is that code?
Reply
#4

https://sampwiki.blast.hk/wiki/NPC:Main_Page
Reply
#5

Yashas, public OnPlayerSpawn(playerid)

They are here.
Reply
#6

So, everyone can help ?
Reply
#7

Код:
public OnNPCConnect(myplayerid)
{
    printf("I successfully connected the server with ID %i!", myplayerid);
}
Reply
#8

I'd recommend using a filterscript to load the NPC's, and then use the callbacks on this page to provide yourself and fellow administrators with print statements to let you know that they spawned successfully once you've loaded the filterscript.
Reply
#9

I dont want add NPC to Filterscript's, i think would be better if they stay inside GM
Reply
#10

So, everyone can help ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)