[DUV] Ajuda FS
#6

Olб
duany123
, Criei Este para vocк..

Agora quer ser meu Amigo? rs

[FS]

Aqui
pawn Код:
#include <a_samp>

new CaraMutadoPorra[MAX_PLAYERS];



public OnPlayerCommandText(playerid, cmdtext[])
{
    new cmd[128], idx;
    cmd = strtok(cmdtext, idx);

    if(strcmp(cmd, "/ignorar", true) == 0)
    {
        new tmp[128];
        tmp = strtok(cmdtext, idx);
        new giveplayer;
        tmp = strtok(cmdtext, idx);
        giveplayer = strlen(tmp);

        if(strlen(tmp) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "Uso do Comando: /ignorar [id]");
 
        CaraMutadoPorra[giveplayer]++;
        return 1;
    }
    if(strcmp(cmd, "/liberar", true) == 0)
    {
            new tmp[128];
        tmp = strtok(cmdtext, idx);
        new giveplayer;
        tmp = strtok(cmdtext, idx);
        giveplayer = strlen(tmp);
        if(strlen(tmp) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "Uso do Comando: /ignorar [id]");
 
        CaraMutadoPorra[giveplayer]--;
        return 1;
    }
    return 0;
}
public OnPlayerText(playerid, text[])
{
 
  if(CaraMutadoPorra[playerid] == 1) return 0;
  return 1;
}
strtok(const string[], &index)
{
    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;
    return result;
}
Nгo Testei mais tenho 99% de Certeza que Funciona xD
Reply


Messages In This Thread
[DUV] Ajuda FS - by duany123 - 31.05.2010, 16:47
Re: [DUV] Ajuda FS - by zSuYaNw - 31.05.2010, 17:02
Re: [DUV] Ajuda FS - by duany123 - 31.05.2010, 17:03
Re: [DUV] Ajuda FS - by zSuYaNw - 31.05.2010, 17:50
Re: [DUV] Ajuda FS - by duany123 - 31.05.2010, 18:36
Re: [DUV] Ajuda FS - by ipsBruno - 31.05.2010, 23:22
Re: [DUV] Ajuda FS - by russo666 - 31.05.2010, 23:26
Re: [DUV] Ajuda FS - by ipsBruno - 31.05.2010, 23:29
Re: [DUV] Ajuda FS - by russo666 - 31.05.2010, 23:35
Re: [DUV] Ajuda FS - by duany123 - 01.06.2010, 01:49

Forum Jump:


Users browsing this thread: 4 Guest(s)