[ Ajuda ] Comando Bugado.
#4

pawn Код:
CMD:setadmin(playerid, params[])
{
    new aname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
    if(IsPlayerAdmin(playerid))
    {
        new leveladm, plid;
        new string[128];
        if(sscanf(params, "ud", plid, leveladm)) return SendClientMessage(playerid, -1, "Uso correto: /setadmin [ID] [Level]");
        if(leveladm >= 3) return SendClientMessage(playerid, -1, "O level mбximo й 3!");
        if(leveladm >= 1)
        {
            InfoPlayer[plid][pAdmin] = leveladm;
            //DOF2_SetInt(vfile, "LevelAdm",leveladm); // Dps vc ver se ta certo '-
            DOF2_SetInt(vfile, "LevelAdm",  InfoPlayer[playerid][pAdmin] = leveladm);
            format(string, sizeof(string), "(INFO) Vocк foi promovido a Admin Level %d por : %s!", leveladm,aname);
            SendClientMessage(plid,-1, string);
            if(leveladm > 1) return 1;
        }
        if(leveladm == 0)
        {
            InfoPlayer[plid][pAdmin] = 0;
            //DOF2_SetInt(vfile, "LevelAdm",0); // Dps vc ver se ta certo '-
            DOF2_SetInt(vfile, "LevelAdm", InfoPlayer[playerid][pAdmin] = 0);
            format(string, sizeof(string), "(x) %s , retirou seu admin!",aname);
            SendClientMessage(plid,-1, string);
        }
    }
    else
    {
        SendClientMessage(playerid, -1, "(INFO) Vocк nгo й um Administrador RCON.");
    }
    return 1;
}
Nгo й necessario isso! o sscanf jб verifica se o player esta online ou nгo!
Reply


Messages In This Thread
[ Ajuda ] Comando Bugado. - by BiGThAsE - 08.03.2012, 16:39
Re: [ Ajuda ] Comando Bugado. - by Sampizito - 08.03.2012, 16:41
Re: [ Ajuda ] Comando Bugado. - by BiGThAsE - 08.03.2012, 16:43
Re: [ Ajuda ] Comando Bugado. - by paulor - 08.03.2012, 18:16
Re: [ Ajuda ] Comando Bugado. - by GuiihCamargo - 09.03.2012, 00:06
Re: [ Ajuda ] Comando Bugado. - by Lucas_Alemao - 09.03.2012, 00:14

Forum Jump:


Users browsing this thread: 1 Guest(s)