[AJUDA] /(r)adio
#3

William sempre pulando na frente kkkkkkkkk

assiim n ganho meu reputation

vou fazer uma base mesmo assim:

pawn Код:
#define BALLAS 1
new Org[MAX_PLAYERS];
forward MSGRadio(org, color, string[]);
public MSGRadio(membro, color, string[])
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(Org[i] == org)
        {
            SendClientMessage(i, color, string[]);
        }
    }
}
if(strcmp(cmd,"/r",true) == 0 || strcmp(cmd,"/radio",true) == 0)
{
    new length = strlen(cmdtext);
    while ((idx < length) && (cmdtext[idx] <= ' '))
    {
        idx++;
    }
    new offset = idx;
    new result[256];
    while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
    {
        result[idx - offset] = cmdtext[idx];
        idx++;
    }
    if(!strlen(result)) return SendClientMessage(playerid, -1, "Use /®adio [Texto]");
    if(Org[playerid] == BALLAS)
    {
        new nome[MAX_PLAYER_NAME];
        GetPlayerName(playerid,nome,sizeof(nome));        
        format(string,sizeof(string),"[RADIO]: %s: %s",nome,result);
        MSGRadio(BALLAS,-1,string);
        return 1;
    }
}
Nem Testei, Mas ve se funfa ai

Ajudei? Reputation
Reply


Messages In This Thread
[AJUDA] /(r)adio - by Expectus - 05.10.2011, 20:22
Re: [AJUDA] /(r)adio - by WLSF - 05.10.2011, 20:31
Re: [AJUDA] /(r)adio - by Jason` - 05.10.2011, 20:31
Re: [AJUDA] /(r)adio - by Expectus - 05.10.2011, 20:34
Re: [AJUDA] /(r)adio - by WLSF - 05.10.2011, 20:37
Re: [AJUDA] /(r)adio - by Jason` - 05.10.2011, 20:39
Re: [AJUDA] /(r)adio - by Expectus - 05.10.2011, 20:51
Re: [AJUDA] /(r)adio - by Expectus - 05.10.2011, 20:54
Re: [AJUDA] /(r)adio - by Jason` - 05.10.2011, 20:54
Re: [AJUDA] /(r)adio - by WLSF - 05.10.2011, 21:00

Forum Jump:


Users browsing this thread: 1 Guest(s)