11.09.2011, 20:40
Hello. This is probably an extremely dumb question, but I've been coding, compiling, Googling, coding, compiling etc. for hours and I just cannot get a solution to my problem. I am trying to write a command that would execute code 1 on option x etc, like so:
/command x
SendClientMessage(playerid, COLOR_RED, LOL);
/command y
SendClientMessage(playerid, COLOR_RED, ROFL);
I have tried using switch and case and if, else if and else. Can someone provide me with an elegant, working example so I can adapt it to my script? Hopefully not using if, else if and else as I heard that is really inefficient. Cheers.
/command x
SendClientMessage(playerid, COLOR_RED, LOL);
/command y
SendClientMessage(playerid, COLOR_RED, ROFL);
I have tried using switch and case and if, else if and else. Can someone provide me with an elegant, working example so I can adapt it to my script? Hopefully not using if, else if and else as I heard that is really inefficient. Cheers.