Hi.
Code:
function onPlayerTouchsMe() {
this.chat = "I lost my wine bottle! Where could it have gone? Please find it for me!";
if (player.clientr.questwine >= 1 && player.clientr.winequest = 0); { //checks if player has the wine bottle, and no item "winequest"
player.clientr.coins += 50 && player.clientr.questwine = 0 && player.clientr.winequest += 1; //gives the player coins and the item. . . . . . "winequest" so they can't redo the quest.
}
}
The line highlighted in red will not work. When comparing using conditional statements, you must use "==" instead of "=" for equals to.
You will also need to separate each of the statements by itself.
PHP Code:
Example:
if (player.clientr.questwine >= 1 && player.clientr.winequest == 0); {
player.clientr.coins += 50;
player.clientr.questwine = 0;
player.clientr.winequest += 1;
}
Code:
//#CLIENTSIDE
function onPlayerChats() {
if (player.chat = "bank") {
this.chat = "Deposit or Withdraw?";
}
if (this.chat = "Deposit or Withdraw?" && player.chat = "deposit") {
this.chat = "Please state the amount you would like to deposit.";{
player.clientr.bankcoins += player.chat && player.clientr.coins -= player.chat;
}
}
}
The highlighted portion will not work, it has incorrect syntax.
PHP Code:
Solution:
//#CLIENTSIDE
function onPlayerChats() {
if (player.chat = "bank") {
this.chat = "Deposit or Withdraw?";
}
if (this.chat == "Deposit or Withdraw?" && player.chat == "deposit") { //use "=="
this.chat = "Please state the amount you would like to deposit.";
}
if (this.chat == "Please state the amount you would like to deposit.") {
player.clientr.bankcoins += player.chat; //here I would suggest checking to see if player.chat
player.clientr.coins -= player.chat; //is an integer, has no characters, not a negative number, etc. before depositing
}
}