Jump to content

mrrares19

Membru
  • Posts

    66
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by mrrares19

  1. CMD:set(playerid, params[]) {
        if(PlayerInfo[playerid][pAdmin] < 4)return SCM(playerid, -1, AdminOnly);
     
        extract params -> new player:id, string:item[15], ammount; else {
            SendClientMessage(playerid, COLOR_GREY,"Syntaxl: /set <id> <item> <ammount> ");
            return SendClientMessage(playerid, COLOR_GREY, "Avabile Items: Group, Rank, Money, BankMoney, PlayedHours, PremiumPoints, PremiumAccount, FP");
        }
     
        switch(YHash(item, false)) {
            case _I<rank>: {
                PlayerInfo[id][pRank] = ammount;
     
                SendAdminMessage(COLOR_LIGHTRED, "AdmWarning: %s i-a setat lui %s rank-ul in factiune la rank %d.", 1, GetName(playerid), GetName(id), ammount)
                SendClientMessage(id, -1, "Your rank in this faction has been changed.");
     
                mysql_format(SQL, str, sizeof(str), "UPDATE users SET `Rank`='%d' WHERE `name`='%s'",PlayerInfo[id][pRank],PlayerInfo[id][pNormalName]);
                mysql_tquery(SQL, str, "", "");
            }
            case _I<group>: {
                switch(ammount) {
                    case 0: return SendClientMessage(playerid, COLOR_GREY, "Foloseste /auninvite");
                    case 1: ftext = "Los Santos Police Departament";
                    case 2: ftext = "Federal Bureau Of Investigation";
                    case 3: ftext = "National Guard";
                    case 4: ftext = "Los Aztecas";
                    case 5: ftext = "Grove Street";
                    case 6: ftext = "Los Vagos";
                    case 7: return SendClientMessage(playerid, -1, "Invalid faction ID");
                    case 8: ftext = "Las Venturas Police Departament";
                    case 9: ftext = "News Reporter";
                    case 10: ftext = "Ballas";
                    case 11: ftext = "Hitman Agency";
                    case 12: return SendClientMessage(playerid, -1, "Invalid faction ID");
                    case 13: ftext = "Taxi Los Santos";
                    case 14: ftext = "Las Venturas Paramedic Departament";
                    case 15: ftext = "The Rifa";
                    case 16: ftext = "The Russian Mafia";
                    case 17: ftext = "Taxi LV";
                }
     
                PlayerInfo[id][pMember] = ammount;
     
                va_SendClientMessage(id, COLOR_DBLUE, "Administratorul %s te-a adaugat ca membru in factiunea %s",name,ftext);
                SendAdminMessage(COLOR_LIGHTRED, "AdmWarning: %s l-a adaugat ca membru pe %s in factiunea %s", 1, name, name2, ftext);
     
                mysql_format(gQuery, sizeof(gQuery),"UPDATE users SET `Member`='%d' WHERE `name`='%s'",PlayerInfo[id][pMember],PlayerInfo[id][pRank],PlayerInfo[id][pNormalName]);
                mysql_tquery(SQL, gQuery, "", "");
            }
            case _I<money>: {
                PlayerInfo[id][pCash] = ammount;
                GivePlayerCash(id, ammount); Update(id, pCashx);
     
                SendClientMessage(id, -1, "You recived some money.");
                SendAdminMessage(COLOR_LIGHTRED, "AdmWarning: %s i-a setat lui %s bani in mana la suma de %d.", 1, AdminName, IDName, ammount);
            }
            case _I<premiumpoints>: {
                PlayerInfo[id][pPremiumPoints] = ammount;
                Update(id,pPremiumPointsx);
     
                SendClientMessage(id, -1, "Your recived some premium points.");
                SendAdminMessage(COLOR_LIGHTRED, "AdmWarning: %s i-a setat lui %s punctele premium la %d.", 1, AdminName, IDName, ammount);
            }
            case _I<bankmoney>: {
                PlayerInfo[id][pAccount] = ammount;
                Update(id, pBank);
               
                SendClientMessage(id, -1, "Your recived some money in bank.");
                SendAdminMessage(COLOR_LIGHTRED, "AdmWarning: %s i-a setat lui %s bani in banca la suma de %d.", 1, AdminName, IDName, ammount);
            }
            case _I<playedhours>: {
                PlayerInfo[id][pConnectTime] = ammount;
                Update(id,pConnectTimex);
     
                SendClientMessage(id, -1, "Your played hours has been changed.");
                SendAdminMessage(COLOR_LIGHTRED, "AdmWarning: %s i-a setat lui %s orele jucate la %d.", 1, AdminName, IDName, ammount);
            }
            case _I<premiumaccount>: {
                if(!(0 <= ammount <= 1)) return SendClientMessage(playerid, COLOR_GREY, "1 = Cont premium | 0 = Fara cont premium");
                if(ammount == 0) return SendClientMessage(id, -1, "Your premium account has been removed.");
                if(ammount == 1) return SendClientMessage(id, -1, "You recived a premium account .");
     
                PlayerInfo[id][pPremiumAccount] = ammount;
                Update(id, pPremiumAccountx);
            }
            case _I<factionpunish>: {
                PlayerInfo[id][pFpunish] = ammount;
                Update(id,pFpunishx);
     
                SendClientMessage(id, -1, "Your FP has been changed.");
                SendAdminMessage(COLOR_LIGHTRED, "AdmWarning: %s i-a setat lui %s Faction Punish-ul la  %d.", 1, AdminName, IDName, ammount);
            }
            default: return SendClientMessage(playerid, COLOR_GREY, "Avabile Items: Group, Rank, Money, BankMoney, PlayedHours, PremiumPoints, PremiumAccount, FP");
        }
        return true;
    }
     
    cv facut rapid, n am stat sa rezolv erorile de la Mesaje faceti voi ca sunteti developeri
  2. stock sendSplittedMessageToPlayer(const playerid, const first_line_color, const last_line_color, const message[], va_args<>) {
        new  string[289];
        va_format(string, sizeof string, message, va_start<4>);
     
        va_SendClientMessage(playerid, first_line_color, string);
     
        if(strlen(string) >= 144)  va_SendClientMessage(playerid, last_line_color, "... %s", string[143]);
        return true;
    }
     
    stock sendSplittedMessage(const color, const message[], va_args<>) {
        new  string[289];
        va_format(string, sizeof string, message, va_start<4>);
     
        va_SendClientMessageToAll(color, string);
     
        if(strlen(string) >= 144) va_SendClientMessageToAll(color, "... %s", string[143]);
        return 1;
    }
     
    Credite: sancky ultra pro dev @Sancky
  3. iti recomand sa te muti pe ysi, nimeni nu mai foloseste acel procesor de comenzi, in caz ca te muti: 

    YCMD:kickres(playerid, params[], help) {
        if(!pInfo[playerid][pAdmin]) return SendClientMessage(playerid, -1, "Nu esti autorizat sa folosesti aceasta comanda!");
        extract params -> new level; else return SendClientMessage(playerid, -1, "Usage: /kickres [level]");
        foreach(new i : Player) if(pInfo[i][pLevel] == level) Kick(i);
        return true;
    }
  4. frate, poti lua bigzone / burned original sau hpq, toate 3 au buguri destule cat sa te inveti cu limbaj-ul si etc, daca iei ceva de la zero tu nestind pawn atat de bine o sa te blochezi, asa ca mai bine ia unul dintr gm-urile de mai sus, editeazale, rezolva bugurile si dupa poate daca isi revine samp-ul asta te apuci de ceva de la zero! Spor

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