[Pedido]Tutoriais
#5

pawn Код:
if(strcmp(cmd,"/r",true)==0)
{
    new aname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
    new tmp[128];
    strmid(tmp, cmdtext, 3, strlen(cmdtext));
    if(!strlen(tmp))
    {
        SendClientMessage(playerid, Vermelho, "/r [texto]");
        return 1;
    }
    else
    {
        format(string, sizeof(string), "(Chat Cops) %s: %s", aname, tmp);
        Chatp(GetPlayerColor(playerid), string, 1, playerid);
        return 1;
    }
}

forward Chatp(COLOR, const string[], level, playerid);
public Chatp(COLOR, const string[], level, playerid)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(/*Variavel dos (parceiros)*/ == /*Variavel dos (parceiros)*/)
            {
                SendClientMessage(i, COLOR, string);
            }
        }
    }
    return 1;
}
pawn Код:
if(strcmp(cmd,"/m",true)==0)
{
    new aname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
    new tmp[128];
    strmid(tmp, cmdtext, 3, strlen(cmdtext));
    if(!strlen(tmp))
    {
        SendClientMessage(playerid, Vermelho, "/m [texto]");
        return 1;
    }
    else
    {
        format(string, sizeof(string), "(Chat Motoqueiros) %s: %s", aname, tmp);
        Chatp(GetPlayerColor(playerid), string, 1, playerid);
        return 1;
    }
}

forward Chatm(COLOR, const string[], level, playerid);
public Chatm(COLOR, const string[], level, playerid)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(/*Variavel dos (parceiros)*/ == /*Variavel dos (parceiros)*/)
            {
                SendClientMessage(i, COLOR, string);
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
[Pedido]Tutoriais - by Mteck - 26.02.2012, 23:39
Re: [Pedido]Tutoriais - by PlayeR_TheReturN - 26.02.2012, 23:44
Re: [Pedido]Tutoriais - by Abravanel - 26.02.2012, 23:52
Re: [Pedido]Tutoriais - by Mteck - 26.02.2012, 23:58
Re: [Pedido]Tutoriais - by PlayeR_TheReturN - 27.02.2012, 00:19
Re: [Pedido]Tutoriais - by steeldark - 27.02.2012, 00:19
Re: [Pedido]Tutoriais - by Mteck - 27.02.2012, 01:23

Forum Jump:


Users browsing this thread: 1 Guest(s)