![]() |
Item Spawn
I am trying to make an item spawner. I am making it create an NPC at my mouses x and y, and when it is touched, it adds the weapon to the player and destroys itself. However, I can't get it to work. When I fire the weapon, it puts the NPC with the image bcalarmclock.png, and it changes the chat to the players chat. That is all done on created. In the class, this is what I have...
PHP Code:
I think it is something to do with the PlayerTouchsMe |
How would the class know you're touching the NPC in the first place?
|
Nvm now I fixed it. Thanks anyway.
|
Try giving it a shape:
PHP Code:
|
When you touch it, it destroys on your screen, but not on other players. X_X
Class PHP Code:
PHP Code:
|
|
Quote:
|
player.addweapon() is a server-side function, and destroying it on the client-side will only destroying it on your client (screen).
Removing //#CLIENTSIDE should make it work the way you want. |
Quote:
|
Quote:
|
function onPlayerTouchsme() will work serverside in everything but a weapon, but for what you are describing you should be using a class anyway.
|
Quote:
|
| All times are GMT +2. The time now is 07:11 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.