Problem with this command ? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Problem with this command ? (
/showthread.php?tid=323990)
Problem with this command ? -
sniperwars - 07.03.2012
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 ?
Re: Problem with this command ? -
IstuntmanI - 07.03.2012
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.
Re: Problem with this command ? -
sniperwars - 07.03.2012
I am only using DCMD in the script.
Re: Problem with this command ? -
Shabi RoxX - 07.03.2012
Some how setvolume is returning false I think
Re: Problem with this command ? -
sniperwars - 07.03.2012
I'm using an include called "Audio" which controls the audio.
Re: Problem with this command ? -
Shabi RoxX - 07.03.2012
Ok try removing setvolume line from here and use in dialog responce?