Help with a command
#1

So i have
a inside game radio managment

which you can play music for other player while you are ingame

what i want is the if i am the owner of radio #1 and a player is listening to Radio #1
and i type /microfono1 (message) it will send a message to all player listening to radio #1


so this is what i was trying to do



pawn Код:
if (strcmp("/Microfono1", cmdtext, true, 11) == 0)
    {
        if(strlen(cmdtext) <= 11)
        {
            SendClientMessage(playerid,0xC7C7C7FF,"USAGE: /microfono1 (message)  -  Enter A Valid Cop Message.");
            return 1;
        }
        else
        {
            new output[255];
            new string[128];
            strmid(output,cmdtext,3,strlen(cmdtext));
            format(string, sizeof(string), "[Locutor de Radio %d]: %s", Emisser[1],output);
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                checkindex(playerid);
                if(GetVar(playerid, "pvar1") == 1)
                {
                    format(string, sizeof(string), "[Locutor de Radio %s]: %s",Emisser[1],output);
                    Microfono1(blue,string);
                    //SendClientMessage(i,blue,string);
                    return 1;
                }
                else
                {
                    if(isnull(cmdtext)) return SendClientMessage(playerid,0xC7C7C7FF,"usted no es locutor de radio.");
                    SendClientMessage(playerid,0xC7C7C7FF,"usted no es locutor de radio.");
                    return 1;
                }
            }
        }
    }


    forward Microfono1(color,const string[]);
    public Microfono1(color,const string[])
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        new pvar1 = GetPVarInt(i,"pvar1");
        if(IsPlayerConnected(i) == 1) if(pvar1==pvar1) SendClientMessage(i,color,string);
    }
    return 1;
}

Help Help Help please!!!

If you help me i will give you the filterscript (If you want)
Reply


Messages In This Thread
Help with a command - by yancarlos4500 - 18.07.2013, 02:45
Re: Help with a command - by Elie1996 - 18.07.2013, 08:20
Respuesta: Help with a command - by yancarlos4500 - 18.07.2013, 14:36
Re: Help with a command - by Elie1996 - 18.07.2013, 17:57
Respuesta: Help with a command - by yancarlos4500 - 19.07.2013, 15:05

Forum Jump:


Users browsing this thread: 1 Guest(s)