22.08.2016, 10:56
(
Последний раз редактировалось alexkeward; 22.08.2016 в 12:13.
)
So im trying to get this wonderful filterscript to merge with my /phone cmd.
filterscript
Phone CMD
Can someone help me please. <3
Probably would need more of the code but i dont know which parts to include it into.
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;
}
Код:
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;
}
Probably would need more of the code but i dont know which parts to include it into.

