- 0
Comanda /edithouse
-
Similar Content
-
- 2 answers
- 635 views
-
Am o problema cu un battlepass,de ce nu merge comanda /misiuni cand o scriu,tin sa precizez ca script-ul mi l-a facut chatgpt
By cbnmihaita,
- 2 answers
- 376 views
-
- 3 replies
- 540 views
-
Comanda /spec
By VAurel,
- 4 answers
- 722 views
-
- 3 replies
- 626 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
Question
TheGodfather
Salut, vreau sa fac ca prin comanda /edithouse sa pot modifica si interiorul caselor, am incercat asta dar primesc eroare:
====================================================================
Error ID: 1065, Eroare: Query was empty
Callback:
gQuery:
====================================================================
YCMD:edithouse(playerid, params[], help) {
if(aspam[playerid] > 0) return SCMEx(playerid, COLOR_LIGHTRED, "[Command Anti-Spam] {FFFFFF}Asteapta %d secunde.", aspam[playerid]);
new id, code[180], list;
if(PlayerInfo[playerid][pAdmin] < 7) return true;
if(sscanf(params, "iis[180]", id,list,code)) {
SCM(playerid, COLOR_GREY, "{4CA27A}USAGE:{FFFFFF} /edithouse <house id> <code> <result>");
SCM(playerid, 0xFFFFFFFF, "(1) Level, (2) Nume, (3) Pret, (4) Owned, (5) Interior");
return true;
}
if(HouseInfo[id][hID] == 0) return SCM(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);
SCM(playerid, COLOR_GOLD, string);
mysql_format(SQL,str,sizeof(str),"UPDATE houses SET Level='%d' WHERE ID='%d'",HouseInfo[id][hLevel], HouseInfo[id][hID]);
mysql_tquery(SQL,str, "", "");
}
case 2: {
format(string, sizeof(string), "Ai editat numele la casa %d in %s.", id, code);
SCM(playerid, COLOR_GOLD, string);
format(HouseInfo[id][hDiscription],256,code);
mysql_format(SQL,str,sizeof(str),"UPDATE houses SET Discription='%s' WHERE ID='%d'",HouseInfo[id][hDiscription],HouseInfo[id][hID]);
mysql_tquery(SQL,str, "", "");
}
case 3: {
format(string, sizeof(string), "Ai editat pretul la casa %d in $%s.", id, FormatNumber(result));
SCM(playerid, COLOR_GOLD, string);
HouseInfo[id][hValue] = result;
mysql_format(SQL,string, sizeof(string), "UPDATE houses SET `Value`='%d' WHERE ID=%d",result,HouseInfo[id][hID]);
mysql_tquery(SQL,str, "", "");
}
case 4: {
format(string, sizeof(string), "Ai editat detinatorul la casa %d in %d.", id, result);
SCM(playerid, COLOR_GOLD, string);
HouseInfo[id][hOwned] = result;
mysql_format(SQL,string, sizeof(string), "UPDATE houses SET `Owned`='%d' WHERE ID=%d",result,HouseInfo[id][hID]);
mysql_tquery(SQL,str, "", "");
}
//
case 5: {
format(string, sizeof(string), "Ai editat interiorul la casa %d in %d.", id, result);
SCM(playerid, COLOR_GOLD, string);
HouseInfo[id][hInterior] = result;
mysql_format(SQL,string,sizeof(string), "UPDATE houses SET `Interior`='%d' WHERE ID=%d,",result,HouseInfo[id][hID]);
mysql_tquery(SQL,str,"","");
}
//
}
UpdateLabel(1, id);
return true;
}
8 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.