Dialog Help.
#1

So im trying to get this wonderful filterscript to merge with my /phone cmd.

filterscript
Код:
// Simple Filterscript - ******* music
// /dmusic = Edinson_Walker / EdinsonWalker.
// /music = jhgr16

#include < a_samp >

public OnFilterScriptInit() {
    print("       /phonemusic /music       ");
    return 1;
}

public OnFilterScriptExit() {
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[]) {
	if (strcmp("/phonemusic", cmdtext, true) == 0) {
		ShowPlayerDialog(playerid, 2016, DIALOG_STYLE_INPUT, "{D6E1EB}*******", "{FFFFFF}Insert the video/music title", "Accept", "Cancel");
		return 1;
	}
	return 0;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
	if(dialogid == 2016) {
		if (!response) return SendClientMessage(playerid, 0xD6E1EBFF, "Dialog music canceled.");
 		if(strlen(inputtext)) {
			new ola[255];
			format(ola, sizeof(ola), "https://6t.pe/?song=%s", inputtext);
			PlayAudioStreamForPlayer(playerid, ola);
		}
	}
    return 0;
}
Phone CMD
Код:
CMD:phone(playerid, params[])
{
	if (!Inventory_HasItem(playerid, "Cellphone"))
	    return SendErrorMessage(playerid, "You don't have a cellphone on you.");

    if (PlayerData[playerid][pHospital] != -1 || PlayerData[playerid][pCuffed] || PlayerData[playerid][pInjured] || !IsPlayerSpawned(playerid))
	    return SendErrorMessage(playerid, "You can't use this command now.");

	static
	    str[32];

	format(str, sizeof(str), "Phone (#%d)", PlayerData[playerid][pPhone]);

	if (PlayerData[playerid][pPhoneOff]) {
		Dialog_Show(playerid, MyPhone, DIALOG_STYLE_LIST, str, "Dial Number\nMy Contacts\nSend Text Message\nTurn On Phone", "Select", "Cancel");
	}
	else {
	    Dialog_Show(playerid, MyPhone, DIALOG_STYLE_LIST, str, "Dial Number\nMy Contacts\nSend Text Message\nTurn Off Phone", "Select", "Cancel");
	}
	return 1;
}
Can someone help me please. <3
Probably would need more of the code but i dont know which parts to include it into.
Reply


Messages In This Thread
[Assisted] Dialog Help. - by alexkeward - 22.08.2016, 10:56
Re: Dialog Help. - by DarkSkull - 22.08.2016, 11:01
Re: Dialog Help. - by alexkeward - 22.08.2016, 11:03
Re: Dialog Help. - by DarkSkull - 22.08.2016, 11:06
Re: Dialog Help. - by alexkeward - 22.08.2016, 11:08
Re: Dialog Help. - by DarkSkull - 22.08.2016, 11:12
Re: Dialog Help. - by alexkeward - 22.08.2016, 11:20
Re: Dialog Help. - by DarkSkull - 22.08.2016, 11:23
Re: Dialog Help. - by alexkeward - 22.08.2016, 11:24

Forum Jump:


Users browsing this thread: 1 Guest(s)