[FilterScript] mDJ System v1.0.0
#1

Introduзгo:

Este й um sistema simples de colocar para tocar musica em algum lugar, й bem simples e da pra vocк fazer diversas coisas com ele. Para usa-lo й sу digitar ''/tocar'' le colocar o link da sua musica (de preferкncia upada no Dropbox), logado na RCON.


Prints:






Download:
pawn Код:
#include <a_samp>
#include <zcmd>
#define FILTERSCRIPT

#define COLOR_RED                                                               0xFF0000FF
#define VERMELHO                                                                0xFF030FFF
#define TOCAR                                                                   666

new Float:gx,Float:gy,Float:gz;

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" mDJ System - Carregado");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    return 0;
}

CMD:tocar(playerid)
{
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_RED,"Erro: Vocк nгo tem permissгo.");
    ShowPlayerDialog(playerid,TOCAR,DIALOG_STYLE_INPUT,"mDJ System - v1.0.0","Coloque o URL/Link da Mъsica abaixo:","Tocar","Cancelar");
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == TOCAR)
    {
        if(response)
      {
        LigarTocar(playerid,inputtext);
      }
    }
    return 1;
}

stock GetDistanceBetweenPlayers(playerid,playerid2)
{
new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2;
new Float:tmpdis;
GetPlayerPos(playerid,x1,y1,z1);
GetPlayerPos(playerid2,x2,y2,z2);
tmpdis = floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));
return floatround(tmpdis);
}

stock LigarTocar(playerid, url[])
{
for(new i=0; i <= MAX_PLAYERS; i++)
if(GetDistanceBetweenPlayers(playerid, i) <= 60)
{
GetPlayerPos(playerid,gx,gy,gz);
if(strlen(url) <= 1) return SendClientMessage(playerid,VERMELHO,"Erro: Vocк nгo digitou nenhum link!");
PlayAudioStreamForPlayer(i,url,gx,gy,gz,90.0,true);
}
return 1;
}
Reply


Messages In This Thread
mDJ System v1.0.0 - by Menor - 05.11.2013, 04:00
Re: mDJ System v1.0.0 - by Schocc - 05.11.2013, 04:44
Re: mDJ System v1.0.0 - by mau.tito - 05.11.2013, 07:39
Re: mDJ System v1.0.0 - by smiiir - 05.11.2013, 08:55
Re: mDJ System v1.0.0 - by Kuddy - 05.11.2013, 11:13
Re: mDJ System v1.0.0 - by Schocc - 05.11.2013, 13:12
Re: mDJ System v1.0.0 - by iHarzard - 05.11.2013, 14:19
Re: mDJ System v1.0.0 - by Juniiro3 - 05.11.2013, 14:26
Re: mDJ System v1.0.0 - by PT - 05.11.2013, 16:31

Forum Jump:


Users browsing this thread: 1 Guest(s)