[PEDIDO] FS SO PARA ADMINS
#1

olб tenho esse FS mais gostaria q ele fosse apenas para adm alguem pode fazer isso pra mim esta aki o pawn code

Код:
//--------------------------------------------------|//
//|                                                 |//
//|      *           *    *    *    *   *      *    |//
//|      * *       * *    *    *  *     *      *    |//
//|      *   *   *   *    *    * *      *      *    |//
//|      *     *     *    *    * *      *      *    |//
//|      *           *    *    * *      *      *    |//
//|      *           *    *    *  *     *      *    |//
//|      *           *    *    *   *    *      *    |//
//|      *           *    *    *    *     *****     |//
//|                                                 |//
//|                                                 |//
//|                   Henrique_Favelado                       |//
//--------------------------------------------------//
//-------------------FS script by Henrique_Favelado-----------//
#include <a_samp>

#define COLOR_LIGHTGREEN 0x9ACD32AA // Verde Chiaro

#pragma tabsize 0

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" MP3 Player By Henrique_Favelado");
	print("--------------------------------------\n");
	return 1;
}

public OnFilterScriptExit()
{
	print("\n............................);
	print(" MP3 Player non caricata);
	print("............................\n);
	return 1;
}

#else

#endif

public OnPlayerConnect(playerid)
{
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/mp3", cmdtext, true, 10) == 0)
	{
        SendClientMessage(playerid,COLOR_LIGHTGREEN,"Info: MP3 By Henrique_Favelado Aprecie sem Moderaзгo XD");
	    ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "{FFFF00}MP3 Player By Henrique_Favelado","Don Omar - Danza Koduro\nJoan Jett - I love rock in roll\nAvanged Sevenfold - Nightmare\nAvanged Sevenfold - Afterlife\nLinkin Park - In The End\nMetallica - The Day That Never Comes\nAC/DC - Stiff Upper Lip\nGuns 'n' Roses - Sweet Child O'mine\nOzzy Osborne - Crazzy Train\nSlipknot - Duality\nGuns 'n' Roses - November Rain\n{E606FC}Parar de Tocar","Ok","Exit");
    	return 1;
	}
	return 0;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)
    {
    switch(dialogid)
        {
		case 1:
    	    {
           	switch(listitem)
        	{
        	    case 0:
        	    {
                    StopAudioStreamForPlayer(playerid);
                    PlayAudioStreamForPlayer(playerid, "http://24.media.v4.skyrock.net/music/245/dcd/245dcdbcbc5b0e5b2f89c26fc1eed062.mp3");
        	    }
        	    case 1:
        	    {
        	        StopAudioStreamForPlayer(playerid);
					PlayAudioStreamForPlayer(playerid, "http://dc318.4shared.com/img/339938649/4a59dc00/dlink__2Fdownload_2FzL-qWda3_3Ftsid_3D20120210-032540-f9b58284/preview.mp3");
        	    }
        	    case 2:
        	    {
        	        StopAudioStreamForPlayer(playerid);
					PlayAudioStreamForPlayer(playerid, "http://dc389.4shared.com/img/307220637/ae03eae2/dlink__2Fdownload_2F_5FPBm8lU6_3Ftsid_3D20120210-032941-388a4298/preview.mp3");
        	    }
        	    case 3:
        	    {
        	        StopAudioStreamForPlayer(playerid);
					PlayAudioStreamForPlayer(playerid, "http://dc349.4shared.com/img/250355547/379a1952/dlink__2Fdownload_2FTIJpNivg_3Ftsid_3D20120210-033207-f765dbaa/preview.mp3");
        	    }
        	    case 4:
        	    {
        	       StopAudioStreamForPlayer(playerid);
        	       PlayAudioStreamForPlayer(playerid, "http://jysan.free.fr/software/Linkin_Park-In-The-End.mp3");
        	    }
        	    case 5:
        	    {
        	       StopAudioStreamForPlayer(playerid);
        	       PlayAudioStreamForPlayer(playerid, "http://www.veve.atlasweb.cz/metallica.mp3");
        	    }
        	    case 6:
        	    {
        	       StopAudioStreamForPlayer(playerid);
        	       PlayAudioStreamForPlayer(playerid, "http://dc173.4shared.com/img/137416864/54088b63/dlink__2Fdownload_2FdS1Kto2I_3Ftsid_3D20120210-133203-714569db/preview.mp3");
        	    }
   	            case 7:
        	    {
        	       StopAudioStreamForPlayer(playerid);
        	       PlayAudioStreamForPlayer(playerid, "http://dc108.4shared.com/img/66796305/b317f90b/dlink__2Fdownload_2FCqJb8Vq-_3Ftsid_3D20120210-133435-fb36d633/preview.mp3");
        	    }
        	    case 8:
        	    {
        	       StopAudioStreamForPlayer(playerid);
        	       PlayAudioStreamForPlayer(playerid, "http://whitmanhansonbasketball.com/media/Ozzy_Ozbourne_-_Crazy_Train_.mp3");
        	    }
                case 9:
        	    {
                   StopAudioStreamForPlayer(playerid);
        	       PlayAudioStreamForPlayer(playerid, "http://home.comcast.net/~imagenetauctions/music/slipknot-duality.mp3");
        	    }
                case 10:
        	    {
                   StopAudioStreamForPlayer(playerid);
        	       PlayAudioStreamForPlayer(playerid, "http://dc234.4shared.com/img/272508222/2d8cfe3a/dlink__2Fdownload_2F4ncEoOJ_5F_3Ftsid_3D20120210-135337-f2cea5bc/preview.mp3");
        	    }
                case 11:
        	    {
        	       StopAudioStreamForPlayer(playerid);
        	    }
        	}
    	    }
	}
    }
    return 1;
}
Reply
#2

Sу irб funcionar se o jogador estiver logado na RCON.

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/mp3", cmdtext, true, 10) == 0)
    {
        if(!IsPlayerAdmin(playerid))
            return SendClientMessage(playerid,-1,"Somente Administradores logados na RCON podem usar este comando");
        SendClientMessage(playerid,COLOR_LIGHTGREEN,"Info: MP3 By Henrique_Favelado Aprecie sem Moderaзгo XD");
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "{FFFF00}MP3 Player By Henrique_Favelado","Don Omar - Danza Koduro\nJoan Jett - I love rock in roll\nAvanged Sevenfold - Nightmare\nAvanged Sevenfold - Afterlife\nLinkin Park - In The End\nMetallica - The Day That Never Comes\nAC/DC - Stiff Upper Lip\nGuns 'n' Roses - Sweet Child O'mine\nOzzy Osborne - Crazzy Train\nSlipknot - Duality\nGuns 'n' Roses - November Rain\n{E606FC}Parar de Tocar","Ok","Exit");
        return 1;
    }
    return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)