[Ajuda] a Criar Org :D
#2

Oque acontece quando vocк tente setar um player para org ?

@OFF Exemplo bбsico, para admins logados na Rcon
pawn Код:
#define MAX_ORGS (20) // valor de orgs
new org[MAX_PLAYERS][MAX_ORGS];

CMD:convidar(playerid, params[])
{
    new otherId, orgId, cargoLvl;
    if(!IsPlayerAdmin(playerid))
        return SendClientMessage(playerid, -1, "Vocк nгo й um admin Rcon.");
       
    if(sscanf(params, "udd", otherId, orgId, cargoLvl))
        return SendClientMessage(playerid, -1, "/convidar [id][org]");
       
    if(otherId == INVALID_PLAYER_ID)
        return SendClientMessage(playerid, -1, "Id invбlido.");
       
    if(orgId > MAX_ORGS)
        return SendClientMessage(playerid, -1, "ORG invбlida.");
       
    org[otherId][orgId] = cargoLvl;
    new str[60];
    format(str, 60, "Vocк foi convidado pelo Admin para org id %d, cargo %d", orgId, cargoLvl);
    return 1;
}
No seu caso, tente assim...
pawn Код:
CMD:convidar(playerid, params[])
{
    new PlayerB;
    if(sscanf(params, "u", PlayerB)) return SendClientMessage(playerid, BRANCO, "Uso correto: /convidar [id]");
    if(!IsPlayerConnected(PlayerB)) return SendClientMessage(playerid, BRANCO, "Este jogador nгo estб conectado");
    //if(PlayerDados[playerid][PMilitar] >= 6)
    //{
    PlayerDados[PlayerB][PMilitar] = 1;
    SendClientMessage(PlayerB, BRANCO, "Vocк entrou Para Polнcia Militar");
    SetPlayerColor(PlayerB, Cor_PMilitar);
        //return 1;
    //}
    return 1;
}
Vai ver vocк pode nгo estar logado como PMilitar 6 ou +, etc...
Reply


Messages In This Thread
[Ajuda] a Criar Org :D - by Caio_Freeze - 20.04.2012, 03:20
Re: [Ajuda] a Criar Org :D - by WLSF - 20.04.2012, 03:30
Respuesta: [Ajuda] a Criar Org :D - by leosivi - 20.04.2012, 03:31
Re: [Ajuda] a Criar Org :D - by Caio_Freeze - 20.04.2012, 03:33
Re: [Ajuda] a Criar Org :D - by WLSF - 20.04.2012, 03:54
Re: [Ajuda] a Criar Org :D - by Caio_Freeze - 20.04.2012, 03:58

Forum Jump:


Users browsing this thread: 1 Guest(s)