Jump to content

Tudor...

Membru
  • Posts

    3
  • Joined

  • Last visited

Posts posted by Tudor...

  1. salut, voi lasa aici comanda "/bonus"

    succes cu ea! trebuie sa aveti ZCMD

     

    MD:bonus(playerid, params[])
    {
        if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
        if(IsPlayerConnected(playerid))
         {
            if(PlayerInfo[playerid][pLevel] <= 2)
              {
                GivePlayerCash(playerid, 25000000);
                  PlayerInfo[playerid][pLevel] = 3;
                PlayerInfo[playerid][pPremiumPoints] = 110;
                   Update(playerid, pLevelx);
                  Update(playerid, pCashx);
                Update(playerid, pPremiumPointsx);
                   SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]);
                 SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ai primit 25.000.000$, level 3 si 110 puncte premium de bun venit!");
            }
            else return SendClientMessage(playerid, COLOR_LIGHTRED, "Nu poti folosi aceasta comanda daca ai level 3+ !");
        }
        return 1;
    }

  2. salut, faci o gresala ca folosesti un gamemode cu strcmp, si in al-2-lea rand poate nu ai comanda /accept cinvite

    ia-ti ZCMD si fa comenzile de tipul CMD:cinvite

    uite aici comenzile, succes.

    cinvite: 

    CMD:cinvite(playerid, params[])
    {
        if(PlayerInfo[playerid][pCRank] < 6) return SendClientMessage(playerid, COLOR_WHITE, "Doar playerii cu rank 6 si 7 pot invita membri in clan.");
        new userID,giveplayer[25],sendername[25],szMessage[119];
        if(sscanf(params, "u", userID)) return SendClientMessage(playerid, COLOR_WHITE, "Usage: /cinvite [id]");
        {
            if(GetClanMembers(PlayerInfo[playerid][pClan]) >= ClanInfo[PlayerInfo[playerid][pClan]][cClanSlots]) return SendClientMessage(playerid, COLOR_WHITE, "You have reached maximum members.");
            if(userID == playerid) return SendClientMessage(playerid, COLOR_WHITE, "Nu poti sa te inviti singur in clan.");
            if(ClanInfo[PlayerInfo[playerid][pClan]][cClanActive] < 1) return SendClientMessage(playerid, COLOR_WHITE, "Nu poti invita membri deoarece clanul a expirat (pentru prelungire intra pe panel).");
            if(IsPlayerConnected(userID))
            {
                if(PlayerInfo[userID][pClan] == 0)
                {
                    GetPlayerName(userID,giveplayer,sizeof(giveplayer));
                    format(szMessage, sizeof(szMessage), "You have invited %s to join your clan.", giveplayer);
                    SendClientMessage(playerid, COLOR_LIGHTBLUE, szMessage);

                    GetPlayerName(playerid,sendername,sizeof(sendername));
                    format(szMessage, sizeof(szMessage), "%s te-a invitat in clanul %s. Foloseste /accept cinvite %d pentru a accepta.", sendername, ClanInfo[PlayerInfo[playerid][pClan]][cClanName], playerid);
                    SendClientMessage(userID, COLOR_BLUE, "Invitatie noua in clan:");
                    SendClientMessage(userID, COLOR_BLUE, szMessage);

                    SetPVarInt(userID, "cinvID", PlayerInfo[playerid][pClan]);
                    SetPVarInt(userID, "cinvIDD", playerid);
                }
            }
        }
        return 1;
    }

            else if(strcmp(x_job,"cinvite",true) == 0)
            {
                if(GetPVarInt(playerid, "cinvID") >= 1)
                {
                    new messageString[128],str33[184],iddd,name2[30],strings[128];
                    PlayerInfo[playerid][pClan] = GetPVarInt(playerid, "cinvID");
                    iddd = GetPVarInt(playerid, "cinvIDD");
                    GetPlayerName(iddd,name2,sizeof(name2));
                    PlayerInfo[playerid][pCRank] = 1;
                    DeletePVar(playerid, "cinvID");
                    DeletePVar(playerid, "cinvIDD");
                    GetPlayerName(playerid,sendername,sizeof(sendername));
                    format(messageString, sizeof(messageString), "{%s}[CLAN] %s joined the clan (invited by %s).",ClanInfo[PlayerInfo[playerid][pClan]][cClanColor],sendername,name2);
                    SendToClan(PlayerInfo[playerid][pClan], COLOR_YELLOW, messageString);
                    new y,m,d,h,mi,s;
                    getdate(y,m,d);
                    gettime(h,mi,s);
                    mysql_format(SQL,str33,sizeof(str33),"UPDATE users SET `Clan`='%d',`CRank`='1',`ClanJoin`='%02d-%02d-%d %02d:%02d:%02d' WHERE `name`='%s'",PlayerInfo[playerid][pClan],d,m,y,h,mi,s,PlayerInfo[playerid][pNormalName]);
                    mysql_tquery(SQL,str33,"","");
                    format(messageString, sizeof(messageString), "%s joined the clan (invited by %s).",sendername,name2);
                    mysql_real_escape_string(messageString, strings);
                    mysql_format(SQL,str33,sizeof(str33),"INSERT INTO clan_logs (`action`,`clanid`) VALUES ('%s','%d')",strings,PlayerInfo[playerid][pClan]);
                    mysql_tquery(SQL,str33,"","");

                }
                else {
                    return SendClientMessage(playerid, COLOR_GREY, "You don't have an active clan invite request.");
                }
            }

     

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