[HELP] Scripting help of DIALOG - 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: [HELP] Scripting help of DIALOG (
/showthread.php?tid=610289)
[HELP] Scripting help of DIALOG -
SHFaCeBook - 22.06.2016
Hello
so i have command of carradio , and i want to make again if he press "R" he get dialog, what i can do? any help please
this
Код:
CMD:carradio(playerid,params[])
{
if(IsPlayerInAnyVehicle(playerid))
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new StringCut[1000];
strcat(StringCut, "Turn OFF\n");
strcat(StringCut, "Pro FM Romania\n");
strcat(StringCut, "Radio Bandit Romania\n");
strcat(StringCut, "Radio Taraf Romania\n");
strcat(StringCut, "Radio Hot Romania\n");
strcat(StringCut, "Radio Gangsta Dance\n");
strcat(StringCut, "Radio Gangsta Manele\n");
strcat(StringCut, "Radio Tequilla Romania Hip-Hop\n");
strcat(StringCut, "Radio Greu de Difuzat Hip-Hop\n");
strcat(StringCut, ".977 Hitz\n");
strcat(StringCut, ".977 Mix\n");
strcat(StringCut, ".977 Alternative\n");
strcat(StringCut, "SKY.FM - Urban Jamz\n");
strcat(StringCut, "SKY.FM - Top Hits\n");
strcat(StringCut, "di.fm - breakz\n");
strcat(StringCut, "di.fm - drum and bass\n");
strcat(StringCut, "Radio Hit Romania\n");
strcat(StringCut, "Radio Club-Mix Romania\n");
strcat(StringCut, "Kiss FM Romania[audio plugin]\n");
strcat(StringCut, "Radio Zu Romania[audio plugin]\n");
strcat(StringCut, "Radio Popular");
ShowPlayerDialog(playerid, Dialog_radio, DIALOG_STYLE_LIST, "Server: Car Radio Player", StringCut, "Select", "Cancel");
return 1;
}
}
return 1;
}
i want make like this , m me i have big list of radio :
Код:
if ((newkeys==KEY_CTRL_BACK )&&(IsPlayerInAnyVehicle(playerid))&&(GetPlayerState(playerid)==PLAYER_STATE_DRIVER))
{
ShowPlayerDialog(playerid, Dialog_RADIOO, DIALOG_STYLE_LIST, "Online Car Radio:", "Turn OFF\nPro FM\nRadio Bandit\nRadio Taraf\nRadio ZU[Audio Plugin]\nKiss FM[Audio Plugin]\nRadio Hot Style\nRadio Intens\nRadio Romanian Hip-Hop\nRadio Romanian Manele\nRadio Romanian Popular\nRadio GMusic Rock\nRadio Mafia\nRadio Greu de Difuzat\nRadio FadedRPG", "Select", "Cancel");
}
+rep for any one helped me.
best regards.
Re: [HELP] Scripting help of DIALOG -
Ult1mate - 22.06.2016
Try this:
PHP код:
if((newkeys & KEY_CTRL_BACK) && !(oldkeys & KEY_CTRL_BACK) && (IsPlayerInAnyVehicle(playerid)) &&(GetPlayerState(playerid)==PLAYER_STATE_DRIVER))
{
cmd_carradio(playerid, " ");
}