Jump to content

TheBusiness

Membru
  • Posts

    10
  • Joined

  • Last visited

Posts posted by TheBusiness

  1. CMD:leaders(playerid, params[])
    {
        if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to log in first.");
        SendClientMessage(playerid, COLOR_GREEN, "-------Lideri Online------");
        new string[128],name[30],afktext[10];
        foreach(new i : Player)
        {
            if(PlayerInfo[i][pLeader] > 0 && PlayerInfo[i][pAdmin] < 3)
            {
                GetPlayerName(i, name, sizeof(name));
                format(string, sizeof(string), "{ff0000}Lider la: {000066}%s: {66ff33}%s {ccff33}[ID: %d] %s", DynamicFactions[PlayerInfo[i][pMember]][fName], name, i, afktext);
                SendClientMessage(playerid, COLOR_WHITE, string);
            }
        }
        SendClientMessage(playerid, COLOR_GREEN, "----------------------------------");
        return 1;
    }

    Ok, am facut.

    Ce am modificat?

    1. Ti-am adaugat conditia ca daca player-ul respectiv are admin 3 sau peste 3 sa nu mai il afiseze, indiferent ca e lider sau nu. (Daca vrei sa nu iti afiseze admin 3, ci doar peste 3 pui PlayerInfo[pAdmin] <= 3 )

    2. Ti-am rezolvat problema la PlayerInfo, am adaugat parametrul pentru id pentru ca nu il aveai.

  2. function Update(playerid, bazadedate[], gamemode, type) {
        new query[500];
        switch(type) { 
            case 1: mysql_format(handle, query, sizeof(query), "UPDATE `users` SET `%s` = '%d' WHERE `name`= '%e'", bazadedate, gamemode, GetPName( playerid ));
            case 2: mysql_format(handle, query, sizeof(query), "UPDATE `users` SET `%s` = '%f' WHERE `name`= '%e'", bazadedate, gamemode, GetPName( playerid ));
            case 3: mysql_format(handle, query, sizeof(query), "UPDATE `users` SET `%s` = '%s' WHERE `name`= '%e'", bazadedate, gamemode, GetPName( playerid ));
        }
        mysql_query(handle, query);
        return 1;
    }

    Ce era gresit? la functia ta acest "type" nu era inregistrat corect, era "tip", si cand faceai switch nu stia de unde sa inceapa.

    • Thanks 1
  3. CMD:leaders(playerid, params[])
    {
        if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to log in first.");
        SendClientMessage(playerid, COLOR_GREEN, "-------Lideri Online------");
        new string[128],name[30],afktext[10];
        foreach(new i : Player)
        {
            if(PlayerInfo[pLeader] > 0 && i||playerid)
            {
                GetPlayerName(i, name, sizeof(name));
                format(string, sizeof(string), "{ff0000}Lider la: {000066}%s: {66ff33}%s {ccff33}[ID: %d] %s", DynamicFactions[PlayerInfo[pMember]][fName], name, i, afktext);
                SendClientMessage(playerid, COLOR_WHITE, string);
            }
        }
        SendClientMessage(playerid, COLOR_GREEN, "----------------------------------");
        return 1;
    }

     

    Poftim, cu aceasta comanda nu te poti vedea pe tine la lideri, doar altii te pot vedea. Legat de partea cu admin +3 nu am inteles la ce te referi

    Ce am facut? Am adaugat o conditie in plus ca "i" (Playerul cautat) sa nu fie acelasi cu tine (playerid)

    Edit: Mi se pare ciudat PlayerInfo-ul tau, adica unde e parametrul id?

  4. Din ce cred si vad eu, tie acel id iti ia numarul slotului masinii, iar functia SpawnVeh traducea numarul slotului in id-ul masinii.

    Iar tu cand incerci sa dai despawn, tu dai despawn la un id prost. (numarul slotului)

     

    Problema e ca ar trebui sa ma uit in functia SpawnVeh de la tine din GM.

×
×
  • 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.