[AJUDA]Chat Adm !!
#4

Quote:
Originally Posted by Devastador
Посмотреть сообщение
Assim й bem mais fбcil, repare:

pawn Код:
if(strcmp(cmd,"/ac",true) == 0)
{
    if(pAdmin[playerid] >= 1)
    {
        text = strtok(cmdtext,idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid,-1,"Digite: /ac [texto]");
            return true;
        }

        format(string,sizeof(string),"%s",text);
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(pAdmin[i] >= 1)
            {
                SendClientMessage(i,-1,string);
            }
        }
    }
    else SendClientMessage(playerid,-1,"Sem permissгo.");
    return true;
}
Nгo estб faltando muita coisa neste codigo, nгo ? o.o'

PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
    if(
strcmp(cmd,"/ac",true)==0)
    {
        new 
aname[MAX_PLAYER_NAME];
        
GetPlayerName(playeridanameMAX_PLAYER_NAME);
        new 
length strlen(string);
        while ((
index length) && (string[index] <= ' '))
        {
            
index++;
        }
        new 
offset index;
        new 
result[20];
        while ((
index length) && (string[index] > ' ') && ((index offset) < (sizeof(result) - 1)))
        {
            
result[index offset] = string[index];
            
index++;
        }
        
result[index offset] = EOS;
        if(
pAdmin[playerid] < 1) return SendClientMessage(playerid,Vermelho,"(ERRO) Vocк nгo tem permissгo para usar este comando!");
        if(!
strlen(result)) return SendClientMessage(playerid,Vermelho"(ERRO) Digite: /ac [texto]");
        
format(stringsizeof(string), "(»)Chat-Admin(«) %s(%d) diz:%s"anameplayeridresult);
        for(new 
0GetMaxPlayers(); i++)
        {
            if(
pAdmin[i] < 1) continue;
            
SendClientMessage(iVerdestring);
        }
        return 
1;
    }
    return 
0;

Reply


Messages In This Thread
[AJUDA]Chat Adm !! - by dPlaYer_ - 21.07.2011, 23:53
Re: [AJUDA]Chat Adm !! - by ViniBorn - 21.07.2011, 23:59
Re: [AJUDA]Chat Adm !! - by Devastador - 22.07.2011, 01:39
Re: [AJUDA]Chat Adm !! - by Shadoww5 - 22.07.2011, 01:51
Re: [AJUDA]Chat Adm !! - by Devastador - 22.07.2011, 02:08
Re: [AJUDA]Chat Adm !! - by Shadoww5 - 22.07.2011, 08:34
Re: [AJUDA]Chat Adm !! - by array13 - 22.07.2011, 09:48
Re: [AJUDA]Chat Adm !! - by Shadoww5 - 22.07.2011, 15:57
Re: [AJUDA]Chat Adm !! - by dPlaYer_ - 22.07.2011, 16:03
Re: [AJUDA]Chat Adm !! - by steki. - 22.07.2011, 16:04

Forum Jump:


Users browsing this thread: 4 Guest(s)