Looking for explanations and differences between these
#1

I'm looking for a detailed difference between -

https://sampwiki.blast.hk/wiki/NPC:OnPlayerText
and
https://sampwiki.blast.hk/wiki/OnPlayerText


Also, I was wondering how exactly an NPC works.

If an NPC runs as a completely different script, we could put some major pieces of code not involving main players away from the MAIN script into the NPC's pawn file and perform them in the NPC's script which would cause less lag yet work the same way?

Instead of running massive string checks under OnPlayerText, we could run these checks under the NPC's script and separate these from the main script, which would probably reduce the load (this can make a big difference in a 300-400 player server/800-1000 player server)

Same for the other functions we're provided with in a_npc

Also, I'm looking for an explanation of SendChat and SendCommand in NPC scripts since there's no wiki documentation on this, I want to know how this works.

Can someone enlighten me?


My main question - Do NPC's run on completely different scripts from the main gamemode? If yes, can they accurately handle the SAME code as the main gamemode

And even if this is possible, how much would this be accurate and how can this be useful/a disadvantage?
Reply


Messages In This Thread
Looking for explanations and differences between these - by CreativityLacker - 23.02.2013, 14:26
Re: Looking for explanations and differences between these - by Vince - 23.02.2013, 14:58
Re: Looking for explanations and differences between these - by CreativityLacker - 23.02.2013, 16:40

Forum Jump:


Users browsing this thread: 1 Guest(s)