View Single Post
  #1  
Old 05-03-2011, 06:39 PM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
Chat customizer!

So i finally figure how to trigger serverside! Its opened a lot more options to me with GS2. Anyway, heres what i came up with. Hope you like it. Its only very simple but to me, its a huge step!

PHP Code:
//Scripted by Emera. Chat Customizer!
function ActionServerSide() {
  if ( 
params[0] == "chat" ) {
    
player.chat(params[1]);
  }
}
//#CLIENTSIDE
function onPlayerChats() {
if (
player.chat == player.chat) {
player.chat "Emera: "@player.chat;
}
}

for ( 
temp.allplayers ) {
  
with (temp.p) {
    
triggerServer"gui"this.name"chat"message );
  }

It starts of the players chat with the message in the script. You can change it from "Emera: " by typing other messages in. There is no on / off yet because i haven't got to that stuff yet. Thanks guys.
__________________
Reply With Quote