[FilterScript] SuperNova NPC System - Streamer, walking, adding NPC with 1 function and more.
#1

SuperNova NPC System Beta 1.1

The new CNPC has been created!

You don't need npcmodes folder and OnPlayerRequestClass anymore. The only thing you should do is moving bot.amx file to the npcmodes folder from downloaded file. All NPCs will use bot.amx file. Then, add "new streamid = CreateStreamedNPC(...)" line to anywhere in gm. You will use SetNPCxxx(streamid.. functions instead of SetPlayerxxx(playerid.. functions. And if you want to remove npc, you will use DestroyStreamedNPC function.

If you want a bot to walk to a certain location, you can use 2 method.

1- WalkNPC(streamid_returned_from_create_function, walkid_for_walkend_callback, x,y,z,bool:run)
2- I copied playback recording functions to gamemode from npcmodes. You can use playback function.

Default NPC system? Can I use "ConnectNPC"?

No. You must use my system for all NPCs.

Will we use playerid?

No. CreateStreamedNPC will return stream id and you will use streamid for all NPC actions. Don't use player functions (SetPlayerPos etc.).

Why we must use streamid? Can't we use playerid?

System includes streamer. In some cases, NPCs will not be connected. When it connected/streamed in, it will have another playerid. But streamid will never change.

Is there something we should be aware of?

maxnpc limit in server.cfg and define's at the top of the file.

NPC walk system can be affected from lag problem in 0.3c. (https://sampforum.blast.hk/showthread.php?tid=212017)

It is one more thing you shouldn't forget, script is in the beta stage.

Callbacks

- OnNPCWalkEnd(streamid,walkid,method)

walkid should be entered to WalkNPC command.
Methods:
0- Automaticly.
1- By StopWalkNPC command.
2- You started playback and walking automaticly stoped.

- OnNPCRecordingPlaybackEnd(streamid)

Copied to gamemode from npcmodes.

Functions

pawn Код:
public CreateStreamedNPC(const name[], skin, Float:x, Float:y, Float:z, Float:angle,viwo)
public DestroyStreamedNPC(streamid)
public WalkNPC(streamid,walkid,Float:x,Float:y,Float:z,bool:run)
public StopWalkNPC(streamid)
public SetNPCPos(streamid,Float:x,Float:y,Float:z)
public SetNPCFacingAngle(streamid,Float:angle)
public SetNPCVirtualWorld(streamid,viwo)
public SetNPCSkin(streamid,skinid)
public ApplyNPCAnimation(streamid,animlibs[],animnames[],Float:fS,timer,freeze,loop)
public ClearNPCAnimations(streamid)
public StartRecordingPlayback(streamid,playbacktype,recordname[])
public StopRecordingPlayback(streamid)
Download

Waiting for your feedback.

b1: http://solidfiles.com/d/efa184/
b1.1: http://solidfiles.com/d/9eab/
Reply


Messages In This Thread
SuperNova NPC System - Streamer, walking, adding NPC with 1 function and more. - by erorcun - 07.07.2011, 22:18
Re: SuperNova NPC System - Forget npcmodes folder. - by Donya - 07.07.2011, 22:29
Re: SuperNova NPC System - Forget npcmodes folder. - by erorcun - 07.07.2011, 22:32
Re: SuperNova NPC System - Forget npcmodes folder. - by SmileyForCheat - 07.07.2011, 23:07
Re: SuperNova NPC System - Forget npcmodes folder. - by PCheriyan007 - 07.07.2011, 23:36
Re: SuperNova NPC System - Forget npcmodes folder. - by Lorenc_ - 08.07.2011, 00:41
Respuesta: SuperNova NPC System - Forget npcmodes folder. - by AlexD1151 - 08.07.2011, 00:42
Re: SuperNova NPC System - Forget npcmodes folder. - by Ricop522 - 08.07.2011, 01:44
Re: SuperNova NPC System - Forget npcmodes folder. - by erorcun - 08.07.2011, 09:57
Re: SuperNova NPC System - Streamer, walking, adding NPC with 1 function and more. - by erorcun - 08.07.2011, 13:19
Re: SuperNova NPC System - Streamer, walking, adding NPC with 1 function and more. - by [LF]Mr.Lucci - 21.07.2011, 21:47
Re: SuperNova NPC System - Streamer, walking, adding NPC with 1 function and more. - by MisterTickle - 22.07.2011, 20:47
Re: SuperNova NPC System - Streamer, walking, adding NPC with 1 function and more. - by Capitan_Price - 22.07.2011, 20:52
Re: SuperNova NPC System - Streamer, walking, adding NPC with 1 function and more. - by Sasino97 - 22.07.2011, 21:39
Re: SuperNova NPC System - Streamer, walking, adding NPC with 1 function and more. - by MisterTickle - 23.07.2011, 05:58
Re: SuperNova NPC System - Streamer, walking, adding NPC with 1 function and more. - by !!--Ryder_RO--!! - 23.07.2011, 06:19
Re: SuperNova NPC System - Streamer, walking, adding NPC with 1 function and more. - by System64 - 23.07.2011, 06:25
Re: SuperNova NPC System - Streamer, walking, adding NPC with 1 function and more. - by [LF]Mr.Lucci - 26.07.2011, 09:38
Re: SuperNova NPC System - Streamer, walking, adding NPC with 1 function and more. - by Nexotronix - 26.07.2011, 19:57
Re: SuperNova NPC System - Streamer, walking, adding NPC with 1 function and more. - by [LF]Mr.Lucci - 01.08.2011, 09:03
Re: SuperNova NPC System - Streamer, walking, adding NPC with 1 function and more. - by erorcun - 02.08.2011, 19:46
Re: SuperNova NPC System - Streamer, walking, adding NPC with 1 function and more. - by [LF]Mr.Lucci - 03.08.2011, 07:45
Re: SuperNova NPC System - Streamer, walking, adding NPC with 1 function and more. - by erorcun - 03.08.2011, 14:14
Re: SuperNova NPC System - Streamer, walking, adding NPC with 1 function and more. - by [LF]Mr.Lucci - 05.08.2011, 03:29
Re: SuperNova NPC System - Streamer, walking, adding NPC with 1 function and more. - by erorcun - 06.08.2011, 21:15
Re: SuperNova NPC System - Streamer, walking, adding NPC with 1 function and more. - by Sasino97 - 07.08.2011, 21:14
Re: SuperNova NPC System - Streamer, walking, adding NPC with 1 function and more. - by Lorenc_ - 09.08.2011, 07:58
Re: SuperNova NPC System - Streamer, walking, adding NPC with 1 function and more. - by [LF]Mr.Lucci - 10.08.2011, 06:42
Re: SuperNova NPC System - Streamer, walking, adding NPC with 1 function and more. - by juraska - 15.10.2011, 19:08
Re: SuperNova NPC System - Streamer, walking, adding NPC with 1 function and more. - by Niko_boy - 23.04.2012, 13:37
Re: SuperNova NPC System - Streamer, walking, adding NPC with 1 function and more. - by Dude_Lebowski - 23.04.2012, 14:45
Re : SuperNova NPC System - Streamer, walking, adding NPC with 1 function and more. - by C0b0ll - 17.06.2012, 09:48
Re: SuperNova NPC System - Streamer, walking, adding NPC with 1 function and more. - by shoaib_sait - 15.02.2013, 12:26
Re: SuperNova NPC System - Streamer, walking, adding NPC with 1 function and more. - by 007Skyfall - 15.02.2013, 14:07

Forum Jump:


Users browsing this thread: 2 Guest(s)