![]() |
player.join()
On the Control-NPC under onActionPlayerOnline(), I added a line 'player.join("player");' In the class 'player' I made a public function we'll call it sayChat(message). In another player weapon I have player.sayChat("test"), but all I get is an error the F2 window saying function rapidwolve.sayChat() not found... blah blah...I searched forums on this and nothing worked. I know this can be done as I have seen it done before. Can anybody help?
|
Since the error is outputting to your console, I'm assuming you are trying the player function clientside. In that case, the function must be declared as public in the class clientside as well.
|
It is public on both of them obviously. What sense would it make to have the serverside one public and the clientside one regular -_-
|
Quote:
I was thinking more along the lines of you forgetting to add a copy of the function in the clientside portion of the class as well. EDIT: Ok, I played around with this. In some type of system NPC (onCreated), have the player join the class clientside too. Then it should work. |
You're aware that you can "say2" and "chat" serverside. It doesn't need to be clientside :o
|
Quote:
I admit I've never done anything on it clientside, but I don't see why it shouldn't work. I'll post some examples for you to look at ... in control NPC PHP Code:
PHP Code:
PHP Code:
|
Quote:
Quote:
|
| All times are GMT +2. The time now is 05:06 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.