So, I have been trying to learn how to trigger to clientside from the serverside and I read cbk's post on it. Ive been messing with this script for a little while and I have no idea why this is not triggering on the clientside. I have put checks in on the serverside and clientside and both check out fine except for other players (besides me) on the clientside:
PHP Code:
function onActionServerSide() {
if (params[0] == "show") {
for (temp.pl: allplayers) {
if (pl.level.name == nil)
continue;
pl.triggerclient("gui", this.name, "disp");
}
}
if (params[0] == "sendpm") {
findplayer("pig132").sendPM(player.account @ " clicked!");
}
}
//#CLIENTSIDE
function onPlayerChats() {
if (player.chat = "/test") {
triggerserver("gui", this.name, "show");
}
}
function onActionClientSide() {
if (params[0] == "disp") {
CreateMenu();
}
}