07.05.2014, 12:09
Hi all!
MY problem is that the houses that i made doesen't have interior, i tried to add from database but nothing happened.
So when i create a house with the command /creeazacasa the house doesen't creates an interior.I think so..
So my script is :
All the house commands are working properly but my house doesen't have interior.
Hope you can help me!
Thanks!.
MY problem is that the houses that i made doesen't have interior, i tried to add from database but nothing happened.
So when i create a house with the command /creeazacasa the house doesen't creates an interior.I think so..
So my script is :
Код HTML:
/-----------------------------------------Comanda-----------------------------------------// //-----------------------------------------Comanda-----------------------------------------// if(strcmp(cmd, "/creeazacasa", true) == 0) { if(IsPlayerConnected(playerid)) { //new houseid = -1; new Float:x, Float:y, Float:z, query[100]; new PlayerName[MAX_PLAYER_NAME]; GetPlayerName(playerid, PlayerName, sizeof(PlayerName)); if(PlayerData[playerid][pAdmin] >= 6) { if(PlayerData[playerid][pAdmin] >= 6) { //MySQLCHouse(); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendUsage(playerid,"/creeazacasa [tip] [id casa]"); SendClientMessage(playerid, COLOR_GRAD1, "TipCasa: {FF9900}[0]Lux {00CC00}[1]Bogatas {FFFF00}[2]Miliardar {FF3300}[3]Milionar"); return 1; } new tip; tip = strval(tmp); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendUsage(playerid,"/creeazacasa [tip] [id casa]"); SendClientMessage(playerid, COLOR_GRAD1, "TipCasa: {FF9900}[0]Lux {00CC00}[1]Bogatas {FFFF00}[2]Miliardar {FF3300}[3]Milionar"); return 1; } new houseid; houseid = strval(tmp); GetPlayerPos(playerid, x, y, z); HouseData[houseid][hEntrancex] = x; HouseData[houseid][hEntrancey] = y; HouseData[houseid][hEntrancez] = z; format(query, sizeof(query), "INSERT INTO houses (`id`,`Entrancex`) VALUES ('%d','%f')",houseid,x); mysql_query(query); format(query, sizeof(query), "UPDATE houses SET Entrancex='%f' WHERE id=%d", HouseData[houseid][hEntrancex], houseid); mysql_query(query); format(query, sizeof(query), "UPDATE houses SET Entrancey='%f' WHERE id=%d", HouseData[houseid][hEntrancey], houseid); mysql_query(query); format(query, sizeof(query), "UPDATE houses SET Entrancez='%f' WHERE id=%d", HouseData[houseid][hEntrancez], houseid); mysql_query(query); format(query, sizeof(query), "UPDATE houses SET Owner ='The State',Hel = 0,Arm = 0 WHERE id=%d",houseid); mysql_query(query); format(query, sizeof(query), "UPDATE houses SET Healthx ='0',Healthy = 0,Healthz = 0 WHERE id=%d",houseid); mysql_query(query); format(query, sizeof(query), "UPDATE houses SET Armourx ='0',Armoury = 0,Armourz = 0 WHERE id=%d",houseid); mysql_query(query); format(query, sizeof(query), "UPDATE houses SET Takings=0,Date=0 WHERE id=%d",houseid); mysql_query(query); format(query, sizeof(query), "UPDATE houses SET Lockk = 0, Owned=0 WHERE id=%d",houseid); mysql_query(query); format(query, sizeof(query), "UPDATE houses SET Rooms='1' WHERE id=%d", houseid); mysql_query(query); format(query, sizeof(query), "UPDATE houses SET Rent='100' WHERE id=%d", houseid); mysql_query(query); format(query, sizeof(query), "UPDATE houses SET Rentabil='1' WHERE id=%d", houseid); mysql_query(query); if(tip == 0) { HouseData[houseid][hExitx] = 234.19; HouseData[houseid][hExity] = 1063.73; HouseData[houseid][hExitz] = 1084.21; HouseData[houseid][hValue] = 5000000; HouseData[houseid][hLevel] = 15; strmid(HouseData[houseid][hDiscription], "Lux", 0, strlen("Lux"), 255); HouseData[houseid][hInt] = 6; format(query, sizeof(query), "UPDATE houses SET Exitx='%f' WHERE id=%d", HouseData[houseid][hExitx], houseid); mysql_query(query); format(query, sizeof(query), "UPDATE houses SET Exity='%f' WHERE id=%d", HouseData[houseid][hExity], houseid); mysql_query(query); format(query, sizeof(query), "UPDATE houses SET Exitz='%f' WHERE id=%d", HouseData[houseid][hExitz], houseid); mysql_query(query); format(query, sizeof(query), "UPDATE houses SET Value='%d' WHERE id=%d", HouseData[houseid][hValue], houseid); mysql_query(query); format(query, sizeof(query), "UPDATE houses SET Level='%d' WHERE id=%d", HouseData[houseid][hLevel], houseid); mysql_query(query); format(query, sizeof(query), "UPDATE houses SET Discription='%s' WHERE id=%d", HouseData[houseid][hDiscription], houseid); mysql_query(query); format(query, sizeof(query), "UPDATE houses SET Int='%d' WHERE id=%d", HouseData[houseid][hInt], houseid); mysql_query(query); } if(tip == 1) { HouseData[houseid][hExitx] = 225.68; HouseData[houseid][hExity] = 1021.45; HouseData[houseid][hExitz] = 1084.02; HouseData[houseid][hValue] = 3500000; HouseData[houseid][hLevel] = 5; strmid(HouseData[houseid][hDiscription], "Bogatas", 0, strlen("Bogatas"), 255); HouseData[houseid][hInt] = 7; format(query, sizeof(query), "UPDATE houses SET Exitx='%f' WHERE id=%d", HouseData[houseid][hExitx], houseid); mysql_query(query); format(query, sizeof(query), "UPDATE houses SET Exity='%f' WHERE id=%d", HouseData[houseid][hExity], houseid); mysql_query(query); format(query, sizeof(query), "UPDATE houses SET Exitz='%f' WHERE id=%d", HouseData[houseid][hExitz], houseid); mysql_query(query); format(query, sizeof(query), "UPDATE houses SET Value='%d' WHERE id=%d", HouseData[houseid][hValue], houseid); mysql_query(query); format(query, sizeof(query), "UPDATE houses SET Level='%d' WHERE id=%d", HouseData[houseid][hLevel], houseid); mysql_query(query); format(query, sizeof(query), "UPDATE houses SET Discription='%s' WHERE id=%d", HouseData[houseid][hDiscription], houseid); mysql_query(query); format(query, sizeof(query), "UPDATE houses SET Int='%d' WHERE id=%d", HouseData[houseid][hInt], houseid); mysql_query(query); } if(tip == 2) { HouseData[houseid][hExitx] = 226.30; HouseData[houseid][hExity] = 1114.24; HouseData[houseid][hExitz] = 1080.99; HouseData[houseid][hValue] = 2500000; HouseData[houseid][hLevel] = 7; strmid(HouseData[houseid][hDiscription], "Miliardar", 0, strlen("Miliardar"), 255); HouseData[houseid][hInt] = 5; format(query, sizeof(query), "UPDATE houses SET Exitx='%f' WHERE id=%d", HouseData[houseid][hExitx], houseid); mysql_query(query); format(query, sizeof(query), "UPDATE houses SET Exity='%f' WHERE id=%d", HouseData[houseid][hExity], houseid); mysql_query(query); format(query, sizeof(query), "UPDATE houses SET Exitz='%f' WHERE id=%d", HouseData[houseid][hExitz], houseid); mysql_query(query); format(query, sizeof(query), "UPDATE houses SET Value='%d' WHERE id=%d", HouseData[houseid][hValue], houseid); mysql_query(query); format(query, sizeof(query), "UPDATE houses SET Level='%d' WHERE id=%d", HouseData[houseid][hLevel], houseid); mysql_query(query); format(query, sizeof(query), "UPDATE houses SET Discription='%s' WHERE id=%d", HouseData[houseid][hDiscription], houseid); mysql_query(query); format(query, sizeof(query), "UPDATE houses SET Int='%d' WHERE id=%d", HouseData[houseid][hInt], houseid); mysql_query(query); } if(tip == 3) { HouseData[houseid][hExitx] = 140.17; HouseData[houseid][hExity] = 1366.07; HouseData[houseid][hExitz] = 1083.65; HouseData[houseid][hValue] = 4500000; HouseData[houseid][hLevel] = 10; strmid(HouseData[houseid][hDiscription], "Milionar", 0, strlen("Milionar"), 255); HouseData[houseid][hInt] = 5; format(query, sizeof(query), "UPDATE houses SET Exitx='%f' WHERE id=%d", HouseData[houseid][hExitx], houseid); mysql_query(query); format(query, sizeof(query), "UPDATE houses SET Exity='%f' WHERE id=%d", HouseData[houseid][hExity], houseid); mysql_query(query); format(query, sizeof(query), "UPDATE houses SET Exitz='%f' WHERE id=%d", HouseData[houseid][hExitz], houseid); mysql_query(query); format(query, sizeof(query), "UPDATE houses SET Value='%d' WHERE id=%d", HouseData[houseid][hValue], houseid); mysql_query(query); format(query, sizeof(query), "UPDATE houses SET Level='%d' WHERE id=%d", HouseData[houseid][hLevel], houseid); mysql_query(query); format(query, sizeof(query), "UPDATE houses SET Discription='%s' WHERE id=%d", HouseData[houseid][hDiscription], houseid); mysql_query(query); format(query, sizeof(query), "UPDATE houses SET Int='%d' WHERE id=%d", HouseData[houseid][hInt], houseid); mysql_query(query); } format(string, sizeof(string),"{00CC00}Casa creata id: %d.Aceasta casa se seteaza automat.Foloseste {FFFFFF}/edit {00CC00}pentru a edita ceva la casa.",houseid); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "{009933}Casa de vanzare! \n {FF9900}Pret: {FFFFFF}%d$ \n {FF9900}Level: {FFFFFF}%d \n {009933}Ca sa o cumperi scrie {FF3300}/buyhouse",HouseData[houseid][hValue],HouseData[houseid][hLevel]); HouseLabel[houseid] = CreateDynamic3DTextLabel(string,0x00FF00AA,x,y,z,25, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100.0); OnPropTextdrawUpdate(1, houseid); } } } return 1; }
Hope you can help me!
Thanks!.