Update.
Here is the latest new and improved version.
Thanks fowlplay for your help.
PHP Code:
function onCreated() {
this.chat = "Votes: "@server.votes;
timeout = 0.1;
}
function onTimeout() {
onCreated();
}
function onPlayerchats() {
if (player.chat == "/vote") {
if (clientr.voted = 1) {
return;
}
player.chat = "Voted!";
server.votes += 1;
clientr.voted = 1;
}
if (player.chat == "/unvote") {
if (clientr.voted = 0) {
return;
}
if (clientr.voted = 1) {
clientr.voted = 0;
player.chat = "Unvoted!";
server.votes -= 1;
}
}
}
function onPlayertouchsme() {
say2("If You Like The New Menu Gui#bSay /vote To Vote Yes!#bYou Can Write /unvote To Cancel!");
}