I'm having problems with sendTo();. I type this into my plugin: PHP: $user = $issuer->username;$this->api->chat->sendTo(false,"MESSAGE",$user); and nothing happens. :/ (P.S. to @Falk and @Glitchmaster_PE: I fixed $args and $issuer. )
DANG, GLITCH, YOU'RE FAST. My page finished loading and I clicked your name because I thought I might have spelled it wrong, and it said you were seen a moment ago viewing this thread. LESS THAN 5 SECONDS.
I did that because I thought the problem was I was using $issuer right in the function, like: PHP: $this->api->chat->sendTo(false,"MESSAGE",$issuer);
$user isn't. It is simply the users name. Think about it as the different between who you are and the name you go by
How do I make $issuer an object? Sometimes, I feel like such an idiot... It's still complaining that $issuer isn't an object.
Ok, I'm going to post some of my code to show where $issuer works, and to show where I put it. PHP: // stuffpublic function [SECRET, NO ONE CAN KNOW YET]($cmd,$args,$issuer) {$this->api->chat->broadcast("MY MESSAGE TO WHOLE SERVER " . $issuer); // Outputs "MY MESSAGE TO WHOLE SERVER LukeDarling".$issuer->sendChat("MESSAGE"); // Outputs to LukeDarling "". (A.K.A. ABSOLUTELY NOTHING, NOT EVEN A NEW LINE.)}// more stuff
PHP: // stuffpublic function [SECRET, NO ONE CAN KNOW YET]($cmd,$args,$issuer) {$username = $issuer->username;$this->api->chat->broadcast("MY MESSAGE TO WHOLE SERVER " . $username); // Outputs "MY MESSAGE TO WHOLE SERVER LukeDarling".$issuer->sendChat("MESSAGE"); // Outputs to LukeDarling "". (A.K.A. ABSOLUTELY NOTHING, NOT EVEN A NEW LINE.)}// more stuff