Problema!
#7

Fiz Agora, Toma Aqui: Edit : colocado Pegar Nome
pawn Код:
if(strcmp("/kick", cmdtext, true, 4) == 0)
{
new mandarnome[MAX_PLAYER_NAME];
GetPlayerName(playerid, mandarnome, sizeof(mandarnome));
new string[256];
new kickid[256];
kickid = KcmD(1, cmdtext);
new mandarnome2[MAX_PLAYER_NAME];
GetPlayerName(strval(kickid), mandarnome2, sizeof(mandarnome2));
if(!strlen(kickid))
{
SendClientMessage(playerid,Cor_Aqui,"Use: /kick [id]");
return 1;
}
format(string,sizeof(string),"%s Kickou %s do servidor",mandarnome,kickid);
SendClientMessageToAll(Cor_Aqui,string);
Kick(strval(kickid));
return 1;
}
Add isto no final do seu gm

pawn Код:
stock KcmD(param, cmdtext[])
{
    new string[128], pos, var;
    format(string, sizeof(string), "%s ", cmdtext);

    while((pos = strfind(string, " ", true)) != -1) {
        if(var == param) return string;
        var++;

        strdel(string, 0, pos + 1);
        if(strcmp(string, " ", true, pos) == 0) goto end;
    }

    end:
    string[0] = '\0';
    return string;
}
Reply


Messages In This Thread
Problema! - by Domozinho - 04.01.2011, 15:05
Re: Problema! - by CyNiC - 04.01.2011, 15:56
Respuesta: Problema! - by ipsBruno - 04.01.2011, 16:12
Re: Problema! - by Domozinho - 04.01.2011, 16:37
Re: Problema! - by bugvip - 04.01.2011, 17:44
Re: Problema! - by Domozinho - 04.01.2011, 20:35
Re: Problema! - by -GooGle- - 04.01.2011, 20:40
Re: Problema! - by Domozinho - 04.01.2011, 21:27
Re: Problema! - by TiagoPS - 04.01.2011, 22:41
Respuesta: Problema! - by ipsBruno - 04.01.2011, 22:47

Forum Jump:


Users browsing this thread: 2 Guest(s)