Jump to content

Ajutor comanda /editbizz si /edithouse


aWesome132

Recommended Posts

Salut am si eu comanda /edtbizz si /edithouse si atunci cand vreau sa modific un biz sau o casa imii spune mesajul dar nu modifica comenile sunt mai jos multumesc anticipat !

CMD:editbizz(playerid, params[]) {
    new id, code[180], list;
    if(PlayerInfo[playerid][pAdmin] < 7) return 1;
    if(sscanf(params, "iis[180]", id,list,code)) {
         SendClientMessage(playerid, COLOR_GREY, "USAGE:{FFFFFF} /editbizz <biz id> <code> <result>");
         SendClientMessage(playerid, 0xFFFFFFFF, "(1) Level, (2) Nume, (3) Pret");
         return 1;
     }
     if(BizzInfo[id][bID] == 0) return SendClientMessage(playerid, COLOR_RED, "Aceasta afacere nu exista!");
     new result = strval(code), string[180], str[180];
     switch(list) {
         case 1: {
             format(string, sizeof(string), "Ai editat nivelul la afacerea %d in %d.", id, result);
             SendClientMessage(playerid, COLOR_WHITE, string);
             BizzInfo[id][bLevelNeeded] = result;
            format(str,sizeof(str),"UPDATE bizz SET Level='%d' WHERE ID='%d'",BizzInfo[id][bLevelNeeded],id);
            mysql_query(SQL,str);
         }
         case 2: {
             format(string, sizeof(string), "Ai editat numele la afacerea %d in %s.", id, code);
             SendClientMessage(playerid, COLOR_WHITE, string);
             format(BizzInfo[id][bMessage],256,code);
            format(str,sizeof(str),"UPDATE bizz SET Message='%s' WHERE ID='%d'",BizzInfo[id][bMessage],id);
            mysql_query(SQL,str);
         }
         case 3: {
             format(string, sizeof(string), "Ai editat pretul la afacerea %d in $%s.", id, FormatNumber(result));
             SendClientMessage(playerid, COLOR_WHITE, string);
            BizzInfo[id][bBuyPrice] = result;
            format(string, sizeof(string), "UPDATE bizz SET `Value`='%d' WHERE ID=%d",result,id);
            mysql_query(SQL,string);
         }
     }
    return 1;
}
CMD:edithouse(playerid, params[]) {
    new id, code[180], list;
    if(PlayerInfo[playerid][pAdmin] < 7) return 1;
    if(sscanf(params, "iis[180]", id,list,code)) {
         SendClientMessage(playerid, COLOR_GREY, "USAGE:{FFFFFF} /edithouse <house id> <code> <result>");
         SendClientMessage(playerid, 0xFFFFFFFF, "(1) Level, (2) Nume, (3) Pret, (4) Owned");
         return 1;
     }
     if(HouseInfo[id][hID] == 0) return SendClientMessage(playerid, COLOR_RED, "Aceasta casa nu exista!");
     new result = strval(code), string[180], str[180];
     switch(list) {
         case 1: {
             format(string, sizeof(string), "Ai editat nivelul la casa %d in %d.", id, result);
             SendClientMessage(playerid, COLOR_RED, string);
            format(str,sizeof(str),"UPDATE houses SET Level='%d' WHERE ID='%d'",HouseInfo[id][hLevel],id);
            mysql_query(SQL,str);
         }
         case 2: {
             format(string, sizeof(string), "Ai editat numele la casa %d in %s.", id, code);
             SendClientMessage(playerid, COLOR_RED, string);
             format(HouseInfo[id][hDiscription],256,code);
            format(str,sizeof(str),"UPDATE houses SET Discription='%s' WHERE ID='%d'",HouseInfo[id][hDiscription],id);
            mysql_query(SQL,str);
         }
         case 3: {
             format(string, sizeof(string), "Ai editat pretul la casa %d in $%s.", id, FormatNumber(result));
             SendClientMessage(playerid, COLOR_RED, string);
            HouseInfo[id][hValue] = result;
            format(string, sizeof(string), "UPDATE houses SET `Value`='%d' WHERE ID=%d",result,id);
            mysql_query(SQL,string);
         }
         case 4: {
             format(string, sizeof(string), "Ai editat detinatorul la casa %d in %d.", id, result);
             SendClientMessage(playerid, COLOR_RED, string);
            HouseInfo[id][hOwned] = result;
            format(string, sizeof(string), "UPDATE houses SET `Owned`='%d' WHERE ID=%d",result,id);
            mysql_query(SQL,string);
         }
     }
    return 1;
}

Link to comment
Share on other sites

  • 2 weeks later...

Nu stiu daca sunt la fel, dar le am pe un GM si merg la perfectie

CMD:editbizz(playerid, params[]) {
    new id, code[180], list;
    if(PlayerInfo[playerid][pAdmin] < 6) return 1;
    if(sscanf(params, "iis[180]", id,list,code)) {
         SendClientMessage(playerid, COLOR_GREY, "USAGE:{FFFFFF} /editbizz <biz id> <code> <result>");
         SendClientMessage(playerid, 0xFFFFFFFF, "(1) Level, (2) Nume, (3) Pret");
         return 1;
     }
     if(BizzInfo[id][bID] == 0) return SendClientMessage(playerid, COLOR_GOLD, "Aceasta afacere nu exista!");
     new result = strval(code), string[180], str[180];
     switch(list) {
         case 1: {
             format(string, sizeof(string), "Ai editat nivelul la afacerea %d in %d.", id, result);
             SendClientMessage(playerid, COLOR_WHITE, string);
             BizzInfo[id][bLevel] = result;
            format(str,sizeof(str),"UPDATE bizz SET Level='%d' WHERE ID='%d'",BizzInfo[id][bLevel],id);
            mysql_query(SQL,str);
         }
         case 2: {
             format(string, sizeof(string), "Ai editat numele la afacerea %d in %s.", id, code);
             SendClientMessage(playerid, COLOR_WHITE, string);
             format(BizzInfo[id][bMessage],256,code);
            format(str,sizeof(str),"UPDATE bizz SET Message='%s' WHERE ID='%d'",BizzInfo[id][bMessage],id);
            mysql_query(SQL,str);
         }
         case 3: {
             format(string, sizeof(string), "Ai editat pretul la afacerea %d in $%s.", id, FormatNumber(result));
             SendClientMessage(playerid, COLOR_WHITE, string);
            BizzInfo[id][bBuyPrice] = result;
            format(string, sizeof(string), "UPDATE bizz SET `Value`='%d' WHERE ID=%d",result,id);
            mysql_query(SQL,string);
         }
     }
     UpdateLabel(2, id);
    return 1;
}

 

 

 

 

 

 

 

 

CMD:edithouse(playerid, params[]) {
    new id, code[180], list;
    if(PlayerInfo[playerid][pAdmin] < 6) return 1;
    if(sscanf(params, "iis[180]", id,list,code)) {
         SendClientMessage(playerid, COLOR_GREY, "USAGE:{FFFFFF} /edithouse <house id> <code> <result>");
         SendClientMessage(playerid, 0xFFFFFFFF, "(1) Level, (2) Nume, (3) Pret, (4) Owned");
         return 1;
     }
     if(HouseInfo[id][hID] == 0) return SendClientMessage(playerid, COLOR_GOLD, "Aceasta casa nu exista!");
     new result = strval(code), string[180], str[180];
     switch(list) {
         case 1: {
             format(string, sizeof(string), "Ai editat nivelul la casa %d in %d.", id, result);
             SendClientMessage(playerid, COLOR_GOLD, string);
            format(str,sizeof(str),"UPDATE houses SET Level='%d' WHERE ID='%d'",HouseInfo[id][hLevel],id);
            mysql_query(SQL,str);
         }
         case 2: {
             format(string, sizeof(string), "Ai editat numele la casa %d in %s.", id, code);
             SendClientMessage(playerid, COLOR_GOLD, string);
             format(HouseInfo[id][hDiscription],256,code);
            format(str,sizeof(str),"UPDATE houses SET Discription='%s' WHERE ID='%d'",HouseInfo[id][hDiscription],id);
            mysql_query(SQL,str);
         }
         case 3: {
             format(string, sizeof(string), "Ai editat pretul la casa %d in $%s.", id, FormatNumber(result));
             SendClientMessage(playerid, COLOR_GOLD, string);
            HouseInfo[id][hValue] = result;
            format(string, sizeof(string), "UPDATE houses SET `Value`='%d' WHERE ID=%d",result,id);
            mysql_query(SQL,string);
         }
         case 4: {
             format(string, sizeof(string), "Ai editat detinatorul la casa %d in %d.", id, result);
             SendClientMessage(playerid, COLOR_GOLD, string);
            HouseInfo[id][hOwned] = result;
            format(string, sizeof(string), "UPDATE houses SET `Owned`='%d' WHERE ID=%d",result,id);
            mysql_query(SQL,string);
         }
     }
     UpdateLabel(1, id);
    return 1;
}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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