06.03.2012, 17:22
Quote:
I want the /stopradio command to detect if the radio is off.
If the radio is off, I want It to send a client message saying "The radio is already turned off." |
pawn Код:
new bool:radio_on; /* You have to use this bool in an enum or anywhere else so you can also use it in /startradio. */
if (strcmp("/stopradio", cmdtext, true, 10) == 0)
{
if(radio_on == TRUE)
{
StopAudioStreamForPlayer(playerid);
SendClientMessage(playerid, COLOR_RED, "You have turned off the radio.");
radio_on = FALSE;
return 1;
}
else return SendClientMessage(playerid, COLOR_RED, "The radio is already turned off.");
}