Quote:
Originally posted by MrGannondorf
Can anyone make use of the rpg window?
|
Sure I can, easily. Here is a chat system, allthough basic. I submit it to the forums, anyone can use it.
NPC Code:
// NPC made by TGC
// NPC Weapon, weaponname: TGC Chat System.
if (actionserverside) {
for (a=0;a<allplayerscount;a++) {
with (allplayers[a]) {
if (strequals(#s(client.chatsystem),on)) sendrpgmessage #p(0);
}
}
}
//#CLIENTSIDE
if (weaponfired) {
if (strlen(#s(client.chatsystem))==0) setstring client.chatsystem,off;
if (strequals(#s(client.chatsystem),off)) {
setstring client.chatsystem,on;
setplayerprop #c,Chat Enabled, say /chat <message> to send a message;
} else {
setstring client.chatsystem,off;
setplayerprop #c,Chat disabled;
}
}
if (playerchats) {
tokenize #c;
if (strequals(#s(client.chatsystem),on)) {
if (strequals(#t(0),/chat)) {
triggeraction 0,0,serverside,TGC Chat System,"#n: #e(6,-1,#c)";
setplayerprop #c,Message Sent;
}
}
}
Fire the weapon to enable/disable it. Say "/chat <message>" to send a message. Press F2 to view the RPG Window. :-)