Jump to content

Recommended Posts

Posted

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;
}

  • 2 weeks later...
Posted

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;
}

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.