Problem with this command ?
#1

Hi guys,

Just finished rescripting my radio system from scratch using the DCMD command system.
I have 1 problem. When I open my test server and type in /radio, It says unknown command.

This is the command:
pawn Код:
dcmd_radio(playerid, params[])
{
    #pragma unused params
    Audio_SetVolume(playerid, Radio[playerid], 100);
    SendClientMessage(playerid,COLOR_GREEN, "Choose a radio station to listen to.");
    ShowPlayerDialog(playerid, RADIO, DIALOG_STYLE_LIST, "Drifting Legends Radio", "{FF1400}0) BlackBeats.FM\n{FFB400}1) 977 FM (Rock)\n{DCDCDC}2) 181 FM (Rock)\n{19FF00}3) Radio Paradise\n{FF00D7}4) Metal Only\n{CD0000}5) Musik Metal\n{2800FF}6) ChroniX Aggression\n{F5FF00}7) ChroniX GRIT Radio\n{C800FF}8) Hot Jamz\n{FF6400}9) Xtreme\n{FFD200}10) Metal\n{FF3C00}11) ChroniX Metal\n{EBFF00}12) MUSIK.ROCK (EXTREME)\n{007DFF}13) 1POWER\n{00FFF0}14) Vocal Trance\n{FF000F}Radio Off", "Select", "Cancel");
    return 1;
}
Below the OnPlayerCommandText:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    dcmd(radio,5,cmdtext);
    return 0;
}

Can anyone fix this ?
Reply
#2

Put this command in your command and make sure that you don't use ZCMD and DCMD in same script, you can use only 1 command processor.
Reply
#3

I am only using DCMD in the script.
Reply
#4

Some how setvolume is returning false I think
Reply
#5

I'm using an include called "Audio" which controls the audio.
Reply
#6

Ok try removing setvolume line from here and use in dialog responce?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)