![]() |
putnpc/putnpc2
I know how to use these, but what player do the playerattributes pertain to? like, playerx, playermp, playerhearts, ect.
does it go to the player that is the 1st in the level, or the player that had the script that placed it? |
depends if its clientsided/server sided
putnpc2 is only p2p putnpc is both .. and free scripts are always client sided |
hmm
okay, so, if it's clientside, it affects the player that placed it, if it's server side, it affects the 1st player in the level?
What about join? If you call an NPC using putnpc2, and use join, while in client side, will that not function, or will it work fine and effect the caller of the npc. ex: //#CLIENTSIDE if (this.blah = 0) { putnpc2 {join scriptname.txt}; } or does join ONLY work if it's in a server side section? |
Re: hmm
Quote:
NPC Code:The setting of the variables is performed before the created of the NPC put wih putnpc2. |
when
"playerx" and such is in an event, the default index is the player that triggered the event. if it is in a timeout event, I think playerx would be the 1st player in the level, but I am not sure if this is the case. for example if (playertouchsme) playermp=100; //Player that touched if (washit) playermp=100; //Player that hit if (playerchats) { putnpc2 blah blah blah { if (created) playermp=100 //Player that caused the creation by chatting } } |
Ok. Clientside NPC's are activated and ran from the client's computer. Basically, the client recieves a "copy" of the NPC. In serverside, the NPC's are on the server; each client does not receive a copy. So, that way, all clients can access the NPC and use it "together".
|
ok
thanx. Even though its a little more complicated idea than you guys think, these basic ideas helped a lot ;).
:) |
| All times are GMT +2. The time now is 12:36 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.