ALERT!
Click here to register with a few steps and explore all our cool stuff we have to offer!
Home
Upgrade
Credits
Help
Search
Awards
Achievements
 2018

Chat Commands.

by Joalson - 04-18-2019 - 08:16 PM
#11
(08-06-2019 - 02:27 PM)GucciMang Wrote: if(recivedmessage == "money"){
if(cashdrop){
sendmessage(sender,"Money Drop Stopped");
cashdrop=false;
}
sendmessage(sender,"Money Drop Started");
selectedplayer = reciverplayer;
cashdrop = true;
}

cleaner way to do that would be like this as your way looks horrible

Code:
switch(recivedmessage ){
   case "money": cashdrop ? sendmessage(sender,"Money Drop started"), cashdrop = true : sendmessage(sender,"Money Drop stopped"), cashdrop = false; break;
}
Reply

Users browsing: 3 Guest(s)