[AJUDA] Cmd Frag
#1

Estou com um pequeno problema, quando eu digito /frag aparece no caso normal o meu frag, mais quando eu difigito /frag [id] .

Por exemplo /frag 1

Era para aparecer frag do player id 1, ou se nao tivesse player aparecer a mensagem "ERRO: ID jogador errado"

pawn Код:
if(!strcmp(cmdtext, "/frag", true)){
    new Target;
    if(Target == INVALID_PLAYER_ID) return SendClientMessage(playerid,Vermelho,"ERRO: ID jogador errado");
    new tname[MAX_PLAYER_NAME];
    GetPlayerName(Target,tname,sizeof(tname));
    format(string, sizeof(string), "Frags de %s" ,tname);
    SendClientMessage(playerid ,COLOR_GREEN, string);
    format(string, sizeof(string), "Matou %d ves(es) | Morreu %d ves(es) | Dominou %d Area(s) | Grana %d | X1 Ganhos %d | X1 Perdidos %d | Se matou %d" ,PlayerInfo[playerid][pMatou],PlayerInfo[playerid][pMorreu],PlayerInfo[playerid][pDominou],GetPlayerMoney(playerid),PlayerInfo[playerid][Ganhoux1],PlayerInfo[playerid][Perdeux1],PlayerInfo[playerid][pSematou]);
    SendClientMessage(playerid ,COLOR_YELLOW, string);
    }
    else{
    new Target;
    new pip[20];
    GetPlayerIp(Target,pip,sizeof(pip));
    format(string,sizeof(string),"{00FF40}Matou {FFFFFF}%d ves(es)\n{00FF40}Morreu {FFFFFF}%d ves(es)\n{00FF40}Dominou {FFFFFF}%d Area(s)\n{00FF40}Grana {FFFFFF}$%d\n{00FF40}X1 Ganhos: {FFFFFF}%d\n{00FF40}X1 Perdidos: {FFFFFF}%d\n{00FF40}Se Matou: {FFFFFF}%d\n",PlayerInfo[playerid][pMatou],PlayerInfo[playerid][pMorreu],PlayerInfo[playerid][pDominou],GetPlayerMoney(playerid),PlayerInfo[playerid][Ganhoux1],PlayerInfo[playerid][Perdeux1],PlayerInfo[playerid][pSematou]);
    SendClientMessage(playerid ,COLOR_YELLOW, string);
    return 1;
    }
Reply


Messages In This Thread
[AJUDA] Cmd Frag - by vascaino55 - 08.05.2012, 18:19
Re: [AJUDA] Cmd Frag - by paulor - 08.05.2012, 19:18
Re: [AJUDA] Cmd Frag - by vascaino55 - 08.05.2012, 19:28
Re: [AJUDA] Cmd Frag - by paulor - 08.05.2012, 19:33
Re: [AJUDA] Cmd Frag - by CidadeNovaRP - 08.05.2012, 22:00

Forum Jump:


Users browsing this thread: 1 Guest(s)