Jump to content

Emilian

Membru
  • Posts

    4
  • Joined

  • Last visited

Posts posted by Emilian

  1. Acum 2 ore, StrikerM a spus:

    Mie imi compileaza perfect, fi sigur ca folosesti YCMD si nu CMD, daca folosesti CMD schimba din YCMD in CMD si mai in fata scoate virgula si help, lasi pana la params[]

    Eu folosesc YSI iar la cmd-uri de ysi trb sa scrie YCMD:comanda(playerid, params[], help).

  2. RPG SERVER\gamemodes\emi.pwn(526) : error 029: invalid expression, assumed zero
    RPG SERVER\gamemodes\emi.pwn(526) : warning 217: loose indentation
    RPG SERVER\gamemodes\emi.pwn(526) : warning 215: expression has no effect
    RPG SERVER\gamemodes\emi.pwn(526) : error 001: expected token: ";", but found ")"
    RPG SERVER\gamemodes\emi.pwn(526) : error 029: invalid expression, assumed zero
    RPG SERVER\gamemodes\emi.pwn(526) : fatal error 107: too many error messages on one line

    Linie : 

    YCMD:setadmin(playerid, params[], help)
    {
        if(PlayerInfo[playerid][pAdmin] < 7)
            return SCM(playerid, COLOR_EROARE, "* Eroare: Nu esti autorizat sa folosesti aceasta comanda.");

        new userID, level;
        if(sscanf(params, "ud", userID, level))
            return SCM(playerid, COLOR_SERVER, "Syntax: {AFAFAF}/setadmin <ID/Nume> <Admin level>");

        if(!IsPlayerLogged(userID))
            return SCM(playerid, COLOR_EROARE, "* Eroare: Acest jucator nu este conectat.");

        if(level < 0 || level > 7)
            return SCM(playerid, COLOR_EROARE, "* Eroare: Acest nivel de admin este invalid (0-7).");

        if(PlayerInfo[userID][pAdmin] == level)
            return SCM(playerid, COLOR_EROARE, "* Eroare: Acest jucator are deja acest nivel de admin.");

        if(level == 0)
        {
            if(Iter_Contains(ServerAdmins, userID))
                Iter_Remove(ServerAdmins, userID);
        }
        else
        {
            if(!Iter_Contains(ServerAdmins, userID))
                Iter_Add(ServerAdmins, userID);
        }

        PlayerInfo[userID][pAdmin] = level;
        mysqlQuery("UPDATE `server_accounts` SET `Admin` = '%d' WHERE `ID` = '%d'", PlayerInfo[userID][pAdmin], PlayerInfo[userID][pSQLID]);

        SCM(playerid, COLOR_LIME, "Admin %s ti-a setat admin level %d.", GetPlayerNameEx(playerid), level);
        SendStaff(COLOR_LIME, "AdmCmd: {AFAFAF}Admin %s i-a setat admin %d lui %s.", GetPlayerName(playerid), level, GetPlayerNameEx(userID));
        return true;
    }

    Detalii: 
    asa face mereu cand fac asa:
    if(PlayerInfo[playerid][pAdmin])
         return SCM(playerid, COLOR_EROARE, "Mesaj");

    ma chinui de ieri sa rezolv, va rog ajutati-ma.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.