sckatchof Posted January 22, 2012 Share Posted January 22, 2012 hello guys i have a problem in house system : function createhouse(thePlayer, cmd, int, preis) if (isAdminLevel ( thePlayer ) == 3) then if (intids[tonumber(int)]) and (tonumber(int) >= 1) then if (tonumber(preis) >= 5000) and (tonumber(preis) <= 10000000) then x,y,z = getElementPosition(thePlayer) owner = "none" local erg = mysql_query(sqlcon, "INSERT INTO house_data (`Int`, Owner, Preis, X, Y, Z, `Lock`) VALUES ('"..tonumber(int).."','"..owner.."','"..tonumber(preis).."','"..x.."','"..y.."','"..z.."','0')") Housspawn() outputChatBox("House created!") else outputChatBox("Invalid price!", thePlayer,255,0,0) end else outputChatBox("Invalid interior!", thePlayer,255,0,0) end else outputChatBox("You are not authorized!", thePlayer, 255,0,0) end end addCommandHandler("addhouse", createhouse) Link to comment
Castillo Posted January 22, 2012 Share Posted January 22, 2012 Try this: function createhouse(thePlayer, cmd, int, preis) if (isAdminLevel ( thePlayer ) == 3) then if (intids[tonumber(int)]) and (tonumber(int) >= 1) then if (tonumber(preis) >= 5000) and (tonumber(preis) <= 10000000) then x,y,z = getElementPosition(thePlayer) owner = "none" local erg = mysql_query(sqlcon, "INSERT INTO house_data (`Int`, Owner, Preis, X, Y, Z, `Lock`) VALUES ('"..tonumber(int).."','"..owner.."','"..tonumber(preis).."','"..x.."','"..y.."','"..z.."','0')") Housspawn() outputChatBox("House created!") else outputChatBox("Invalid price!", thePlayer,255,0,0) end else outputChatBox("Invalid interior!", thePlayer,255,0,0) end else outputChatBox("You are not authorized!", thePlayer, 255,0,0) end end addCommandHandler("addhouse", createhouse) Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now